This document contains the design of the machathon5 API. The API for the Machathon 5.00 Tech Summit.
We will use a relational database (PostgreSQL) to store data.
- we will use neon to provide a serverless Postgres database.
-
The following entities are needed:
Summit Attendees
Column | Type |
---|---|
Full Name | String |
Phone Number | Int |
String | |
National ID | Int |
University | String |
Faculty | String |
Graduation Year | Int |
Registration Time | Timestamp |
Teams
Column | Type |
---|---|
team Name | String |
team Code | String |
Registration Time | Timestamp |
Teams Submissions
Column | Type |
---|---|
team Code | String |
First Laptime | Float |
Second Laptime | Float |
Total Laptime | Float |
A simple HTTP server is responsible for storing and serving data in and from the database
- The server is implemented using Node.js
- Express.js is the web framework used
/summit/attendees [GET]
/summit/attendees/:email [GET]
/summit/attendees [POST]
/autonomous-race/teams [GET]
/autonomous-race/teams [POST]
/autonomous-race/submissions [GET]
/autonomous-race/submissions/:team_code [GET]
/autonomous-race/submissions [POST]
/autonomous-race/top-scores [GET]
/cron [GET] # health check
- Jest and supertest will be used for unit testing
The code will be hosted on GitHub, PRs and issues are welcome.
The web server will be hosted on cyclic, using their generous free tier.