Skip to main content

Summerfest-admin-fe - Documentation

πŸ”Ž Background

Overview​

summerfest-admin-fe is the frontend admin panel for Summerfest RISTEK. The service is used by internal admins to authenticate, review applicant submissions, filter and search records, verify Datathon submissions, delete invalid entries, and download submission files in single, CSV, or bulk ZIP formats.

Stakeholders​

  • Users: summerfest admins
  • Upstream Dependencies: summerfest backend
  • Downstream Consumers: admin users

Scope & Boundaries​

  • In Scope: Admin login flow, protected dashboard pages, Datathon submission management, Sistech submission management, authenticated file download proxy routes, UI shell shared across admin pages
  • Out of Scope: Public registration forms, backend business logic, database schema ownership, legacy data migration, payment processing logic, creation of new submission data from the admin panel

βš™οΈ Architecture & Design

System Diagram​

Architecture Decisions (ADRs)​

  • Language/Framework: TypeScript, React 19, React Router 7 with SSR enabled, Vite 6, tailwind CSS
  • Database: PostgreSQL for relational data
  • Communication: Synchronous via HTTP

πŸ’»Technical Specifications

API Documentation​

Data Model/Schema​

Project Structure​

summerfest-admin-fe/
β”œβ”€β”€ .github/ # repository metadata and CI-related configuration
β”œβ”€β”€ app/
β”‚ β”œβ”€β”€ app.css # global stylesheet and shared visual tokens
β”‚ β”œβ”€β”€ root.tsx # root document, metadata, and global route shell entrypoint
β”‚ β”œβ”€β”€ routes.ts # file-based route registration via React Router flatRoutes
β”‚ β”œβ”€β”€ components/
β”‚ β”‚ β”œβ”€β”€ context/
β”‚ β”‚ β”‚ └── theme-provider.tsx # theme provider wrapper used by the app shell
β”‚ β”‚ β”œβ”€β”€ elements/ # custom product-specific UI building blocks
β”‚ β”‚ β”‚ β”œβ”€β”€ Button/ # shared button component wrapper
β”‚ β”‚ β”‚ β”œβ”€β”€ Card/ # card display wrapper
β”‚ β”‚ β”‚ β”œβ”€β”€ Dropzone/ # drag-and-drop upload utility components
β”‚ β”‚ β”‚ β”œβ”€β”€ FloatingButton/ # floating action button component
β”‚ β”‚ β”‚ β”œβ”€β”€ Input/ # form field abstractions and styled inputs
β”‚ β”‚ β”‚ β”œβ”€β”€ Layout/ # Navbar, Footer, and layout-related helpers
β”‚ β”‚ β”‚ β”œβ”€β”€ Loader/ # loading state component
β”‚ β”‚ β”‚ β”œβ”€β”€ Modals/ # modal dialogs for confirmation and UX flows
β”‚ β”‚ β”‚ β”œβ”€β”€ Pagination/ # pagination component for submission tables
β”‚ β”‚ β”‚ β”œβ”€β”€ SVG/ # inline SVG components
β”‚ β”‚ β”‚ └── Stack/ # layout stack abstraction
β”‚ β”‚ β”œβ”€β”€ icons/ # social and interface icon components
β”‚ β”‚ β”œβ”€β”€ ui/ # reusable Radix/shadcn-style primitive components
β”‚ β”‚ β”œβ”€β”€ error.tsx # shared error presentation component
β”‚ β”‚ β”œβ”€β”€ loading.tsx # shared loading fallback component
β”‚ β”‚ └── utils/ # frontend helper utilities for file, S3, and scroll behavior
β”‚ β”œβ”€β”€ hooks/
β”‚ β”‚ β”œβ”€β”€ use-mobile.ts # responsive state helper
β”‚ β”‚ β”œβ”€β”€ use-toast.ts # toast state helper
β”‚ β”‚ └── useLogout.ts # logout flow helper
β”‚ β”œβ”€β”€ lib/
β”‚ β”‚ β”œβ”€β”€ auth.server.ts # cookie handling and backend token verification
β”‚ β”‚ β”œβ”€β”€ download.ts # browser-side download helpers
β”‚ β”‚ β”œβ”€β”€ fetch.server.ts # server-side authenticated API fetch wrapper
β”‚ β”‚ β”œβ”€β”€ fetch.ts # client-side API helper
β”‚ β”‚ β”œβ”€β”€ prisma.ts # Prisma client bootstrap
β”‚ β”‚ β”œβ”€β”€ utils.ts # shared utility helpers
β”‚ β”‚ └── generated/ # generated Prisma client artifacts
β”‚ β”œβ”€β”€ modules/
β”‚ β”‚ β”œβ”€β”€ LoginModule/ # login page UI, loader, and action
β”‚ β”‚ β”œβ”€β”€ DashboardIndexModule/ # dashboard landing page UI, loader, and action
β”‚ β”‚ β”œβ”€β”€ DatathonModule/ # Datathon submission management UI and mutations
β”‚ β”‚ └── SistechModule/ # Sistech submission management UI and mutations
β”‚ └── routes/
β”‚ β”œβ”€β”€ _page.tsx # shared public layout wrapper
β”‚ β”œβ”€β”€ _page._index.tsx # landing/login route
β”‚ β”œβ”€β”€ _page.dashboard._index.tsx # dashboard home route
β”‚ β”œβ”€β”€ _page.dashboard.datathon.tsx # Datathon admin route
β”‚ β”œβ”€β”€ _page.dashboard.sistech.tsx # Sistech admin route
β”‚ β”œβ”€β”€ api.logout.tsx # logout route that clears auth cookie
β”‚ β”œβ”€β”€ api.datathon.submissions.$submissionId.download.tsx # single Datathon download proxy
β”‚ β”œβ”€β”€ api.datathon.submissions.download-bulk.tsx # bulk Datathon ZIP export route
β”‚ β”œβ”€β”€ api.datathon.submissions.download-csv.tsx # Datathon CSV export proxy
β”‚ β”œβ”€β”€ api.sistech.submissions.$submissionId.download.tsx # single Sistech download proxy
β”‚ β”œβ”€β”€ api.sistech.submissions.download-bulk.tsx # bulk Sistech ZIP export route
β”‚ └── api.sistech.submissions.download-csv.tsx # Sistech CSV export proxy
β”œβ”€β”€ config/
β”‚ β”œβ”€β”€ cdn.ts # CDN-related constants
β”‚ β”œβ”€β”€ config.ts # runtime app configuration helpers
β”‚ └── ulaskelas-cdn.ts # additional CDN constant definitions
β”œβ”€β”€ docs/
β”‚ └── tech-doc.md # technical documentation for this frontend
β”œβ”€β”€ public/
β”‚ └── favicon.ico # static favicon asset
β”œβ”€β”€ scripts/
β”‚ └── generate-module-and-page.mjs # scaffolding helper for module/page generation
β”œβ”€β”€ Dockerfile # container build definition
β”œβ”€β”€ package.json # project manifest and npm scripts
β”œβ”€β”€ pnpm-lock.yaml # dependency lockfile
β”œβ”€β”€ react-router.config.ts # React Router runtime/build configuration
β”œβ”€β”€ tsconfig.json # TypeScript configuration
└── vite.config.ts # Vite build configuration

Components​

LayerPathsResponsibility
App Configuration and Metadataapp/root.tsx, app/routes/_page.tsx, app/components/context/theme-provider.tsx, app/components/elements/Layout/*Initializes the global admin shell, including global CSS, metadata, Google Fonts, favicon links, route-level error boundaries, theme provider wiring, shared navbar/footer layout, toast rendering, and logged-in user detection from the request cookie.
Authentication Entry Moduleapp/routes/_page._index.tsx, app/modules/LoginModule/*, app/lib/auth.server.tsHandles the unauthenticated admin entry flow, including login form rendering, zod validation, backend authentication, admin_token cookie management, token verification against admin/verify-token/, and redirect into the protected dashboard.
Dashboard Landing Moduleapp/routes/_page.dashboard._index.tsx, app/modules/DashboardIndexModule/*Renders the authenticated dashboard landing page, checks access state, and serves as the module selection entry point before admins move into Datathon or Sistech submission management.
Datathon Admin Moduleapp/routes/_page.dashboard.datathon.tsx, app/modules/DatathonModule/*Handles the Datathon admin workflow, including paginated submission loading, client-side search across team and member data, verification toggles, deletion with confirmation, and triggering single-file, CSV, and bulk ZIP export flows.
Sistech Admin Moduleapp/routes/_page.dashboard.sistech.tsx, app/modules/SistechModule/*Handles the Sistech admin workflow, including paginated submission loading, client-side search, server-driven filtering by program and path, deletion with confirmation, and triggering single-file, CSV, and bulk ZIP export flows.
UI Component Layerapp/components/elements/, app/components/ui/, app/components/icons/*Provides the reusable presentation layer for the admin panel, including layout shell pieces, buttons, cards, inputs, pagination, modals, loaders, inline SVGs, and lower-level Radix-based primitives such as dialogs, tables, tabs, selects, toasts, and related interaction patterns.
Frontend Utility Layerapp/hooks/, app/components/utils/, app/lib/fetch.ts, app/lib/fetch.server.ts, app/lib/download.ts, app/lib/utils.tsCentralizes shared frontend helpers such as logout flow, responsive state, toast state, scroll and file utilities, authenticated server-side API calls, generic client-side fetch helpers, and browser-side download handling with filename extraction from Content-Disposition.
Proxy Layerapp/routes/api.datathon.submissions.$submissionId.download.tsx, app/routes/api.datathon.submissions.download-csv.tsx, app/routes/api.datathon.submissions.download-bulk.tsx, app/routes/api.sistech.submissions.$submissionId.download.tsx, app/routes/api.sistech.submissions.download-csv.tsx, app/routes/api.sistech.submissions.download-bulk.tsxProvides authenticated backend-facing download routes for the admin UI, including single submission downloads, CSV export proxies, and bulk ZIP generation that iterates paginated backend data, fetches related submission files, and assembles downloadable archives with jszip.
Configuration Layerconfig/, app/lib/prisma.ts, app/lib/generated/Stores runtime constants and environment-dependent configuration, while also containing generated client artifacts and supporting library setup that are kept separate from route and module UI logic.

☁️ Operational Playbook

Infrastructure​

Environment Variables​

KeyDescriptionDefault (Dev)Sensitive?
API_URLBackend staging APIhttps://stg.api.event.ristek.cs.ui.ac.id/api/No
API_URLBackend APIhttps://api.event.ristek.cs.ui.ac.id/api/No

πŸ™‹Questions

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