Skip to main content

summerfest-be - Documentation

Document Status
Document OwnerProduct Engineering 2026Product Engineering 2026
Contributors
Project Linkshttps://github.com/RistekCSUI/summerfest-behttps://github.com/RistekCSUI/summerfest-be
Project Linkshttp://api.event.ristek.cs.ui.ac.idhttp://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]
TeamTheodore Kevin Himawantheodore.kevin@ristek.cs.ui.ac.id
TeamAri Darrell Muljonodarrell@ristek.cs.ui.ac.id
TeamGrace Karinagracekarin@ristek.cs.ui.ac.id
TeamYeshua Marco G. Manurungmarco@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​

LayerPathsResponsibility
Summerfest Core Configuration Layersummerfest/settings.py, summerfest/urls.py, summerfest/asgi.py, summerfest/wsgi.pyInitializes 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 Layerapi/urls.py, api/views.py, api/permissions.py, api/serializers.pyHandles 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 Layerapi/auth_views.pyHandles 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 Layerapi/admin_views.pyHandles 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 Layerdatathon/models.py, datathon/admin.pyStores 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 Layersistech/models.pyStores 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 Layerhackathon/models.pyStores the Hackathon event window model that is exposed through the public event endpoint.
Runtime Bootstrap Layermanage.py, scripts/docker-entrypoint.sh, Dockerfile, dev.docker-compose.yml, requirements.txtProvides 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​

Environment Variables​

KeyDescriptionDefault (Dev)Sensitive?
API_KEYAPI key used for authenticating service requestsβ€”Yes
AWS_ACCESS_KEY_IDAWS access key used to access S3 servicesβ€”Yes
AWS_SECRET_ACCESS_KEYAWS secret key used for S3 authenticationβ€”Yes
AWS_S3_REGION_NAMEAWS region where the S3 bucket is hostedap-southeast-1No
AWS_S3_SIGNATURE_VERSIONSignature version used for AWS S3 requestss3v4No
AWS_S3_FOLDER_PREFIXDefault folder prefix for stored files in S3productionNo
AWS_STORAGE_BUCKET_NAMEName of the S3 bucket used for file storageristek-summerfestNo
DATABASE_URLFull PostgreSQL connection string used by the applicationβ€”Yes
POSTGRES_DBName of the PostgreSQL databasesummerfest_be_prodNo
POSTGRES_USERUsername used to connect to PostgreSQLpostgresNo
POSTGRES_PASSWORDPassword used for PostgreSQL authenticationβ€”Yes
EMAIL_HOSTSMTP server used to send emailssmtp.gmail.comNo
EMAIL_PORTPort used for SMTP communication587No
EMAIL_HOST_USERPrimary email address used for sending emailsdatathon@ristek.cs.ui.ac.idNo
EMAIL_HOST_PASSWORDPassword for the primary email accountβ€”Yes
EMAIL_HOST_USER_2Secondary email address used for sending emailssistech@ristek.cs.ui.ac.idNo
EMAIL_HOST_2_PASSWORDPassword for the secondary email accountβ€”Yes
MAILER_SERVICE_URLURL of the external mailer servicehttps://mailer.ristek.cs.ui.ac.idNo
MAILER_AUTH_TOKENAuthentication token for mailer serviceβ€”Yes
ENVApplication environment (e.g., dev, staging, production)productionNo
PORTPort on which the application runs8003No
SECRET_KEYSecret key used for signing tokens and securityβ€”Yes
SERVICE_URLBase URL of the application servicehttps://api.event.ristek.cs.ui.ac.idNo

πŸ™‹Questions

πŸ—’ List of frequently asked questions or question that need to be answered that is related to this initiative ..