|
1 | 1 | [](https://classroom.github.com/a/bzPrOe11)
|
| 2 | + |
2 | 3 | # CS3219 Project (PeerPrep) - AY2425S1
|
| 4 | + |
3 | 5 | ## Group: G16
|
4 | 6 |
|
5 |
| -### Note: |
6 |
| -- You can choose to develop individual microservices within separate folders within this repository **OR** use individual repositories (all public) for each microservice. |
7 |
| -- In the latter scenario, you should enable sub-modules on this GitHub classroom repository to manage the development/deployment **AND** add your mentor to the individual repositories as a collaborator. |
8 |
| -- 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. |
| 7 | +### Note |
| 8 | + |
| 9 | +- You can choose to develop individual microservices within separate folders within this repository **OR** use individual repositories (all public) for each microservice. |
| 10 | +- In the latter scenario, you should enable sub-modules on this GitHub classroom repository to manage the development/deployment **AND** add your mentor to the individual repositories as a collaborator. |
| 11 | +- 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. |
| 12 | + |
| 13 | +## Architecture |
| 14 | + |
| 15 | +<img |
| 16 | + src="./docs/architecture.png" |
| 17 | + style="background:#f1f5f9;padding:16px;border-radius:12px" |
| 18 | + alt="architecture diagram" |
| 19 | +/> |
| 20 | + |
| 21 | +We develop the following micro-services: |
| 22 | + |
| 23 | +- [`/backend/user`](./backend/user/README.md): Express service for user accounts, authentication. |
| 24 | +- [`/backend/question`](./backend/question/README.md): Express service for question metadata, attempt history. |
| 25 | +- [`/backend/matching`](./backend/matching/README.md): Express service for user game matching, via websockets and Redis Streams. |
| 26 | +- [`/backend/collaboration`](./backend/collaboration/README.md): Express service for collaborative editing, via YJS and websockets. |
| 27 | +- [`/backend/chat`](./backend/chat/README.md): Express service for peer-2-peer chatting. |
| 28 | +- [`/frontend`](./frontend/README.md): A UI view layer for the application, built with React Router and Vite, and served with Nginx. |
| 29 | + |
| 30 | +### Hosting/Running |
| 31 | + |
| 32 | +We run this application using Kubernetes, and host this application on Google Kubernetes Service. The documentation can be found [here](./k8s/README.md). |
| 33 | + |
| 34 | +### Docker Compose |
| 35 | + |
| 36 | +Should you desire to rebuild the images, make use of the various commands in our [`Makefile`](./Makefile). |
| 37 | + |
| 38 | +Ideally, you should have Docker running, and you should run the commands in this sequence: |
| 39 | + |
| 40 | +1. `make setup` (Optional) |
| 41 | + |
| 42 | + - This sets up dependencies and creates the necessary persistent volumes. |
| 43 | + |
| 44 | +2. `make up` |
| 45 | + |
| 46 | + - In addition to the above, it also: |
| 47 | + - Runs the migrations/seeding for each service's database within their own Docker container, once running. |
| 48 | + - Builds and starts the services in order. |
0 commit comments