PeerPrep is a web application for collaborating on technical interview questions and challenges. Users can practice with other like-minded users on coding challenges and take each other to new heights through peer-learning. The collaborative nature of the application breaks the monotonous grind of improving technical skills, tailored to the user’s skills.
Note
The report for the project can be found in the repository: 33-ProjectReport.pdf.
Environment | URL |
---|---|
Staging | http://ec2-18-138-225-25.ap-southeast-1.compute.amazonaws.com |
Production | https://peerprep.launchsite.com.sg |
The repository is organised as a mono-repository, with each service taking a sub-folder.
- In the root of the project, run
npm run-script init
. - Look into the
config_env
folder and configure the secrets, using the samples provided. Remove the suffix .sample to use the environment files.- The required environment files are
secrets-email
,secrets-db
,secrets-redis
,secrets-signing
- The required environment files are
- Start the Docker-Compose Stack using
npm run-script up-core
.- This will up all services except
execute-service
. - To also run execute-service, configure the environment file
secrets-db-judge0
. - Use
npm run-script up
. Note that the image for executor exceeds 10GB in size.
- This will up all services except
- Once started, the system will be available on http://localhost:5001
Note
In order to use secure gRPC, you need to configuresecrets-grpc-cert.env
. you may usenpm run-script gen-certs
to obtain the self-signed certificates.
Some setup is required for development. Note that these steps are not required to run the application, since all generated files are committed to version control.
- In the root of the project, run
npm i
. - Then, run
npm run-script gen-proto
.
- In the root of the project, run
npm i
. - Then, run
npm run-script gen-proto-go
.
Warning
You will need Golang on your system to perform this step.
- In the root of the project, run
npm i
. - Then, run
npm run-script gen-gateway
.
Warning
You will need Golang on your system to perform this step.
- We reccomend using docker-compose! You can up a single service by appending the service to the command
- For example, to run user-service,
npm run-script up user-service
. - If you want to run the service in Daemon mode (background), add the
-d
flag:npm run-script up -- -d user-service
. - If you want to force a rebuild, use
npm run-script up -- --build user-service
.
- For example, to run user-service,
- If you must run natively, you will require NodeJS and NPM for Typescript services, and Golang for Go services
- Each service's sub-directory contains a
.env.sample
file. You must configure it manually in order to run. You can follow the configuration used in theconfig_env
folder.
- Each service's sub-directory contains a
- Navigate into the service's subdirectory
- For Typescript services, execute
npm i
npm run-script build
npm start
- For Golang services, execute
make run
- In the root of the project, run
npm run-script gen-y-websocket
. - Go the the frontend using
cd frontend/
. - Install npm packages using
npm i
. - Run Frontend using
npm start
.
- Tests must be run natively, we do not support testing in Docker.
- Navigate into the service's subdirectory
- For Typescript services, execute
npm i
npm test
- For Golang services, execute
make test