How golfzaptw/anesthesia-form works
The platform supports anonymous, batch-aware satisfaction surveys for anesthesia-nursing students and an admin workflow for managing batches, schedules and form definitions, then reviewing and exporting results. The graph follows documented product capabilities and sampled calls; unsampled implementation details are represented only where the README/tree supports them.
Main entry points: firestore.ts Firestore operations · admin/page.tsx Admin dashboard · AuthContext.tsx Auth context · hub/page.tsx Survey hub
Components 23
Access & Hub
- Login page
app/login/page.tsx - Login / guest form
components/auth/LoginForm.tsx - Auth context
contexts/AuthContext.tsx - Survey hub
app/hub/page.tsx
Survey Workflow
- Form 1 route
app/forms/1/page.tsx - Form 2 route
app/forms/2/page.tsx - Form 3 route
app/forms/3/page.tsx - Teaching evaluation
components/forms/Form1.tsx - Faculty evaluation
components/forms/Form2.tsx - Staff evaluation
components/forms/Form3.tsx - Draft autosave
lib/useDraftAutoSave.ts
Persistence
- Firestore operations
lib/firestore.ts - Mock store
lib/mockStore.ts
Administration & Reporting
- Admin dashboard
app/admin/page.tsx - Form and batch editor
components/admin/FormEditor.tsx - Analytics calculations
lib/analytics.ts - Overview reporting
components/admin/tabs/OverviewTab.tsx - CSV export
lib/csv.ts - PDF export
lib/pdfExport.ts
Other components
- Student
- Administrator
- Browser local storage
- Firebase Auth / Firestore
Connections 31
- Student → Login page: opens
- Administrator → Login page: opens
- Login page → Login / guest form: renders
- Login / guest form → Auth context: signs in / registers
- Auth context → Firestore operations: reads / creates profile
- Auth context → Firebase Auth / Firestore: authenticates
- Auth context → Mock store: uses in mock mode
- Auth context → Survey hub: redirects after login
- Survey hub → Firestore operations: loads config and progress
- Survey hub → Form 1 route: links to
- Survey hub → Form 2 route: links to
- Survey hub → Form 3 route: links to
- Form 1 route → Teaching evaluation: renders
- Form 2 route → Faculty evaluation: renders
- Form 3 route → Staff evaluation: renders
- Teaching evaluation → Firestore operations: submits response
- Faculty evaluation → Firestore operations: submits response
- Staff evaluation → Firestore operations: submits response
- Faculty evaluation → Draft autosave: autosaves draft
- Draft autosave → Browser local storage: reads / writes
- Firestore operations → Firebase Auth / Firestore: reads / writes
- Firestore operations → Mock store: uses in mock mode
- Administrator → Admin dashboard: opens
- Admin dashboard → Auth context: checks current user
- Admin dashboard → Firestore operations: loads results and manages batches
- Admin dashboard → Form and batch editor: renders editor
- Form and batch editor → Firestore operations: saves config
- Admin dashboard → Analytics calculations: calculates statistics
- Admin dashboard → Overview reporting: renders reporting tab
- Overview reporting → CSV export: exports reports
- Admin dashboard → PDF export: generates PDF report