A REST API for the Machathon 5.00 Tech Summit and its competitions.
This api will interact with various services as needed, such as:
- summit registration form - link
- competition leaderboard - link
- Submission requests coming from the competition's simulator - Simulator link
Note: The event has successfully ended, so the official data has been removed and the current data is just dummy data for presentation.
This repo can be used as a template for anyone wanting to hold a similar event or summit.
Event attendees will be able to register for the event through a web form.
Teams will be able to register for any competition in the event through a web form.
Competitors solutions get submitted by sending a request to the API to store the submission in the database.
Competitors will be able to see their scores and rankings through the competition leaderboard.
- make sure you have NodeJS and PostgreSQL (or a serverless postgres database on neon) installed
using nvm is recommended for installing node.
- Clone repo
git clone https://github.com/Apolo151/machathon5_api.git
cd machathon5_api
- install node modules
npm install
- create a .env file and add needed environment variables
touch .env
# example .env file
DATABASE_URL='YOUR DATABASE CONNECTION STRING'
TEST_DATABASE_URL='YOUR TEST DATABASE CONNECTION STRING'
SERVER_PORT=3000 # the port on which the servers listens to connections on
- in development mode
npm run start-dev
- build and run
npm start
- run unit tests
npm run test:unit; npm run dropdb
- run unit tests with code coverage
npm run test:unit:coverage; npm run dropdb
check jest docs.
- Implement Auth
- Add Dockerfile
check issues for a comprehensive list.