Skip to content
 
 

Repository files navigation

Goal-Oriented Social Graph

A social networking platform connecting students based on shared goals and academic paths.

Project Structure

This monorepo contains two main parts:

  • Frontend: React + Vite application (UI).
  • Backend: Flask + MongoDB application (API).

AI Agents & Contributors: Please read LLM_CONTEXT.md for architectural context and guidelines.

Please refer to the detailed README.md in each directory for specific architecture and contribution guides.

Quick Start

1. Prerequisites

  • Node.js: v22+ (The script will check this, or install via Volta).
  • Python: v3.12+
  • MongoDB Atlas: Ensure you have your connection string.

2. Run the App (Easy Mode)

The project includes a run.js script that automates environment setup, dependency installation, and startup for both frontend and backend.

Standard Start:

node run.js

Fresh Start (Reset & Clean): If you encounter issues or want a clean slate (reinstalls all dependencies):

node run.js --clean

Features of run.js:

  • Auto-Install: Installs pip and npm dependencies if missing.
  • Port Cleanup: Automatically kills processes on default ports (5000/5173).
  • Volta Support: Switches to Node 22 automatically if Volta is installed.
  • Parallel Run: Starts Flask and Vite in a single terminal.
  • Parallel Run: Starts Flask and Vite in a single terminal.

3. Authentication & Bypass

  • Login: Use your McGill email and password.
  • Guest Mode: Click "Continue as Guest" on the login screen to explore the graph without an account.
  • Registration: Sign up with a valid McGill email if you don't have an account.

4. Database Seeding (First Run)

To populate the graph with visual data (mock students/connections):

# While backend is running (port 5000)
curl.exe -X POST http://localhost:5000/api/seed

Note: This creates ~40 users in your MongoDB.


Manual Setup (Alternative)

If you prefer to run services manually:

1. Setup Backend

cd backend
python3 -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
pip install -r requirements.txt

# Configure .env (See backend/README.md)
python app.py

2. Setup Frontend

cd frontend
npm install

# Configure .env (See frontend/README.md)
npm run dev

Testing & Health

Health Check

Verify the system is running:

curl http://localhost:5000/health

Running Tests

  • Backend: cd backend && export FLASK_ENV=testing && pytest
  • Frontend: cd frontend && npm test (See frontend status)

For detailed testing guides, check the respective Frontend and Backend documentation.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages