How cafm-system/cafm-frontend works
This is a React frontend for a property-management workflow covering resident maintenance tickets, technician ticket handling, administrative oversight, user management, and front-desk visitor registration. Users enter through routed role-specific pages; those pages present dashboards and forms, while service modules make authenticated API requests. The supplied excerpts show ticket and visitor operations, authentication, report downloads, and theme state. Some listed pages and services were not sampled, so their internal call relationships are left out rather than inferred.
Main entry points: App.jsx Route dispatcher · apiclient.js API client · AdminDashboard.jsx Admin dashboard · ticket.service.js Ticket service
Components 25
App and access
- Route dispatcher
src/App.jsx - Sign in
src/pages/auth/LoginPage.jsx - Account registration
src/pages/auth/RegisterPg.jsx - Authentication service
src/services/auth.service.js
Maintenance tickets
- Resident dashboard
src/pages/ResidentDashboad.jsx - Create ticket form
src/components/resident/CreateTicketDialog.jsx - Resident ticket detail
src/components/resident/residentTicketDialog.jsx - Technician dashboard
src/pages/technician/TechnicianDashboard.jsx - Technician actions
src/components/technician/TechnicianActions.jsx - Ticket card
src/components/common/ticketCard.jsx - Ticket service
src/services/ticket.service.js - Ticket data helpers
src/services/newTicketData.js - Ticket update data
src/services/ticketUpdatesData.js
Visitor management
- Front-desk dashboard
src/pages/frontDesk/FDeskDashBoard.jsx - Visitor registration
src/pages/frontDesk/VisitorRegForm.jsx - Visitor service
src/services/visitor.service.js
Administration
- Admin dashboard
src/pages/admin/AdminDashboard.jsx - User management
src/components/admin/AdminUsers.jsx - Reports analytics
src/components/admin/ReportsAnalytics.jsx - Visitor records
src/components/admin/TotalVisitorRecords.jsx - Report service
src/services/report.service.js
Shared services
- API client
src/services/apiclient.js - Theme state
src/hooks/useTheme.js
Other components
- User
- Backend API
Connections 33
- User → Route dispatcher: opens routes
src/App.jsx - Route dispatcher → Sign in: routes to
src/App.jsx - Route dispatcher → Account registration: routes to
src/App.jsx - Route dispatcher → Admin dashboard: routes to
src/App.jsx - Route dispatcher → User management: routes to
src/App.jsx - Route dispatcher → Front-desk dashboard: routes to
src/App.jsx - Route dispatcher → Visitor registration: routes to
src/App.jsx - Sign in → Authentication service: authenticates with
src/pages/auth/LoginPage.jsx - Account registration → Authentication service: registers through
src/pages/auth/RegisterPg.jsx - Authentication service → API client: sends requests
src/services/auth.service.js - Resident dashboard → API client: fetches tickets
src/pages/ResidentDashboad.jsx - Resident dashboard → Create ticket form: opens form
src/pages/ResidentDashboad.jsx - Resident dashboard → Resident ticket detail: opens details
src/pages/ResidentDashboad.jsx - Create ticket form → Ticket service: creates tickets
src/components/resident/CreateTicketDialog.jsx - Resident ticket detail → Ticket service: updates tickets
src/components/resident/residentTicketDialog.jsx - Resident ticket detail → Ticket data helpers: uses ticket data
src/components/resident/residentTicketDialog.jsx - Resident ticket detail → Ticket update data: uses update data
src/components/resident/residentTicketDialog.jsx - Technician dashboard → Ticket service: loads tickets
src/pages/technician/TechnicianDashboard.jsx - Technician dashboard → Ticket card: renders tickets
src/pages/technician/TechnicianDashboard.jsx - Technician actions → Ticket service: changes tickets
src/components/technician/TechnicianActions.jsx - Ticket service → API client: sends requests
src/services/ticket.service.js - Front-desk dashboard → Visitor registration: opens registration
src/pages/frontDesk/FDeskDashBoard.jsx - Front-desk dashboard → Visitor service: loads visitor data
src/pages/frontDesk/FDeskDashBoard.jsx - Visitor service → API client: sends requests
src/services/visitor.service.js - Admin dashboard → Reports analytics: renders reports
src/pages/admin/AdminDashboard.jsx - Admin dashboard → Visitor records: renders records
src/pages/admin/AdminDashboard.jsx - Admin dashboard → Ticket card: renders tickets
src/pages/admin/AdminDashboard.jsx - Reports analytics → Report service: downloads reports
src/components/admin/ReportsAnalytics.jsx - Visitor records → Report service: downloads reports
src/components/admin/TotalVisitorRecords.jsx - Report service → API client: sends requests
src/services/report.service.js - API client → Backend API: sends API calls
src/services/apiclient.js - Ticket card → Theme state: reads theme
src/components/common/ticketCard.jsx - Admin dashboard → Theme state: reads theme
src/pages/admin/AdminDashboard.jsx