How sumeshpatva97/cctv-admin-panel works
This is a role-based React application for CCTV operations and workforce attendance. Users enter through authenticated, permission-guarded routes; feature screens manage operational data, camera monitoring, attendance corrections, reporting and employee self-service through a shared API client. The repository excerpts show route dispatch, session handling and list-query plumbing. Most individual feature implementations were not sampled, so those documented capabilities are represented at feature level; the live-stream service relationship is left unverified.
Main entry points: routes.tsx Guarded routes · App.tsx Application · client.ts API client · live-monitoring Live monitoring
Components 20
App runtime
- Application
src/app/App.tsx - Guarded routes
src/routes/routes.tsx - App shell
src/components/layout/AppShell.tsx
Workforce operations
- Employees and departments
src/features/employees - Attendance and corrections
src/features/attendance - Shifts and work hours
src/features/shifts - Employee self-service
src/features/self-service
CCTV operations
- Camera management
src/features/cameras - Live monitoring
src/features/live-monitoring - WHEP player
src/features/live-monitoring/player/WhepClient.ts
Insights and access
- Dashboard
src/features/dashboard - Reports
src/features/reports - Audit logs
src/features/audit - Users and roles
src/features/users-roles - Organization settings
src/features/settings
Shared services
- Session and permissions
src/state/auth/AuthProvider.tsx - Query and list state
src/hooks/useListQuery.ts - API client
src/services/api/client.ts
Other components
- App users
- CCTV API
Connections 20
- App users → Application: use
- Application → Guarded routes: renders routes
src/app/App.tsx - Application → Session and permissions: provides session
- Guarded routes → App shell: mounts shell
src/routes/routes.tsx - Guarded routes → Employees and departments: dispatches
src/routes/routes.tsx - Guarded routes → Attendance and corrections: dispatches
src/routes/routes.tsx - Guarded routes → Shifts and work hours: dispatches
src/routes/routes.tsx - Guarded routes → Employee self-service: dispatches
src/routes/routes.tsx - Guarded routes → Camera management: dispatches
src/routes/routes.tsx - Guarded routes → Live monitoring: dispatches
src/routes/routes.tsx - Guarded routes → Dashboard: dispatches
src/routes/routes.tsx - Guarded routes → Reports: dispatches
src/routes/routes.tsx - Guarded routes → Audit logs: dispatches
src/routes/routes.tsx - Guarded routes → Users and roles: dispatches
src/routes/routes.tsx - Guarded routes → Organization settings: dispatches
src/routes/routes.tsx - Session and permissions → API client: requests session
src/state/auth/AuthProvider.tsx - Query and list state → API client: loads lists
src/hooks/useListQuery.ts - API client → CCTV API: HTTP requests
- Live monitoring → WHEP player: uses player
src/features/live-monitoring/player/WhepClient.ts - WHEP player → CCTV API: requests stream