This is the frontend application for creating and managing challenges.
- UI for creating challenges
- Challenge API - The API endpoint for challenges
- Resources API - The API endpoint for resources
- Projects API
- Challenge ES Processor - Updates challenge data in ElasticSearch
- Resource ES Processor - Updates resource data in Elasticsearch
- NodeJS (v10.15+)
- Docker
- Docker Compose
Production configuration is in config/constants/production.js
Development configuration is in config/constants/development.js
- First install dependancies
npm install
-
copy the environment file in docs/dev.env to /.env
-
If you are using local instances of the API's, change the DEV_API_HOSTNAME in configs/constants/development.js to match your local api endpoint.
- For example change it to 'http://localhost:3000/',
-
Run the app in development mode
npm run dev
You can access the app from http://localhost:3000/
The page will reload if you make edits.
You will also see any lint errors in the console.
To test the app for lint errors
npm run lint
Use the --fix
flag to automatically fix errors.
To build the app for production
npm run build
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
If you want to test to production build locally you can run
npm install -g serve
serve -s build
It serves the build folder locally.
To deploy the app on heroku run
git init
heroku create tc-challenge-creation-app --buildpack mars/create-react-app
git add .
git commit -m "Heroku commit"
git push heroku master
You can access the app by running
heroku open
Test configuration is at config/env.js
. You don't need to change them.
for testing run below command
npm run test
- TBD
- TBD