- You are required to develop individual microservices within separate folders within this repository.
- The teaching team should be given access to the repositories as we may require viewing the history of the repository in case of any disputes or disagreements.
- Real-time Matchmaking: Users are matched instantly based on chosen difficulty and topics.
- Collaborative Code Editor: Synchronous, low-latency coding environment.
PeerPrep is implemented using a Microservices Architecture to ensure scalability and separation of concerns.
| Service | Role | Tech Stack | Port |
|---|---|---|---|
| API Gateway (Nginx) | Routing and Load Balancing | Nginx | 80 |
| User Service | Authentication and User Profiles Management | Node/Express, MongoDB | 4001 |
| Question Service | Question Repository and Fetching | Node/Express, MongoDB | 4002 |
| Matching Service | Queueing, Matchmaking, SSE/WebSockets | Node/Express, Redis | 4003 |
| Collaboration Service | Real-time Code Editing and Chatting | Node/Socket.io, Redis | 4004 |
You must have the following installed to run the project locally:
- Docker Desktop (Required for all services and databases)
node 22.19.0 (LTS)pnpm(Package manager for monorepo workspaces)
git clone https://github.com/CS3219-AY2526Sem1/cs3219-ay2526s1-project-g05.git peerprepAll commands below assume you are in the root folder /
cd frontend
pnpm install
cd backend
pnpm -r installThis command will set up the foundational database containers (MongoDB and Redis).
docker-compose -f docker-compose-local.yml up -dcd backend
cp .env.example .env- Remember to edit the
OPENAI_API_KEYvariable to use AI features
cd frontend
pnpm run dev
cd backend
pnpm run dev- This seeds dummy data and creates a test account that you can try out!
cd backend/db_management
pnpm run seed-
The site is now available at http://localhost:5173
-
You can try it out with this test seed account:
-
email: [email protected] password: Testing123!
-
- Docker Desktop/Docker Engine
git clone https://github.com/CS3219-AY2526Sem1/cs3219-ay2526s1-project-g05.git peerprepAll commands below assume you are in the root / folder.
cd backend
cp .env.prod.example .env.prod- Remember to edit the
OPENAI_API_KEYvariable to use AI features
docker-compose up -d --build --scale peerprep_user_service=2 --scale peerprep_question_service=2 --scale peerprep_code_execution_service=2- This spawns 2 user_service, question_service and code_execution_service containers for load-balancing
- matching_service currently does not support load-balancing
cd backend/db_management
pnpm run seed:prod- The site should now be available at http://localhost:5173
Tools Used: ChatGPT (GPT‑5 Thinking), GitHub Copilot
In general, AI tools were used to:
- Generate boilerplate code for backend Express server.
- Auto-complete functions the author was already programming.
- Debug programming errors as they came up.
- Suggest implementation approaches on how to incoporate different technolgies to the codebase.




