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:latestfor microservices that use websockets - Follow the instructions here to get an instance of judge0 running locally
- Rename
.env.samplefile to.env - Install npm packages using
npm i - Run the gateway using
npm run dev
- Rename
.env.samplefile to.env - Create a Cloud DB URL using Mongo Atlas
- Enter the DB URL created as
DB_CLOUD_URIin.envfile - Install npm packages using
npm i - Run the user service using
npm run dev
- Rename
.env.samplefile to.env - Install npm packages using
npm i - Run the auth service using
npm run dev
- Rename
.env.samplefile to.env - Create a Cloud DB URL using Mongo Atlas
- Enter the DB URL created as
DB_CLOUD_URIin.envfile - Install npm packages using
npm i - Run the matching service using
npm run dev
- Rename
.env.samplefile to.env - Create a Cloud DB URL using Mongo Atlas
- Enter the DB URL created as
DB_CLOUD_URIin.envfile - Populate the Mongo Atlas DB with questions using
data.jsonin this folder - Install npm packages using
npm i - Run the question service using
npm run dev
- Rename
.env.samplefile to.env - Install npm packages using
npm i - Run the collaboration service using
npm run dev
- Rename
.env.samplefile to.env - Install npm packages using
npm i - Run the communication service using
npm run dev
- Rename
.env.samplefile to.env - Create a Cloud DB URL using Mongo Atlas
- Enter the DB URL created as
DB_CLOUD_URIin.envfile - 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 iin the root folder - Run
npm run start:devin 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_IDAWS_SECRET_ACCESS_KEYAWS_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 deployfrom their directory - Environment variables listed in
.env.sampleshould be specified in their respective AWS Elastic Beanstalk configurations