summerfest-be - Documentation
| Document Status | ||
|---|---|---|
| Document Owner | Product Engineering 2026 | Product Engineering 2026 |
| Contributors | ||
| Project Links | https://github.com/RistekCSUI/summerfest-be | https://github.com/RistekCSUI/summerfest-be |
| Project Links | http://api.event.ristek.cs.ui.ac.id | http://api.event.ristek.cs.ui.ac.id |
| Project Links | [Monitoring Dashboard] | [Monitoring Dashboard] |
| Project Links | [API Documentation] | [API Documentation] |
| Project Links | [Other Related Doc/Link] | [Other Related Doc/Link] |
| Team | Theodore Kevin Himawan | theodore.kevin@ristek.cs.ui.ac.id |
| Team | Ari Darrell Muljono | darrell@ristek.cs.ui.ac.id |
| Team | Grace Karina | gracekarin@ristek.cs.ui.ac.id |
| Team | Yeshua Marco G. Manurung | marco@ristek.cs.ui.ac.id |
π Background
Overviewβ
summerfest-be is a Django REST backend that receives, stores, and manages Summerfest submissions, mainly for the Sistech, Datathon, and Hackathon event flows. This service acts as the main data source for the public submission forms, S3 file uploads, event window endpoints, and internal admin APIs used for authentication, verification, CSV export, and submission file downloads.
Stakeholdersβ
- Users: Participants
- Upstream Dependencies: Backend API
- Downstream Consumers: End users
Scope & Boundariesβ
- In Scope: Django project summerfest, api endpoints, database schemas, S3 file upload flow, admin token-based API
- Out of Scope: Frontend implementation, legacy data migration, detailed observability stack setup, infrastructure provisioning outside the existing deployment workflow
βοΈ Architecture & Design
System Diagramβ
Architecture Decisions (ADRs)β
- Language/Framework: Python 3, Django 5, Django REST Framework
- Database: PostgreSQL for relational data
- Communication: Synchronous via HTTP
π»Technical Specifications
API Documentationβ
GET /api/submissions-sistech/β
Response 200
[
{
"id":1,
"full_name":"Participant A",
"nickname":"PartA",
"age":21,
"email":"participant.a@example.test",
"line_id":"participant_a",
"wa_number":"+620000000001",
"domicile":"City A",
"institution":"Institution A",
"current_status":"undergraduate",
"program":"career_coaching",
"path":"product_management",
"requirements_submission":"summerfest/uploads/requirements.pdf",
"motivations":"Motivation text",
"how_found":"social media",
"status":"n",
"confirm_participation":true,
"confirm_join_group":true,
"confirm_graduation_attendance":true
}
]
POST /api/create-submission-sistech/β
Request
{
"full_name":"Participant A",
"nickname":"PartA",
"age":21,
"email":"participant.a@example.test",
"line_id":"participant_a",
"wa_number":"+620000000001",
"domicile":"City A",
"institution":"Institution A",
"current_status":"undergraduate",
"program":"career_coaching",
"path":"product_management",
"requirements_submission":"summerfest/uploads/requirements.pdf",
"motivations":"Saya ingin belajar lebih dalam.",
"how_found":"social media",
"confirm_participation":true,
"confirm_join_group":true,
"confirm_graduation_attendance":true
}
Response 201
"Your submission has been successfully received."
GET /api/submissions-datathon/β
Response 200
{
"count":1,
"next":null,
"previous":null,
"results":[
{
"id":10,
"team_name":"Team Alpha",
"team_country":"Indonesia",
"number_of_members":3,
"discovery_method":"social_media",
"team_email":"leader.alpha@example.test",
"payment":"summerfest/uploads/payment.pdf",
"selection_task":"summerfest/uploads/task.pdf",
"status":"n",
"is_verified":false,
"submitted_at":"2026-03-31T12:00:00Z"
}
]
}
POST /api/create-submission-datathon/β
Request
{
"team_name":"Team Alpha",
"team_country":"Indonesia",
"number_of_members":3,
"discovery_method":"social_media",
"payment":"summerfest/uploads/payment.pdf",
"selection_task":"summerfest/uploads/task.pdf",
"team_members":[
{
"role":"leader",
"full_name":"Leader Alpha",
"birthday":"2004-01-10",
"email":"leader.alpha@example.test",
"line_id":"leader_alpha",
"whatsapp_number":"+620000000010",
"institution":"Institution A",
"ktm_photo":"summerfest/uploads/leader-ktm.jpg"
},
{
"role":"member",
"full_name":"Member Beta",
"birthday":"2004-05-20",
"email":"member.beta@example.test",
"line_id":"member_beta",
"whatsapp_number":"+620000000011",
"institution":"Institution B",
"ktm_photo":"summerfest/uploads/member-ktm.jpg"
}
]
}
Response 201
"Your submission has been successfully received."
GET /api/events-datathon/β
Response 200
[
{
"id":1,
"open_time":"2026-04-01T08:00:00Z",
"closed_time":"2026-04-30T23:59:59Z"
}
]
POST /api/events-datathon/β
Request
{
"open_time":"2026-04-01T08:00:00Z",
"closed_time":"2026-04-30T23:59:59Z"
}
Response 201
"Event has been successfully created."
POST /api/upload-file/β
Request
file=<binary>
Response 200
{
"message":"Image uploaded successfully",
"key":"summerfest/550e8400-e29b-41d4-a716-446655440000_20260331120000.pdf"
}
POST /api/check-email-sistech/β
Request
{
"email":"participant.a@example.test"
}
Response 200
{
"message":"Email is available"
}
POST /api/check-email-datathon/β
Request
{
"team_email":"leader.alpha@example.test"
}
Response 200
{
"message":"Email is available"
}
POST /api/admin/login/β
Request
{
"username":"admin",
"password":"secret"
}
Response 200
{
"token":"drf_token_value",
"user_id":1,
"username":"admin",
"is_superuser":true
}
POST /api/admin/logout/β
Response 200
{
"message":"Successfully logged out"
}
POST /api/admin/verify-token/β
Response 200
{
"id":1,
"username":"admin",
"is_superuser":true,
"is_staff":true
}
GET /api/admin/datathon/team-members/β
Response 200
{
"count":1,
"next":null,
"previous":null,
"results":[
{
"id":21,
"role":"leader",
"team":10,
"full_name":"Leader Alpha",
"birthday":"2004-01-10",
"email":"leader.alpha@example.test",
"line_id":"leader_alpha",
"whatsapp_number":"+620000000010",
"institution":"Institution A",
"ktm_photo":"summerfest/uploads/leader-ktm.jpg",
"team_name":"Team Alpha",
"team_country":"Indonesia"
}
]
}
GET /api/admin/datathon/submissions/β
Response 200
{
"count":1,
"next":null,
"previous":null,
"results":[
{
"id":10,
"team_name":"Team Alpha",
"team_country":"Indonesia",
"number_of_members":3,
"discovery_method":"social_media",
"team_email":"leader.alpha@example.test",
"payment":"summerfest/uploads/payment.pdf",
"selection_task":"summerfest/uploads/task.pdf",
"status":"n",
"is_verified":false,
"submitted_at":"2026-03-31T12:00:00Z",
"team_members":[
{
"id":21,
"role":"leader",
"team":10,
"full_name":"Leader Alpha",
"birthday":"2004-01-10",
"email":"leader.alpha@example.test",
"line_id":"leader_alpha",
"whatsapp_number":"+620000000010",
"institution":"Institution A",
"ktm_photo":"summerfest/uploads/leader-ktm.jpg"
}
]
}
]
}
GET /api/admin/datathon/submissions//β
Response 200
{
"id":10,
"team_name":"Team Alpha",
"team_country":"Indonesia",
"number_of_members":3,
"discovery_method":"social_media",
"team_email":"leader.alpha@example.test",
"payment":"summerfest/uploads/payment.pdf",
"selection_task":"summerfest/uploads/task.pdf",
"status":"n",
"is_verified":false,
"submitted_at":"2026-03-31T12:00:00Z",
"team_members":[
{
"id":21,
"role":"leader",
"team":10,
"full_name":"Leader Alpha",
"birthday":"2004-01-10",
"email":"leader.alpha@example.test",
"line_id":"leader_alpha",
"whatsapp_number":"+620000000010",
"institution":"Institution A",
"ktm_photo":"summerfest/uploads/leader-ktm.jpg"
}
]
}
PATCH /api/admin/datathon/submissions/β
Request
{
"is_verified":true
}
Response 200
{
"message":"Submission for team 'Team Alpha' has been updated"
}
DELETE /api/admin/datathon/submissions/β
Response 200
{
"message":"Submission for team 'Team Alpha' has been deleted"
}
GET /api/admin/datathon/sub-members/β
Response 200
[
{
"id":21,
"submitted_at":"2026-03-31T12:00:00Z",
"institution":"Institution A"
}
]
GET /api/admin/sistech/submissions/β
Response 200
{
"count":1,
"next":null,
"previous":null,
"results":[
{
"id":3,
"full_name":"Participant A",
"nickname":"PartA",
"age":21,
"email":"participant.a@example.test",
"line_id":"participant_a",
"wa_number":"+620000000001",
"domicile":"City A",
"institution":"Institution A",
"current_status":"undergraduate",
"program":"career_coaching",
"path":"product_management",
"requirements_submission":"summerfest/uploads/requirements.pdf",
"motivations":"Motivation text",
"how_found":"social media",
"status":"n",
"confirm_participation":true,
"confirm_join_group":true,
"confirm_graduation_attendance":true
}
]
}
GET /api/admin/sistech/submissions/β
Response 200
{
"id":3,
"full_name":"Participant A",
"nickname":"PartA",
"age":21,
"email":"participant.a@example.test",
"line_id":"participant_a",
"wa_number":"+620000000001",
"domicile":"City A",
"institution":"Institution A",
"current_status":"undergraduate",
"program":"career_coaching",
"path":"product_management",
"requirements_submission":"summerfest/uploads/requirements.pdf",
"motivations":"Saya ingin belajar lebih dalam.",
"how_found":"social media",
"status":"n",
"confirm_participation":true,
"confirm_join_group":true,
"confirm_graduation_attendance":true
}
DELETE /api/admin/sistech/submissions/β
Response 200
{
"message":"Submission for 'Participant A' has been deleted"
}
GET /api/admin/sistech/submissions//files/<file_type>/β
Response 200
{
"url":"https://presigned-url.example.com"
}
Data Model/Schemaβ
Project Structureβ
summerfest-be/ # backend project root
βββ api/ # API layer for public and admin endpoints
β βββ urls.py # API route registry
β βββ views.py # public submission, event, upload, and email-check handlers
β βββ auth_views.py # admin login, logout, and token verification handlers
β βββ admin_views.py # admin submission management, export, and download handlers
β βββ serializers.py # request and response serializers
β βββ permissions.py # custom X-Api-Key permission logic
βββ datathon/ # Datathon domain app
β βββ models.py # Datathon submission, team member, and event models
β βββ admin.py # Django admin registration and CSV export integration
β βββ views.py # app-level views placeholder
β βββ migrations/ # Django migration history for Datathon
βββ sistech/ # Sistech domain app
β βββ models.py # Sistech submission and event models
β βββ serializers.py # app-level serializer placeholder
β βββ views.py # app-level views placeholder
β βββ migrations/ # Django migration history for Sistech
βββ hackathon/ # Hackathon domain app
β βββ models.py # Hackathon event model
β βββ migrations/ # Django migration history for Hackathon
βββ summerfest/ # Django project configuration package
β βββ settings.py # global Django settings and environment wiring
β βββ urls.py # root URL router
β βββ asgi.py # ASGI entrypoint
β βββ wsgi.py # WSGI entrypoint for Gunicorn
βββ scripts/ # operational scripts
β βββ docker-entrypoint.sh # container bootstrap script
βββ images/ # static image assets or documentation assets
βββ Dockerfile # production image build definition
βββ dev.docker-compose.yml # local Docker Compose setup
βββ requirements.txt # Python dependency manifest
βββ manage.py # Django management command entrypoint
Componentsβ
| Layer | Paths | Responsibility |
|---|---|---|
| Summerfest Core Configuration Layer | summerfest/settings.py, summerfest/urls.py, summerfest/asgi.py, summerfest/wsgi.py | Initializes the Django application shell, including global settings, middleware, database wiring, static file routing, app registration, root URL routing, and deployment entrypoints for ASGI and WSGI servers. |
| Public API Entry Layer | api/urls.py, api/views.py, api/permissions.py, api/serializers.py | Handles the public backend flow, including request routing, X-Api-Key validation, submission creation for Sistech and Datathon, event window retrieval and creation, duplicate email checks, file upload to AWS S3, and serializer-based request and response shaping. |
| Admin Authentication Layer | api/auth_views.py | Handles the protected admin access flow, including username-password authentication against Django users, token creation, logout token invalidation, and token verification for already logged-in admin sessions. |
| Admin Submission Management Layer | api/admin_views.py | Handles the internal admin workflow, including paginated submission loading, detail retrieval, submission verification updates, deletion, CSV export, ZIP export, single submission download, and filtered listing across Datathon and Sistech data. |
| Datathon Domain Layer | datathon/models.py, datathon/admin.py | Stores and organizes the Datathon business entities, including team submissions, linked team members, event windows, Django admin integration, and presigned URL helpers for payment files, selection tasks, and KTM uploads. |
| Sistech Domain Layer | sistech/models.py | Stores and organizes the Sistech business entities, including participant biodata, selected program and path, confirmation flags, event windows, and requirement file references used by the admin and public API flows. |
| Hackathon Event Layer | hackathon/models.py | Stores the Hackathon event window model that is exposed through the public event endpoint. |
| Runtime Bootstrap Layer | manage.py, scripts/docker-entrypoint.sh, Dockerfile, dev.docker-compose.yml, requirements.txt | Provides the executable and operational foundation for the backend service, including local management commands, container startup steps, dependency installation, image build configuration, and local Docker-based development orchestration. |
βοΈ Operational Playbook
Infrastructureβ
- Cloud Provider: Pusilkom
- Link: http://api.event.ristek.cs.ui.ac.id
Environment Variablesβ
| Key | Description | Default (Dev) | Sensitive? |
|---|---|---|---|
| API_KEY | API key used for authenticating service requests | β | Yes |
| AWS_ACCESS_KEY_ID | AWS access key used to access S3 services | β | Yes |
| AWS_SECRET_ACCESS_KEY | AWS secret key used for S3 authentication | β | Yes |
| AWS_S3_REGION_NAME | AWS region where the S3 bucket is hosted | ap-southeast-1 | No |
| AWS_S3_SIGNATURE_VERSION | Signature version used for AWS S3 requests | s3v4 | No |
| AWS_S3_FOLDER_PREFIX | Default folder prefix for stored files in S3 | production | No |
| AWS_STORAGE_BUCKET_NAME | Name of the S3 bucket used for file storage | ristek-summerfest | No |
| DATABASE_URL | Full PostgreSQL connection string used by the application | β | Yes |
| POSTGRES_DB | Name of the PostgreSQL database | summerfest_be_prod | No |
| POSTGRES_USER | Username used to connect to PostgreSQL | postgres | No |
| POSTGRES_PASSWORD | Password used for PostgreSQL authentication | β | Yes |
| EMAIL_HOST | SMTP server used to send emails | smtp.gmail.com | No |
| EMAIL_PORT | Port used for SMTP communication | 587 | No |
| EMAIL_HOST_USER | Primary email address used for sending emails | datathon@ristek.cs.ui.ac.id | No |
| EMAIL_HOST_PASSWORD | Password for the primary email account | β | Yes |
| EMAIL_HOST_USER_2 | Secondary email address used for sending emails | sistech@ristek.cs.ui.ac.id | No |
| EMAIL_HOST_2_PASSWORD | Password for the secondary email account | β | Yes |
| MAILER_SERVICE_URL | URL of the external mailer service | https://mailer.ristek.cs.ui.ac.id | No |
| MAILER_AUTH_TOKEN | Authentication token for mailer service | β | Yes |
| ENV | Application environment (e.g., dev, staging, production) | production | No |
| PORT | Port on which the application runs | 8003 | No |
| SECRET_KEY | Secret key used for signing tokens and security | β | Yes |
| SERVICE_URL | Base URL of the application service | https://api.event.ristek.cs.ui.ac.id | No |
πQuestions
π List of frequently asked questions or question that need to be answered that is related to this initiative ..