An exercise to put to practice software development teamwork, subsystem communication, containers, deployment, and CI/CD pipelines. See instructions for details.
A course recommender designed to help a Computer Science or Math student at NYU create a four-year plan by using an LLM to suggest courses from the CAS catalog that fulfill their requirements and classes relevant to their interests.
Live Deployment: http://159.65.190.132:5000/
This project uses the following custom container images, hosted on Docker Hub:
- Web Application: apoorvib/web-app
The application also depends on the official MongoDB image:
- Database: mongo:7
- Frontend: Anshu Aramandla
- Backend (LLM/recommendation): Apoorv Belgundi
- Backend (CRUD operations): Harrison Coon
- DB Setup & Login: Kylie Lin
- Docker & Integration: Jacob Ng
Create a file at web-app/.env by copying web-app/.env.example and filling in values appropriate for your environment. Do not commit production secrets to version control — only commit web-app/.env.example with dummy/example values.
Example web-app/.env (copy into web-app/.env and edit):
MONGO_URI = mongodb://mongo:27017/course_planner
MONGO_DB_NAME = course_planner
ENVIRONMENT = development
WAIT_BEFORE_CONNECT = 2
OPENAI_API_KEY = sk-proj
MONGO_URI: MongoDB connection string. When using Docker Compose,mongodb://mongo:27017points to themongoservice indocker-compose.yml.MONGO_DB_NAME: name of the database used by the app.WAIT_BEFORE_CONNECT: seconds the seeder will wait before attempting a DB connection (helps when starting containers together).ENVIRONMENT:developmentorproduction— controls seeding/debug behavior.FLASK_SECRET: secret key for Flask session management. Keep this private in production.
If additional secrets/configuration files are required, include an example file (for example web-app/.env.example) and document exact steps for creating the real file(s) with the course admins.
You can run the app with Docker Compose (recommended) or directly in a local Python environment.
Run with Docker Compose (recommended)
- Copy the example environment file and edit it as needed:
cp web-app/.env.example web-app/.env
# edit web-app/.env as needed- Build and start the services:
docker-compose up --build- Open
http://127.0.0.1:5000in your browser.
Notes:
- The
webcontainer runsstart.sh, which attempts to seed the database (python -m database.seed) before starting the Flask app. If the database is already seeded, the script will warn and continue. - To run the seeder manually while containers are running:
docker-compose run --rm web python -m database.seedRun locally without Docker (optional)
- From the repository root, change into
web-app, create and activate a virtual environment, and install dependencies:
cd web-app
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt- Ensure
web-app/.envpoints to your MongoDB instance and seed the DB:
python -m database.seed- Start the Flask server:
python run.py- Open
http://localhost:5000to verify the app is running.
Stopping
- If started with Docker Compose:
docker-compose down. - If started locally: stop the server (Ctrl+C) and run
deactivateto exit the virtual environment.
The web-app subsystem includes a comprehensive unit test suite targeting 80%+ code coverage of core business logic.
- 44 unit tests covering user management, course parsing, semester planning, and database operations
- Coverage by module:
api/plan_utils.py: 84%api/user_model.py: 80%database/app_db.py: 97%
- Testing framework: pytest with mongomock for in-memory database testing
Install test dependencies (included in web-app/requirements.txt):
cd web-app
pip install -r requirements.txtRun all tests:
pytest tests/Run tests with coverage report:
pytest tests/ --cov=api --cov=database --cov-report=term-missingGenerate HTML coverage report:
pytest tests/ --cov=api --cov=database --cov-report=htmlThen open htmlcov/index.html in a browser.
Tests are organized by module in web-app/tests/:
test_user_model.py— User CRUD, authentication, profile management (13 tests)test_plan_utils.py— Course parsing, formatting, semester plan operations (18 tests)test_app_db.py— Database connection, seeding, indexing (12 tests)conftest.py— Shared pytest fixtures and environment setupREADME.md— Detailed testing documentation