How destinym01/shiftmanager works
ShiftManager is a restaurant shift-management web app. Users authenticate or register, then reach a role-aware dashboard: employees view their own shifts, while admins manage employees and create, edit, and delete shifts in a Spanish-localized calendar. The dashboard also presents employee and shift statistics. Firebase Auth handles identity, and Firestore stores employee profiles and shifts. The graph includes documented dashboard capabilities, but Dashboard and several page implementations were not sampled, so their internal wiring is shown only at the documented feature level.
Main entry points: App.tsx Routes and shell · Dashboard.tsx Dashboard · EmployeeManager.tsx Employee manager · ShiftCalendar.tsx Shift calendar
Components 20
Application shell
- App entry
src/main.tsx - Routes and shell
src/App.tsx - Route guards
src/components/RouteGuards.tsx - Dashboard
src/pages/Dashboard.tsx - Stats panel
src/components/StatsBar.tsx
Identity and access
- Login
src/pages/Login.tsx - Registration
src/pages/Register.tsx - Password reset
src/pages/ResetPassword.tsx - Auth state
src/context/AuthContext.tsx - Firebase Auth
Scheduling and staff
- Employee manager
src/components/EmployeeManager.tsx - Shift calendar
src/components/ShiftCalendar.tsx - Employee service
src/services/employeeService.ts - Shift service
src/services/shiftService.ts - Firestore
Shared services
- Input schemas
src/validation/schemas.ts - Toast feedback
src/context/ToastContext.tsx - Firestore error mapping
src/services/firestoreErrors.ts - Error boundary
src/components/ErrorBoundary.tsx
Other components
- User
Connections 31
- User → App entry: opens app
- App entry → Routes and shell: renders
- Routes and shell → Login: routes
- Routes and shell → Registration: routes
- Routes and shell → Password reset: routes
- Routes and shell → Route guards: checks access
- Route guards → Auth state: checks session
- Routes and shell → Dashboard: routes
- Auth state → Firebase Auth: observes session
- Auth state → Firestore: reads profile
- Login → Firebase Auth: authenticates
- Registration → Input schemas: validates
- Registration → Firebase Auth: creates account
- Registration → Firestore: writes profile
- Password reset → Firebase Auth: resets password
- Dashboard → Employee service: loads staff
- Dashboard → Shift service: loads shifts
- Dashboard → Stats panel: presents totals
- Dashboard → Employee manager: presents staff tools
- Dashboard → Shift calendar: presents schedule
- Employee manager → Input schemas: validates
- Employee manager → Employee service: manages staff
- Shift calendar → Input schemas: validates
- Shift calendar → Shift service: manages shifts
- Employee service → Firestore: reads and writes
- Shift service → Firestore: reads and writes
- Employee manager → Firestore error mapping: maps failures
- Shift calendar → Firestore error mapping: maps failures
- Employee manager → Toast feedback: reports outcome
- Shift calendar → Toast feedback: reports outcome
- Routes and shell → Error boundary: contains render errors