How poovannan-vp/smart_parking works
Smart Parking is a role-based React/Firebase application for live building availability, security occupancy and gate-log operations, and administrative management. Public visitors and staff enter through routed pages; staff authenticate against Firebase and a Firestore profile, then use role-specific dashboards. The main domain branches cover live parking/layout views, gate vehicle lifecycle and audit records, building/user administration, and developer diagnostics. Relationships are limited to README statements and sampled router, auth, and service references; unsampled page wiring is not inferred.
Main entry points: router.tsx Role-based routes · buildingService.ts Building records · firestore.ts Cloud Firestore · AdminDashboardPage.tsx Admin dashboard
Components 27
App and access
- Application providers
src/app/providers.tsx - Role-based routes
src/app/router.tsx - Authentication session
src/features/auth/hooks/useAuth.tsx - Login and profiles
src/features/auth/services/authServices.ts
Parking operations
- Public availability
src/features/home/pages/HomePage.tsx - Employee portal
src/features/employee/pages/EmployeeDashboardPage.tsx - Occupancy updates
src/features/security/pages/SecurityDashboardPage.tsx - Physical layout views
src/features/parking/components/PhysicalLayoutView.tsx - Layout subscriptions
src/features/parking/hooks/useLocationLayouts.ts - Slot status subscriptions
src/features/parking/hooks/useSlotStatuses.ts - Layout persistence
src/services/layoutService.ts
Gate monitoring
- Vehicle log workflow
src/services/vehicleLogService.ts - Vehicle log console
src/features/security/pages/VehicleLogsPage.tsx - Employee vehicles
src/services/employeeVehicleService.ts
Administration
- Reports and analytics
src/services/analyticsService.ts - Admin dashboard
src/features/admin/pages/AdminDashboardPage.tsx - Building management
src/features/admin/pages/BuildingsPage.tsx - User management
src/features/admin/pages/UsersPage.tsx - Create staff user
src/features/admin/pages/CreateUserPage.tsx - Layout editor and import
src/features/admin/pages/ParkingLayoutsPage.tsx
Diagnostics and data
- Building records
src/services/buildingService.ts - Cloud Firestore
src/config/firestore.ts - Developer diagnostics
src/features/developer/pages/DeveloperDashboardPage.tsx - Diagnostics service
src/services/developerDiagnosticsService.ts - Firebase Authentication
Other components
- Public visitor
- Staff user
Connections 38
- Public visitor → Role-based routes: opens app
src/app/router.tsx - Staff user → Role-based routes: opens portal
src/app/router.tsx - Application providers → Role-based routes: provides routes
src/app/providers.tsx - Role-based routes → Public availability: routes public
src/app/router.tsx - Role-based routes → Authentication session: guards staff
src/app/router.tsx - Role-based routes → Employee portal: routes employee
src/app/router.tsx - Role-based routes → Occupancy updates: routes security
src/app/router.tsx - Role-based routes → Vehicle log console: routes logs
src/app/router.tsx - Role-based routes → Admin dashboard: routes admin
src/app/router.tsx - Role-based routes → Building management: routes buildings
src/app/router.tsx - Role-based routes → User management: routes users
src/app/router.tsx - Role-based routes → Create staff user: routes creation
src/app/router.tsx - Role-based routes → Layout editor and import: routes layouts
src/app/router.tsx - Staff user → Authentication session: signs in
README.md - Authentication session → Login and profiles: loads profile
src/features/auth/hooks/useAuth.tsx - Login and profiles → Firebase Authentication: authenticates
src/features/auth/services/authServices.ts - Login and profiles → Cloud Firestore: reads profile
src/features/auth/services/authServices.ts - Public availability → Building records: shows availability
- Employee portal → Building records: reads buildings
src/features/employee/pages/EmployeeDashboardPage.tsx - Employee portal → Employee vehicles: manages vehicles
src/features/employee/pages/EmployeeDashboardPage.tsx - Occupancy updates → Building records: updates occupancy
- Physical layout views → Layout subscriptions: renders layouts
- Layout subscriptions → Layout persistence: subscribes layouts
src/features/parking/hooks/useLocationLayouts.ts - Slot status subscriptions → Cloud Firestore: reads status
- Layout persistence → Cloud Firestore: stores geometry
src/services/layoutService.ts - Vehicle log console → Vehicle log workflow: manages records
src/features/security/pages/VehicleLogsPage.tsx - Vehicle log workflow → Employee vehicles: finds vehicle owner
src/services/vehicleLogService.ts - Vehicle log workflow → Cloud Firestore: writes logs audit
src/services/vehicleLogService.ts - Admin dashboard → Reports and analytics: loads reports
src/features/admin/pages/AdminDashboardPage.tsx - Admin dashboard → Building records: loads buildings
src/features/admin/pages/AdminDashboardPage.tsx - Admin dashboard → Vehicle log workflow: loads log data
src/features/admin/pages/AdminDashboardPage.tsx - Building management → Building records: manages buildings
src/features/admin/pages/BuildingsPage.tsx - User management → Building records: loads assignments
src/features/admin/pages/UsersPage.tsx - Create staff user → Building records: loads buildings
src/features/admin/pages/CreateUserPage.tsx - Layout editor and import → Layout persistence: edits layouts
src/features/admin/pages/ParkingLayoutsPage.tsx - Layout editor and import → Building records: selects building
src/features/admin/pages/ParkingLayoutsPage.tsx - Developer diagnostics → Diagnostics service: views diagnostics
- Diagnostics service → Cloud Firestore: reads diagnostic data
src/services/developerDiagnosticsService.ts