Skip to content

πŸŽ“ StudySync is a productivity app with tools like AI-powered study tips, music recommendations, a Pomodoro timer, and more to help enhance your study routine and stay organized. Welcome to a suite of tools designed to boost your study & productivity!

License

Notifications You must be signed in to change notification settings

pyenthusiasts/StudySync-Study-Buddy-App

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

47 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

StudySync - A Productivity and Study Companion App

Welcome to StudySync! StudySync is a productivity and study tool designed to help users stay organized and efficient, built with Vue and Express. It includes a variety of features such as Pomodoro timers, music recommendations, weather checks, flashcards, to-do lists, and AI chat assistance. It integrates third-party services like Spotify for music and OpenWeather for weather data.

Table of Contents

Features

  • Pomodoro Timer: A built-in timer for Pomodoro study sessions.
  • Music Recommendations: Get music suggestions based on mood using Spotify.
  • Flashcards: Create, manage, and study flashcards.
  • To-Do List: Track study tasks and assignments.
  • Calculator: A scientific calculator for quick calculations.
  • AI Chat: Chat with an AI assistant for study tips, help, and queries.
  • Weather Check: Check the weather for any city using OpenWeather.
  • Quick Notes: Take and store quick notes for your studies.
  • Daily Motivation: Receive motivational quotes to keep you going.
  • Study Tips: Get study tips and advice for effective learning.
  • User Authentication: Register and login to access personalized features.
  • User Profile: Craft your profile with study interests and goals.
  • Fully Responsive: Works on all devices and screen sizes.
  • And More!: Explore the app for additional features and tools.

Live Deployment

The app is currently live at https://study-sync-app.vercel.app/. You can explore the various features and functionalities of the app, including the Pomodoro timer, music recommendations, weather checks, and AI chat assistance.

The backend API is hosted on Render at https://studysync-study-buddy-app.onrender.com. The frontend is hosted on Vercel and communicates with the backend API for data retrieval and storage.

However, the app may take a while to spin up, which means it may take 2-3 minutes (max) to load the backend logic. This is due to Render's free tier resource limit, where we are only allocated 0.1 CPU and 512MB RAM. Thank you for your understanding!

UI Screenshots

Here are some placeholder UI images for the app:

Home Page (Dashboard)

Home Page UI

Tools List

Pomodoro Timer UI

Landing Page

Landing Page UI

Login Page

Music Recommendations UI

Register Page

Weather Check UI

Forgot Password Page

Forgot Password UI

Profile Page

Profile Page UI

404 Page

404 Page UI

Footer

Footer UI

Tech Stack

Frontend

  • Vue.js (JavaScript Framework)
  • Vuetify (Material Design Components)
  • Axios (HTTP Requests)
  • Vuex (State Management)
  • Markdown Rendering with marked (for AI-generated responses)
  • Webpack (Module Bundler)
  • Babel (JavaScript Compiler)
  • ESLint (Code Linter)
  • Prettier (Code Formatter)
  • Vue Router (Page Navigation)
  • Vue CLI (Vue Command Line Interface)

Backend

  • Node.js with Express.js
  • MongoDB (Database)
  • JWT (Authentication)
  • Spotify API (for music recommendations)
  • OpenWeather API (for weather data)
  • Gemini API (for AI chat functionality)
  • Swagger (API Documentation)
  • Nginx (Reverse Proxy & Load Balancer)

DevOps & Deployment

  • Git and GitHub for version control
  • Google Gemini (for AI chat functionality)
  • OpenWeather API (for weather data)
  • Docker (for containerization)
  • Jenkins (for CI/CD)
  • Vercel and Render for deployment

Getting Started

To get started with StudySync, you can follow the setup instructions below. The project is divided into two main parts: the frontend and the backend. The frontend is built using Vue.js and Vuetify, while the backend is built using Node.js and Express.js. The backend uses MongoDB as the database.

  1. Clone the repository:

    git clone https://github.com/hoangsonww/StudySync-Study-Buddy-App.git
    cd StudySync-Study-Buddy-App
  2. Set up the backend:

    • Navigate to the backend directory:
      cd backend
    • Install backend dependencies:
      npm install
    • Set up environment variables by creating a .env file:
      SPOTIFY_CLIENT_ID=<your-spotify-client-id>
      SPOTIFY_CLIENT_SECRET=<your-spotify-client-secret>
      OPENWEATHER_API_KEY=<your-openweather-api-key>
      JWT_SECRET=<your-jwt-secret>
      GEMINI_API_TOKEN=<your-gemini-api-token>
      PORT=5000
      MONGO_URI=<your-mongo-uri>
      AI_INSTRUCTION=<your-ai-instruction>
      
    • Start the backend server:
      npm start
    • The backend server will start on http://localhost:5000.
  3. Set up the frontend:

    • Navigate to the frontend directory:
      cd frontend/study-sync-app
    • Install frontend dependencies:
      npm install
    • Set up the frontend .env file with the API base URL:
      VUE_APP_API_URL=http://localhost:5000/api
      
    • Start the frontend development server:
      npm run serve
    • Open your browser and go to http://localhost:8081 to view the app. (The URL may vary based on the port used by Vue CLI - check the terminal output for the correct URL.)
  4. Explore the app:

    You can now explore the StudySync app by navigating through the various features and functionalities. You can use the Pomodoro timer, check the weather, get music recommendations, chat with the AI, and more.

  5. Contribute:

    If you would like to contribute to the project, feel free to fork the repository and submit a pull request with your changes. We welcome contributions from the community!

File Structure

StudySync-Study-Buddy-App/
β”‚
β”œβ”€β”€ backend/                            # Backend (Node.js + Express)
β”‚   β”œβ”€β”€ config/                         # Database and configuration files
β”‚   β”‚   └── db.js                       # Database connection
β”‚   β”œβ”€β”€ swagger/                        # Swagger API documentation
β”‚   β”‚   └── swagger.js                  # Swagger setup
β”‚   β”œβ”€β”€ controllers/                    # Controllers handling requests
β”‚   β”‚   └── controllers.js              # Main controller file
β”‚   β”œβ”€β”€ middleware/                     # Middleware for authentication
β”‚   β”‚   └── middleware.js               # Auth middleware to protect routes
β”‚   β”œβ”€β”€ models/                         # Mongoose models (User, Group)
β”‚   β”‚   └── models.js                   # Mongoose models
β”‚   β”œβ”€β”€ routes/                         # API Routes for endpoints
β”‚   β”‚   └── routes.js                   # Route definitions
β”‚   β”œβ”€β”€ services/                       # External services (AI, Weather, Spotify)
β”‚   β”‚   └── services.js                 # Helper functions for services
β”‚   β”œβ”€β”€ views/                          # Views (if using any templating engines)
β”‚   β”œβ”€β”€ .env                            # Environment variables for sensitive data
β”‚   β”œβ”€β”€ app.js                          # Main backend application file
β”‚   β”œβ”€β”€ package.json                    # Backend dependencies
β”‚   └── package-lock.json               # Lock file for backend dependencies
β”‚
β”œβ”€β”€ frontend/                           # Frontend (Vue.js + Vuetify)
β”‚   β”œβ”€β”€ public/                         # Static files (favicon, index.html)
β”‚   β”‚   β”œβ”€β”€ favicon.ico                 # App favicon
β”‚   β”‚   β”œβ”€β”€ index.html                  # HTML template
β”‚   β”œβ”€β”€ src/                            # Source code for frontend
β”‚   β”‚   β”œβ”€β”€ assets/                     # Static assets (images, logos, etc.)
β”‚   β”‚   β”‚   β”œβ”€β”€ logo.png                # App logo
β”‚   β”‚   β”‚   └── logo.svg                # SVG logo
β”‚   β”‚   β”œβ”€β”€ components/                 # Reusable Vue components
β”‚   β”‚   β”‚   β”œβ”€β”€ ChatAI.vue              # AI Chat component
β”‚   β”‚   β”‚   β”œβ”€β”€ FooterComponent.vue     # Footer component
β”‚   β”‚   β”‚   β”œβ”€β”€ MusicRecommendation.vue # Music recommendation component
β”‚   β”‚   β”‚   β”œβ”€β”€ NavbarComponent.vue     # Navbar component
β”‚   β”‚   β”‚   β”œβ”€β”€ SearchProfiles.vue      # Search profiles component
β”‚   β”‚   β”‚   β”œβ”€β”€ UserLogin.vue           # User login component
β”‚   β”‚   β”‚   β”œβ”€β”€ UserRegister.vue        # User registration component
β”‚   β”‚   β”‚   β”œβ”€β”€ UserProfile.vue         # User profiles component
β”‚   β”‚   β”‚   └── StudyGroup.vue          # Study group component
β”‚   β”‚   β”œβ”€β”€ plugins/                    # Vue plugins (Vuetify, Axios)
β”‚   β”‚   β”‚   β”œβ”€β”€ webfonloader.js         # Webfont loader
β”‚   β”‚   β”‚   β”œβ”€β”€ axios.js                # Axios setup
β”‚   β”‚   β”‚   └── vuetify.js              # Vuetify setup
β”‚   β”‚   β”œβ”€β”€ store/                      # Vuex store for global state management
β”‚   β”‚   β”‚   └── index.js                # Vuex store setup
β”‚   β”‚   β”œβ”€β”€ router/                     # Vue Router for page navigation
β”‚   β”‚   β”‚   └── index.js                # Router setup
β”‚   β”‚   β”œβ”€β”€ views/                      # Vue views for different pages
β”‚   β”‚   β”‚   β”œβ”€β”€ HomePage.vue            # Home page view
β”‚   β”‚   β”‚   └── DashboardPage.vue       # Dashboard view
β”‚   β”‚   β”œβ”€β”€ api.js                      # API service for making HTTP requests
β”‚   β”‚   β”œβ”€β”€ main.js                     # Main Vue application file
β”‚   β”‚   └── App.vue                     # Main Vue component
β”‚   β”œβ”€β”€ .env                            # Environment variables for API URL
β”‚   β”œβ”€β”€ babel.config.js                 # Babel configuration
β”‚   β”œβ”€β”€ jsconfig.json                   # JavaScript configuration
β”‚   β”œβ”€β”€ vue.config.js                   # Vue configuration
β”‚   β”œβ”€β”€ package.json                    # Frontend dependencies
β”‚   └── package-lock.json               # Lock file for frontend dependencies
β”‚
β”œβ”€β”€ .env                                # Environment variables for API keys and secrets
β”œβ”€β”€ README.md                           # This README file
└── package.json                        # Root package.json file for the entire project

API Documentation

Table of API Endpoints

API Endpoint Method Description
/auth/register POST Registers a new user with name, email, and password.
/auth/login POST Authenticates the user and returns a JWT token.
/profile/:userId? GET Retrieves the profile data of the authenticated user.
/profile PUT Updates the profile information of the authenticated user.
/search GET Searches for user profiles based on the query.
/weather GET Fetches weather data for a given city.
/groups POST Creates a new study group.
/groups/:groupId/sessions POST Creates a new study session for the group.
/cities GET Provides city suggestions based on a query.
/music GET Fetches music recommendations based on a mood.
/ai-chat POST Allows users to chat with the AI for study assistance.

Backend Swagger Documentation

The backend API documentation is available at http://localhost:5000/api-docs after starting the backend server. The Swagger UI provides a detailed overview of the API endpoints, request parameters, and response data.

Swagger UI

Example of calling the Music Recommendation API

axios
  .get("http://localhost:5000/api/music?emotion=happy", {
    headers: {
      Authorization: `Bearer ${your_token}`,
    },
  })
  .then((response) => {
    console.log(response.data.recommendations); // Process music recommendations
  })
  .catch((error) => {
    console.error("Error fetching music:", error);
  });

Authentication

All API endpoints require JWT authentication. Include the token in the Authorization header as follows:

Authorization: Bearer <your-jwt-token>

NGINX Configuration

The NGINX configuration file for the reverse proxy and load balancer is available in the nginx directory. The configuration file is named nginx.conf and can be used to set up NGINX for the backend server.

server {
    listen 80;
    server_name localhost;

    location / {
        proxy_pass http://localhost:5000;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
    }
}

The NGINX configuration file sets up a reverse proxy to the backend server running on http://localhost:5000. It listens on port 80 and forwards all requests to the backend server.

Docker Configuration

The Docker configuration files for the backend and frontend are available in the docker directory. The Dockerfile and docker-compose.yml files can be used to build and run the Docker containers for the app.

Building the Docker Containers

To build the Docker containers for the backend and frontend, you can use the following command:

docker compose up --build

This command will build the Docker images for the backend and frontend and run the containers. You can access the app at http://localhost:8081 after the containers are up and running.

The Creator


We hope you enjoy using StudySync! For any issues or feature requests, feel free to open an issue on the repository. Happy studying! πŸ“šπŸš€


Back to top

About

πŸŽ“ StudySync is a productivity app with tools like AI-powered study tips, music recommendations, a Pomodoro timer, and more to help enhance your study routine and stay organized. Welcome to a suite of tools designed to boost your study & productivity!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Vue 67.4%
  • JavaScript 28.5%
  • Shell 1.9%
  • Other 2.2%