- Python 3.10+
- MongoDB running (local or hosted). Example URI:
mongodb://localhost:27017
cd Summer2025-Internships
# 1) Create and activate a virtual environment
python3 -m venv backend/venv
source backend/venv/bin/activate
# 2) Install dependencies
pip install -r backend/requirements.txt
# 3) Create .env at the repo root (same level as this README)
cat > .env << 'EOF'
SECRET_KEY=change_me
MONGODB_URL=mongodb://localhost:27017
SERVER_PORT=5174
# Optional
FRONTEND_URL=http://localhost:5173
EOFRun from the project root so the backend package is importable.
uvicorn backend.main:app --reload --host 0.0.0.0 --port 5174- Interactive docs:
http://localhost:5174/docs - OpenAPI JSON:
http://localhost:5174/api/v1/openapi.json - Health check:
GET http://localhost:5174/health
- Obtain a token, then call protected endpoints with header
Authorization: Bearer <token>
# Register
curl -X POST http://localhost:5174/api/v1/auth/register \
-H 'Content-Type: application/json' \
-d '{"username":"alice","email":"[email protected]","password":"pass"}'
# Login (OAuth2 password flow)
curl -X POST http://localhost:5174/api/v1/auth/login \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'username=alice&password=pass'-
Auth (
/api/v1/auth)POST /registerbody:{ username, email?, password }→ create userPOST /loginform:username,password→ returns{ access_token, token_type }
-
Applications (
/api/v1/applications) – requires Bearer tokenGET /→ returns saved application ids grouped by statusPOST /body:{ "job_id": "string", "status": "applied|hidden", "value": true }
-
Simplify integration (
/api/v1/simplify) – requires Bearer tokenPUT /cookiebody:{ "cookie": "<Simplify cookie string>" }→ save cookie for userGET /cookie→ returns saved cookiePOST /refresh→ fetch tracker data from Simplify and cache parsed resultsGET /parsed→ returns parsed cached data for current userGET /trackerheader:cookies: <raw cookie header string>→ fetches live tracker items
-
Health
GET /health→{ status, timestamp }
Notes
- CORS is configured to allow
FRONTEND_URL(defaults tohttp://localhost:5173). - Ensure MongoDB is reachable at
MONGODB_URLbefore starting the server.