How abedrrahman/hvac-maintenance-app works
This is an offline HVAC maintenance reporting app. A technician selects a machine, creates a report, completes its staged checklist and supporting details, captures photos and signatures, then exports a PDF; reports and machine records remain on-device. The graph also includes machine/template administration and report search. Sampled source shows the main screen, repository, checklist, and PDF relationships; some feature links rely on README documentation because their implementation files were not sampled.
Main entry points: reports.ts Report repository · machines.ts Machine repository · [step].tsx Report wizard · pdfGenerator.ts PDF generator
Components 19
Report workflow
- Report list
app/index.tsx - Search and filters
app/reports.tsx - New report
app/new.tsx - Report wizard
app/report/[id]/[step].tsx - Report preview
app/report/[id]/view.tsx - Form components
components/ChecklistSection.tsx - Report loader
hooks/useReport.ts
HVAC domain
- Machine catalog
app/machines/index.tsx - Machine details
app/machines/[id].tsx - Custom templates
app/custom-templates.tsx - Checklist definitions
constants/checklists.ts - Dynamic chiller fields
utils/chillerFields.ts
Local data
- Report repository
db/repositories/reports.ts - Machine repository
db/repositories/machines.ts - SQLite database
db/database.ts - Database provider
context/DatabaseProvider.tsx
Report output
- PDF generator
services/pdfGenerator.ts - Native share sheet
Other components
- Technician
Connections 27
- Technician → Report list: opens
- Technician → New report: starts report
- Technician → Report wizard: completes steps
- Technician → Machine catalog: manages machines
- Technician → Custom templates: edits templates
- Report list → Report repository: loads reports
app/index.tsx - Search and filters → Report repository: searches reports
app/reports.tsx - New report → Report repository: creates report
app/new.tsx - New report → Machine repository: selects machine
app/new.tsx - Machine catalog → Machine repository: loads machines
app/machines/index.tsx - Machine details → Machine repository: loads machine
app/machines/[id].tsx - Machine details → Report repository: loads history
app/machines/[id].tsx - Report wizard → Report repository: saves report
app/report/[id]/[step].tsx - Report wizard → Checklist definitions: renders checklist
app/report/[id]/[step].tsx - Report wizard → Form components: renders fields
app/report/[id]/[step].tsx - Form components → Checklist definitions: uses definitions
components/ChecklistSection.tsx - Checklist definitions → Dynamic chiller fields: builds chiller fields
constants/checklists.ts - Report preview → Report loader: loads report
app/report/[id]/view.tsx - Report loader → Report repository: fetches full report
hooks/useReport.ts - Report preview → PDF generator: exports PDF
app/report/[id]/view.tsx - Report repository → SQLite database: reads and writes
db/repositories/reports.ts - Machine repository → SQLite database: reads and writes
db/repositories/machines.ts - Database provider → SQLite database: initializes
context/DatabaseProvider.tsx - Report repository → Machine repository: uses machine templates
db/repositories/reports.ts - PDF generator → Checklist definitions: formats checklist
services/pdfGenerator.ts - PDF generator → Dynamic chiller fields: formats chiller data
services/pdfGenerator.ts - PDF generator → Native share sheet: offers export