How esqi-meazza/doorprize-pindad-client works
Doorprize Client is a React frontend for participant check-in, live doorprize displays, and event administration. Participants enter through the landing page; operators use protected admin screens to manage the event, participants, prizes, groups, winners, and settings, with a dedicated projector view. Shared authentication state and reusable controls support these screens, while the backend and Socket.IO provide external services. The README documents the major capabilities; sampled source confirms route wiring, participant CRUD, and the socket client. Other screen-to-service details are not fully evidenced in the excerpts.
Main entry points: AppRoutes.jsx Route registry · Peserta.jsx Participant management · AuthContext.jsx Session and auth · socket.js Socket client
Components 24
Entry and routing
- App shell
src/App.jsx - Route registry
src/routes/AppRoutes.jsx - Auth guard
src/routes/ProtectedRoute.jsx - Participant check-in
src/pages/public/LandingPage.jsx
Event administration
- Admin layout
src/layouts/AdminLayout.jsx - Admin login
src/pages/admin/Login.jsx - Dashboard
src/pages/admin/Dashboard.jsx - Event management
src/pages/admin/MainEvent.jsx - Participant management
src/pages/admin/Peserta.jsx - Winner management
src/pages/admin/Pemenang.jsx - Prize management
src/pages/admin/Hadiah.jsx - Prize groups
src/pages/admin/KelompokHadiah.jsx - Event settings
src/pages/admin/Setting.jsx
Live displays
- Projector view
src/pages/admin/ProjectorDisplay.jsx - Public live display
src/pages/public/display/index.jsx
Shared application layer
- Session and auth
src/context/AuthContext.jsx - Browser storage
- Socket client
src/config/socket.js - Common controls
src/components/common - UI components
src/components/ui - UI state hooks
src/hooks
Other components
- Participant
- Event operator
- Application backend
Connections 31
- Participant → Participant check-in: checks in
- Event operator → Admin login: signs in
- App shell → Route registry: renders
src/App.jsx - Route registry → Participant check-in: routes to
src/routes/AppRoutes.jsx - Route registry → Public live display: routes to
src/routes/AppRoutes.jsx - Route registry → Admin login: routes to
src/routes/AppRoutes.jsx - Route registry → Auth guard: protects routes
src/routes/AppRoutes.jsx - Auth guard → Session and auth: checks session
src/routes/ProtectedRoute.jsx - Route registry → Admin layout: wraps admin
src/routes/AppRoutes.jsx - Route registry → Dashboard: routes to
src/routes/AppRoutes.jsx - Route registry → Event management: routes to
src/routes/AppRoutes.jsx - Route registry → Participant management: routes to
src/routes/AppRoutes.jsx - Route registry → Winner management: routes to
src/routes/AppRoutes.jsx - Route registry → Prize management: routes to
src/routes/AppRoutes.jsx - Route registry → Prize groups: routes to
src/routes/AppRoutes.jsx - Route registry → Event settings: routes to
src/routes/AppRoutes.jsx - Route registry → Projector view: routes to
src/routes/AppRoutes.jsx - Session and auth → Browser storage: reads and writes
src/context/AuthContext.jsx - Participant management → Application backend: CRUD requests
src/pages/admin/Peserta.jsx - Participant management → Session and auth: uses auth headers
src/pages/admin/Peserta.jsx - Participant check-in → Application backend: submits check-in
- Socket client → Application backend: connects realtime
src/config/socket.js - Public live display → Socket client: uses live updates
src/pages/public/display/index.jsx - Projector view → Socket client: uses live updates
src/pages/admin/ProjectorDisplay.jsx - Dashboard → Socket client: uses live updates
src/pages/admin/Dashboard.jsx - Admin layout → Common controls: uses confirmation
src/layouts/AdminLayout.jsx - Common controls → UI components: dialog uses
src/components/common/ConfirmDialog.jsx - Participant management → Common controls: uses controls
src/pages/admin/Peserta.jsx - Participant management → UI components: uses components
src/pages/admin/Peserta.jsx - Participant management → UI state hooks: uses state hooks
src/pages/admin/Peserta.jsx - Admin login → Session and auth: updates session
src/pages/admin/Login.jsx