How thienphu-1910/unihub works
Uni-hub is a workshop-management application for organizers, students, and check-in staff. Users authenticate, browse or manage workshops, register, and attend with staff check-in; organizers also handle payments and student imports. The frontend routes role-specific pages and uses browser storage for offline check-in, while an Express backend exposes APIs and background workers. Source excerpts and the SOURCE INDEX establish many backend calls; several routes and subsystems are unsampled, so uncertain links are omitted.
Main entry points: App.jsx App routing · registration.service.js Registration workflow · payment.service.js Payment processing · api.js API client
Components 34
Web application
- App routing
frontend/src/App.jsx - Login and register
frontend/src/pages/Login.jsx - Workshop pages
frontend/src/pages/WorkshopsPage.jsx - Workshop detail
frontend/src/pages/WorkshopDetailPage.jsx - Check-in page
frontend/src/pages/CheckinPage.jsx - Auth state
frontend/src/store/useAuthStore.js - Offline check-in store
frontend/src/lib/indexedDB.js - API client
frontend/src/services/api.js - Auth client
frontend/src/services/authenticationService.js - Registration client
frontend/src/services/registrationService.js - Workshop client
frontend/src/services/workshopService.js - Check-in client
frontend/src/services/checkinService.js
Backend workflows
- Express API
backend/src/app.js - Auth routes
backend/src/routes/auth.route.js - Auth controller
backend/src/controllers/auth.controller.js - Authentication
backend/src/services/auth.service.js - Registration controller
backend/src/controllers/registration.controller.js - Registration workflow
backend/src/services/registration.service.js - Workshop controller
backend/src/controllers/workshop.controller.js - Workshop management
backend/src/services/workshop.service.js - Payment controller
backend/src/controllers/payment.controller.js - Payment processing
backend/src/services/payment.service.js - Student import
backend/src/services/studentSync.service.js
Background processing
- Registration queue
backend/src/jobs/queues/registration.queue.js - Registration worker
backend/src/jobs/workers/registration.worker.js - Payment queue
backend/src/jobs/queues/payment.queue.js
Data and integrations
- Registration repository
backend/src/repositories/registration.repository.js - Workshop repository
backend/src/repositories/workshop.repository.js - User repository
backend/src/repositories/user.repository.js - Payment repository
backend/src/repositories/payment.repository.js - Student import repository
backend/src/repositories/studentSync.repository.js - Supabase database
backend/src/config/db.js - Redis
backend/src/config/redis.js
Other components
- User
Connections 38
- User → App routing: uses
frontend/src/App.jsx - App routing → Login and register: routes to
frontend/src/App.jsx - App routing → Workshop pages: routes to
frontend/src/App.jsx - App routing → Workshop detail: routes to
frontend/src/App.jsx - App routing → Check-in page: routes to
frontend/src/App.jsx - App routing → Auth state: reads
frontend/src/App.jsx - App routing → Offline check-in store: reads
frontend/src/App.jsx - App routing → Check-in client: syncs through
frontend/src/App.jsx - Auth client → API client: calls
frontend/src/services/authenticationService.js - Auth client → Auth state: updates
frontend/src/services/authenticationService.js - Registration client → API client: calls
frontend/src/services/registrationService.js - Workshop client → API client: calls
frontend/src/services/workshopService.js - Check-in client → API client: calls
frontend/src/services/checkinService.js - Express API → Auth routes: mounts
backend/src/app.js - Express API → Registration controller: routes via
- Express API → Workshop controller: routes via
- Auth routes → Auth controller: dispatches
backend/src/routes/auth.route.js - Auth controller → Authentication: authenticates with
backend/src/controllers/auth.controller.js - Auth controller → User repository: looks up via
- Registration controller → Registration workflow: delegates to
backend/src/controllers/registration.controller.js - Workshop controller → Workshop management: delegates to
backend/src/controllers/workshop.controller.js - Payment controller → Payment processing: delegates to
backend/src/controllers/payment.controller.js - Payment controller → Registration workflow: uses
backend/src/controllers/payment.controller.js - Registration workflow → Registration repository: reads and writes
backend/src/services/registration.service.js - Registration workflow → Workshop repository: reads
backend/src/services/registration.service.js - Registration workflow → User repository: reads
backend/src/services/registration.service.js - Registration workflow → Redis: checks slots
backend/src/services/registration.service.js - Registration workflow → Registration queue: enqueues
backend/src/services/registration.service.js - Workshop management → Workshop repository: manages
backend/src/services/workshop.service.js - Payment processing → Payment repository: persists payment
backend/src/services/payment.service.js - Payment processing → Registration repository: updates registration
backend/src/services/payment.service.js - Payment processing → Payment queue: queues work
backend/src/services/payment.service.js - Student import repository → Supabase database: queries
backend/src/repositories/studentSync.repository.js - Workshop repository → Supabase database: queries
backend/src/repositories/workshop.repository.js - Registration worker → Registration repository: updates
backend/src/jobs/workers/registration.worker.js - Registration worker → Redis: uses
backend/src/jobs/workers/registration.worker.js - Payment queue → Payment processing: processed by
backend/src/services/payment.service.js - Student import → Student import repository: imports data
backend/src/services/studentSync.service.js