|
2 | 2 |
|
3 | 3 | # CS3219 Project (PeerPrep) - AY2526S1 |
4 | 4 |
|
| 5 | +PeerPrep is a technical interview preparation platform designed to help students and professionals practice coding interviews together in a real-time collaborative environment. |
| 6 | +The platform leverages a microservices architecture to ensure scalability and maintainability. |
| 7 | + |
| 8 | +Users can find peers to practice with, match based on topic preferences, and collaborate on coding problems in real-time. |
| 9 | + |
| 10 | +Use PeerPrep [here](https://d1h013fkmpx3nu.cloudfront.net). |
| 11 | + |
5 | 12 | ## Group: G09 |
6 | 13 |
|
7 | 14 | Team Members: |
8 | 15 |
|
9 | | -- WOO ZONG HUA |
10 | | -- CENSON LEE LEMUEL JOHN ALEJO |
11 | | -- SONG JIA HUI |
12 | | -- SHARON SOH XUAN HUI |
13 | | -- YAP ZHAO YI |
| 16 | +- WOO ZONG HUA ([@wzhua02](https://github.com/wzhua02)) |
| 17 | +- CENSON LEE LEMUEL JOHN ALEJO ([@Ryuse](https://github.com/Ryuse)) |
| 18 | +- SONG JIA HUI ([@jiahui0309](https://github.com/jiahui0309)) |
| 19 | +- SHARON SOH XUAN HUI (@[xGladiate](https://github.com/xGladiate)) |
| 20 | +- YAP ZHAO YI ([@ToxOptimism](https://github.com/ToxOptimism)/[@ToxicOptimism](https://github.com/ToxicOptimism)) |
| 21 | + |
| 22 | +--- |
| 23 | + |
| 24 | +## Running the PeerPrep application with Docker |
| 25 | + |
| 26 | +**Before running** check for the following requirements: |
| 27 | + |
| 28 | +- [Docker](https://docs.docker.com/get-docker/) |
| 29 | +- [Docker Hub](https://hub.docker.com/) (for pulling required base images) |
| 30 | + |
| 31 | +> **Note:** Make sure Docker Engine is running before executing any commands. |
| 32 | +
|
| 33 | +--- |
| 34 | + |
| 35 | +### Environment Configuration |
| 36 | + |
| 37 | +Each **frontend** and **backend** service in PeerPrep requires its own `.env` file for configuration. |
| 38 | + |
| 39 | +You can find sample environment files (`.env.example`) in each corresponding directory. |
| 40 | +Copy each one to a `.env` file and fill in the required values according to your local setup. |
| 41 | + |
| 42 | +#### Frontend Services |
| 43 | + |
| 44 | +Create `.env` files for the following: |
| 45 | + |
| 46 | +``` |
| 47 | +./ui-shell |
| 48 | +./ui-services/collab-ui-service |
| 49 | +./ui-services/history-ui-service |
| 50 | +./ui-services/matching-ui-service |
| 51 | +./ui-services/question-ui-service |
| 52 | +./ui-services/user-ui-service |
| 53 | +``` |
| 54 | + |
| 55 | +#### Backend Services |
| 56 | + |
| 57 | +Create `.env` files for the following: |
| 58 | + |
| 59 | +``` |
| 60 | +./backend-services/chatting-backend-service |
| 61 | +./backend-services/collab-backend-service |
| 62 | +./backend-services/history-backend-service |
| 63 | +./backend-services/leetcode-backend-service |
| 64 | +./backend-services/matching-backend-service |
| 65 | +./backend-services/question-backend-service |
| 66 | +./backend-services/user-backend-service |
| 67 | +``` |
| 68 | + |
| 69 | +## Each `.env.example` contains all required keys for that service. |
| 70 | + |
| 71 | +### Running the Application |
| 72 | + |
| 73 | +Once all `.env` files are set up: |
| 74 | + |
| 75 | +1. Navigate to the **root directory** of the project. |
| 76 | +2. Run the following command to build and start all containers: |
| 77 | + |
| 78 | + ```bash |
| 79 | + docker compose up |
| 80 | + ``` |
| 81 | + |
| 82 | +This will: |
| 83 | + |
| 84 | +- Build all backend and frontend service containers. |
| 85 | +- Start the complete PeerPrep system locally. |
| 86 | +- Expose the services as defined in the `docker-compose.yml`. |
| 87 | + |
| 88 | +> The first build may take several minutes as dependencies are downloaded and containers are built. |
| 89 | +
|
| 90 | +--- |
| 91 | + |
| 92 | +### Verifying Deployment |
| 93 | + |
| 94 | +Once all containers are up and running, you can: |
| 95 | + |
| 96 | +- Access the **UI Shell** (main app) via [http://localhost:5173](http://localhost:5173). |
| 97 | +- Check logs for any service with: |
| 98 | + |
| 99 | + ```bash |
| 100 | + docker compose logs -f <service-name> |
| 101 | + ``` |
| 102 | + |
| 103 | +- Verify connectivity between services using the Docker Dashboard or: |
| 104 | + |
| 105 | + ```bash |
| 106 | + docker ps |
| 107 | + ``` |
| 108 | + |
| 109 | +--- |
| 110 | + |
| 111 | +## Architecture Diagram |
| 112 | + |
| 113 | +[Architecture Diagram](https://github.com/CS3219-AY2526Sem1/cs3219-ay2526s1-project-g09/blob/master/docs/architecture_diagram.png) |
| 114 | + |
| 115 | +— |
| 116 | + |
| 117 | +## Ports |
| 118 | + |
| 119 | +| Frontend Service Name | Port | |
| 120 | +| --------------------------- | ---- | |
| 121 | +| WebApp | 5173 | |
| 122 | +| User UI Service | 5177 | |
| 123 | +| Question History UI Service | 5178 | |
| 124 | +| Question UI Service | 5175 | |
| 125 | +| Matching UI Service | 5174 | |
| 126 | +| Collaboration UI Service | 5176 | |
| 127 | + |
| 128 | +| Backend Service Name | Port | |
| 129 | +| ------------------------ | ---- | |
| 130 | +| User Service | 5277 | |
| 131 | +| Question History Service | 5278 | |
| 132 | +| Question Service | 5275 | |
| 133 | +| LeetCode Service | 5285 | |
| 134 | +| Matching Service | 5274 | |
| 135 | +| Collaboration Service | 5276 | |
| 136 | +| Chat Service | 5286 | |
| 137 | +| Redis Instance | 6379 | |
| 138 | + |
| 139 | +--- |
| 140 | + |
| 141 | +## Backend Services |
| 142 | + |
| 143 | +### **User Service** |
| 144 | + |
| 145 | +Handles **user profile management**, including: |
| 146 | + |
| 147 | +- Account creation and authentication |
| 148 | +- Profile updates and settings |
| 149 | + |
| 150 | +For more details about the API: |
| 151 | +[User Service README](https://github.com/CS3219-AY2526Sem1/cs3219-ay2526s1-project-g09/blob/master/backend-services/user-backend-service/README.md) |
| 152 | + |
| 153 | +--- |
| 154 | + |
| 155 | +### **Matching Service** |
| 156 | + |
| 157 | +Handles **match request management**, including: |
| 158 | + |
| 159 | +- Handling match request creation and cancellation |
| 160 | +- Handling match acceptance states |
| 161 | + |
| 162 | +For more details about the API: |
| 163 | +[Matching Service README](https://github.com/CS3219-AY2526Sem1/cs3219-ay2526s1-project-g09/blob/master/backend-services/matching-backend-service/README.md) |
| 164 | + |
| 165 | +--- |
| 166 | + |
| 167 | +### **Question Service** |
| 168 | + |
| 169 | +Handles **CRUD operations for questions**, including: |
| 170 | + |
| 171 | +- Storing metadata and rich question content such as images |
| 172 | +- Retrieving random questions |
| 173 | + |
| 174 | +For more details about the API: |
| 175 | +[Question Service README](https://github.com/CS3219-AY2526Sem1/cs3219-ay2526s1-project-g09/blob/master/backend-services/question-backend-service/README.md) |
| 176 | + |
| 177 | +--- |
| 178 | + |
| 179 | +### **LeetCode Service** |
| 180 | + |
| 181 | +Handles _sampling questions_ from a Github Repo, including: |
| 182 | + |
| 183 | +- Daily fetching and syncing of new questions |
| 184 | + |
| 185 | +For more details about the API: |
| 186 | +[LeetCode Service README](https://github.com/CS3219-AY2526Sem1/cs3219-ay2526s1-project-g09/blob/master/backend-services/leetcode-backend-service/README.md) |
| 187 | + |
| 188 | +--- |
| 189 | + |
| 190 | +### **Collaboration Service** |
| 191 | + |
| 192 | +Handles **real-time code collaboration** between matched users, including: |
| 193 | + |
| 194 | +- Concurrent code editing |
| 195 | +- Syntax highlighting support |
| 196 | +- Session management |
| 197 | + |
| 198 | +For more details about the API: |
| 199 | +[Collaboration Service README](https://github.com/CS3219-AY2526Sem1/cs3219-ay2526s1-project-g09/blob/master/backend-services/collab-backend-service/README.md) |
| 200 | + |
| 201 | +--- |
| 202 | + |
| 203 | +### **Chat Service** |
| 204 | + |
| 205 | +Handles **real-time communication** between matched users during collaboration, including: |
| 206 | + |
| 207 | +- Text-based chat in session |
| 208 | + |
| 209 | +For more details about the API: |
| 210 | +[Chat Service README](https://github.com/CS3219-AY2526Sem1/cs3219-ay2526s1-project-g09/blob/master/backend-services/chatting-backend-service/README.md) |
| 211 | + |
| 212 | +--- |
| 213 | + |
| 214 | +### **Question History Service** |
| 215 | + |
| 216 | +Handles the **storage and retrieval of user question history**, including: |
| 217 | + |
| 218 | +- Viewing of previously attempted questions |
| 219 | + |
| 220 | +For more details about the API: |
| 221 | +[Question History Service README](https://github.com/CS3219-AY2526Sem1/cs3219-ay2526s1-project-g09/blob/master/backend-services/history-backend-service/README.md) |
| 222 | + |
| 223 | +--- |
14 | 224 |
|
15 | | -### Note: |
| 225 | +## AI Usage |
16 | 226 |
|
17 | | -- You are required to develop individual microservices within separate folders within this repository. |
18 | | -- 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. |
| 227 | +Use of CoPilot for code reviews as seen in the GitHub Repository |
0 commit comments