Skip to content

CS3219-AY2526Sem1/cs3219-ay2526s1-project-g05

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Review Assignment Due Date

CS3219 Project (PeerPrep) - AY2526S1

Group: G05

Note:

  • 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.

Logo

Table of Contents

1. Product Overview

1.1 Key Features

  • Real-time Matchmaking: Users are matched instantly based on chosen difficulty and topics.
  • Collaborative Code Editor: Synchronous, low-latency coding environment.

1.2 Product Visualizations

Landing Page Login Page MatchMaking Page Collaboration Page

2. Project Architecture

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

3. Pre-requisites

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)

4. Installation and Setup [Local Development]

4.1 Clone Repository

git clone https://github.com/CS3219-AY2526Sem1/cs3219-ay2526s1-project-g05.git peerprep

All commands below assume you are in the root folder /

4.2 Install Dependencies

cd frontend
pnpm install

cd backend
pnpm -r install

4.3 Setup Docker Containers

This command will set up the foundational database containers (MongoDB and Redis).

docker-compose -f docker-compose-local.yml up -d

4.4 Create .env for backend

cd backend
cp .env.example .env
  • Remember to edit the OPENAI_API_KEY variable to use AI features

4.5 Start the Frontend and Backend

cd frontend
pnpm run dev

cd backend
pnpm run dev

4.6 Seed Data

  • This seeds dummy data and creates a test account that you can try out!
cd backend/db_management
pnpm run seed

4.7 Test it out!

5. Production Deployment

5.1 Pre-requisites

  • Docker Desktop/Docker Engine

5.2 Clone Repository

git clone https://github.com/CS3219-AY2526Sem1/cs3219-ay2526s1-project-g05.git peerprep

All commands below assume you are in the root / folder.

5.3 Copy .env.prod file for backend

cd backend
cp .env.prod.example .env.prod
  • Remember to edit the OPENAI_API_KEY variable to use AI features

5.4 Build Containers and Run

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

5.5 Seed the Database

cd backend/db_management
pnpm run seed:prod

5.6 Test Deployment!

AI Use Summary

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.

About

An app for technical interview preparation with real-time matchmaking to collaborate on questions with other users.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 98.3%
  • Other 1.7%