-
Notifications
You must be signed in to change notification settings - Fork 3
Description
THIS ISSUE SERVES AS A DRAFT FOR PROJECT REPORT.
Decisions
Tech stack
- Backend
- NestJS
- NestJS/passport
- nodemailer
- redis
- socket.io
- yjs
- zod
- Prisma + PlanetScale
- Frontend
- Vite
- Tailwind
- React-query
- zustand
- y-socket.io
- simple-peer
- monaco-editor
- Data
- NodeJS
- Prisma + PlanetScale
Deployment
For the development and demonstration of the application, we would focus on running the service locally. Once all the features are up and running nearer and as we approach the deadline, we would ideally dockerise some of the microservices and deploy it as follows:
Frontend
| Vercel | Google App Engine | |
|---|---|---|
| Price | Free for personal repositories. | Free for the first 28 instance hours of "F" instances |
| Availability | Available 24/7, also provides readable URLs when deployed | Available 24/7, default URLs are not very readable |
| Scaling | Unable to find, but should not be an issue | Handled by Google for free, within the deployed instance class (F1 - F4), different increasing memory and CPU limits. |
| CI/CD Difficulty | Vercel has their own CICD pipeline | To find out more on, but currently thinking of manually integration and deployment |
Leaning towards Vercel if we can integrate it with our backend.
Backend
| Google Cloud Run | Google App Engine | |
|---|---|---|
| Price | Free 180000 vCPU seconds per month | Free for the first 28 instance hours of "F" instances |
| Availability | Pay-per-use, first request would is slow as it needs to "spin up" | Available 24/7, does not require "spinning up" |
| Scaling | Handled by Google for free | Handled by Google for free, within the deployed instance class (F1 - F4), different increasing memory and CPU limits. |
| CI/CD Difficulty | Relatively simple, can be done with Github Actions (example) | To find out more on, but currently thinking of manually integration and deployment |
- Why GCP?
- We have some credits that we can spend
- Closer to how industry deploys their services
- We intend on letting the service run a little while longer after the module has ended (Heroku free tier no longer available in November)
Leaning towards Google App Engine.
User service
Planetscale -- Hosted SQL database.
- Reasonable free tier
- Chosen over NoSQL service as the data in our service can be relational and we would like the ability to work with that.
Matching service
Utilise Redis' namespace as the different types of "queues" (PubSub topics).
Question service
Planetscale to allow for relational queries/mappings, Redis for quick queries.
Design
We will prioritise functionality first before user experience. Simply put, the team would work on getting a functional version up first before improving on the UI elements that would improve the user experience.
Diagrams
All of our diagrams are stored in this Gist.
Architecture
Simplified
Specifics
- Deployment is subjected to change but we are currently leaning towards the following:
- Backend: Google App Engine
- Frontend: Vercel
User flow
Specifics
- At any page after
Dashboardusers can navigate access the pages that are immediately a child toDashboardas there would be a navigation bar.Locked room page with past sessioncan accessMatching pagedirectly without needing to go back toDashboard.
- At any page, a user may choose to
log outand would be directed back to the start of the user flow.