How caiofugii/sanorte-vistorias-frontend works
Sanorte Vistorias is a field-inspection frontend for quality, safety, and related operational work, integrated with a NestJS API. The principal workflow is to sign in, select the inspection context and checklist, record and manage inspection results, then review outcomes through lists, dashboards, and analytics. Administration covers reference data, checklists, teams, contracts, service orders, and investment works; reporting includes report forms and PDF generation. The graph follows shown routing and repository calls. Several page-to-data relationships and unsampled subsystem internals are not shown, so they are omitted rather than inferred.
Main entry points: router.tsx Role-aware router · App.tsx Application shell · AppRepository.ts Application repository · NewInspectionPage.tsx Create inspection
Components 26
App access
- Application shell
src/app/App.tsx - Role-aware router
src/app/router.tsx - Authenticated shell
src/app/AppShell.tsx - Login page
src/pages/LoginPage.tsx
Inspection workflow
- Create inspection
src/pages/NewInspectionPage.tsx - Fill inspection
src/pages/FillInspectionPage.tsx - Inspection detail
src/pages/InspectionDetailPage.tsx - Inspection lists
src/pages/InspectionsPage.tsx
Operations administration
- Checklist editor
src/pages/ChecklistEditorPage.tsx - Service orders
src/pages/ServiceOrdersPage.tsx - Reference management
src/pages - Investment works
src/pages/InvestmentWorksPage.tsx
Analytics reports
- Dashboard
src/pages/DashboardPage.tsx - Quality and safety analytics
src/pages/analytics - Report forms
src/pages/ReportFormPage.tsx - Inspection PDF
src/utils/inspectionPdf.ts - Report PDF templates
src/utils/report-pdf/templates
Data and domain
- Authentication state
src/stores/authStore.ts - Reference state
src/stores/referenceStore.ts - Inspection state
src/stores/inspectionStore.ts - Application repository
src/repositories/AppRepository.ts - API repository
src/api/repositories/ApiRepository.ts - HTTP client
src/api/apiClient.ts - Inspection rules
src/domain/rules
Other components
- Field user
- NestJS API
Connections 24
- Field user → Application shell: opens
- Application shell → Role-aware router: mounts routes
src/app/App.tsx - Application shell → Reference state: loads references
src/app/App.tsx - Application shell → Authentication state: loads identity
src/app/App.tsx - Role-aware router → Authenticated shell: wraps protected routes
src/app/router.tsx - Role-aware router → Login page: routes to
src/app/router.tsx - Role-aware router → Create inspection: routes to
src/app/router.tsx - Role-aware router → Fill inspection: routes to
src/app/router.tsx - Role-aware router → Inspection detail: routes to
src/app/router.tsx - Role-aware router → Inspection lists: routes to
src/app/router.tsx - Role-aware router → Checklist editor: routes to
src/app/router.tsx - Role-aware router → Service orders: routes to
src/app/router.tsx - Role-aware router → Investment works: routes to
src/app/router.tsx - Role-aware router → Dashboard: routes to
src/app/router.tsx - Role-aware router → Quality and safety analytics: routes to
src/app/router.tsx - Role-aware router → Report forms: routes to
src/app/router.tsx - Authentication state → Application repository: delegates auth
src/stores/authStore.ts - Reference state → Application repository: loads cached data
src/stores/referenceStore.ts - Create inspection → Application repository: creates inspection
src/pages/NewInspectionPage.tsx - Create inspection → Inspection rules: applies rules
src/pages/NewInspectionPage.tsx - Application repository → API repository: delegates operations
src/repositories/AppRepository.ts - API repository → HTTP client: sends requests
src/api/repositories/ApiRepository.ts - HTTP client → NestJS API: calls API
README.md - Inspection PDF → Report PDF templates: shares PDF layout