StudySync is a web application designed to help students find study partners and groups based on their preferences and availability. The application includes features such as user authentication, profile management, matching algorithm, and chat functionality.
Before you begin, ensure you have met the following requirements:
- Python 3.x installed on your machine
- Node.js and npm installed on your machine
- For local development, SQLite is used by default (bundled with Python; no separate install required). PostgreSQL is optional if you set
DATABASE_URL(see Database below).
git clone https://github.com/BugBusters101/StudySync
cd StudySync
Create and activate a virtual environment, then install dependencies.
python3 -m venv .venv
source .venv/bin/activate
pip install -r backend/requirements.txt
Optional: initialize the local SQLite database (only if backend/study-buddy.db is missing or empty). Run from the backend folder:
cd backend
python -c "from app.utils.database import init_db; init_db()"
On Windows, if python is not on your PATH, use py instead.
Install frontend dependencies.
npm run install:all
This runs Flask at http://localhost:5000 and React at http://localhost:3000.
npm run dev
Individual services (optional):
npm run dev:backend
npm run dev:frontend
-
Access the application: Open your web browser and navigate to
http://localhost:3000. -
Register and log in: Create a new account or log in with your existing credentials.
-
Set up your profile: Fill in your study preferences and availability.
-
Find study partners: Use the matching feature to find compatible study partners.
-
Chat with your matches: Use the chat functionality to communicate with your study partners.
- Default (local): If
DATABASE_URLis not set, the API uses SQLite atbackend/study-buddy.db. The same SQL runs against Postgres in production and SQLite locally. - PostgreSQL (e.g. Supabase): Set the environment variable
DATABASE_URLto apostgresql://…connection string. The app then uses psycopg2 instead of SQLite. This matches typical Vercel / production setups. - Deploy / gunicorn:
backend/wsgi.pycallsload_dotenv(), so a.envfile in the process working directory can supplyDATABASE_URLandSECRET_KEYwhen you run the server that way. python backend/run.py: Does not load a.envfile; setDATABASE_URLin your shell or your process manager if you need Postgres while usingrun.py.
Avoid pointing a casual local dev environment at your production database: you can corrupt or leak real user data. Prefer SQLite locally, or a staging Postgres instance.
- The frontend uses
REACT_APP_API_URLwhen set; otherwise it callshttp://127.0.0.1:5000. Thepackage.jsonproxy (http://localhost:5000) applies to the React dev server only when requests use relative URLs; this project mostly uses the explicit API URL above. - The SQLite file path is resolved relative to the backend package, so it stays correct regardless of the shell working directory.
- If you prefer, you can delete the root
node_modules/. The project usesnpx concurrentlyfrom the root, and all React dependencies live instudy-sync-frontend/node_modules/.