This document introduces how to get started.
This section introduces how to get PeerPrep running on your local environment. Skip to the development section once setting up everything once to start everything concurrently to save time starting everything individually.
- Install Docker from here
- Run
docker run -d --name redis-stack-server -p 6379:6379 redis/redis-stack-server:latest
for microservices that use websockets - Follow the instructions here to get an instance of judge0 running locally
- Rename
.env.sample
file to.env
- Install npm packages using
npm i
- Run the gateway using
npm run dev
- Rename
.env.sample
file to.env
- Create a Cloud DB URL using Mongo Atlas
- Enter the DB URL created as
DB_CLOUD_URI
in.env
file - Install npm packages using
npm i
- Run the user service using
npm run dev
- Rename
.env.sample
file to.env
- Install npm packages using
npm i
- Run the auth service using
npm run dev
- Rename
.env.sample
file to.env
- Create a Cloud DB URL using Mongo Atlas
- Enter the DB URL created as
DB_CLOUD_URI
in.env
file - Install npm packages using
npm i
- Run the matching service using
npm run dev
- Rename
.env.sample
file to.env
- Create a Cloud DB URL using Mongo Atlas
- Enter the DB URL created as
DB_CLOUD_URI
in.env
file - Populate the Mongo Atlas DB with questions using
data.json
in this folder - Install npm packages using
npm i
- Run the question service using
npm run dev
- Rename
.env.sample
file to.env
- Install npm packages using
npm i
- Run the collaboration service using
npm run dev
- Rename
.env.sample
file to.env
- Install npm packages using
npm i
- Run the communication service using
npm run dev
- Rename
.env.sample
file to.env
- Create a Cloud DB URL using Mongo Atlas
- Enter the DB URL created as
DB_CLOUD_URI
in.env
file - Install npm packages using
npm i
- Run the history service using
npm run dev
- Install npm packages using
npm i
- Run the frontend using
npm start
- Install npm packages using
npm i
in the root folder - Run
npm run start:dev
in the root folder - Navigate to
localhost:3000/
on a browser
This section introduces how to get PeerPrep running on your AWS environment.
There are 3 information needed to be retrieved from your AWS account.
They include:
- Access Key
- Secret Access Key
- Default Region
These 3 information will need to be set as values to the respective envrionment variables.
They include:
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
AWS_DEFAULT_REGION
Note: For frontend, an additional REACT_APP_URI_GATEWAY
environment variable needs to be set.
The value must be the domain of the gateway.
For each backend service that contains the .ebextensions
directory:
- You can deploy them by running
eb deploy
from their directory - Environment variables listed in
.env.sample
should be specified in their respective AWS Elastic Beanstalk configurations