A robust RESTful backend service for the IT-TODAY 2025 platform, built with Node.js, Express.js, MySQL, and Prisma ORM. This API manages user data, team registrations, competitions, and other functionalities for the IT-TODAY event.
- User authentication and authorization
- Team registration and management
- Competition participation limits
- Leader assignment and validation
- Integration with Google OAuth2
- Scalable database design with Prisma ORM
- Node.js: Backend runtime
- Express.js: Web framework
- MySQL: Relational database
- Prisma ORM: Database management
- Supabase: Object storage
- Prettier: Code formatting
Follow these steps to set up the project locally:
git clone https://github.com/pusdatin-ittoday/ittod-web-api.gitcd ittod-web-apinpm installCreate a .env file in the project root and add the following variables:
DATABASE_URL=mysql://<username>:<password>@<host>:<port>/<database>
SECRET_KEY_SESSION=<your_secret_key>
GOOGLE_CLIENT_SECRET=<your_google_client_secret>
GOOGLE_CLIENT_ID=<your_google_client_id>
GOOGLE_REDIRECT=<your_google_redirect_url>Run the following Prisma commands to configure the database:
npx prisma generate # Generate the Prisma client
npx prisma migrate dev # Apply migrations and create the database
# Or, if not using migrations:
npx prisma db push # Push the schema to the databasenpm run devnpm run serveAccess the API at: http://localhost:3000
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/users |
Retrieve all users |
| POST | /api/users |
Add a new user |
| GET | /api/users/:id |
Get user by ID |
| PUT | /api/users/:id |
Update user by ID |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/competitions |
Retrieve all competitions |
| POST | /api/competitions |
Add a new competition |
| GET | /api/competitions/:id |
Get competition details by ID |
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/teams |
Register a new team |
| POST | /api/teams/join |
Join a team using a team code |
| GET | /api/teams/:id |
Get team details by ID |
- Walid Nadirul Ahnaf
- Aldi Pramudya
- Ilham Edgar Maulana Goesasi
- Jeremy Tjahjana
- Daffa Aulia M S
This project is licensed under the Apache License 2.0.
