How dieu-merci-ndenga/fieldsync works
FieldSync is an offline-first inspection and photo-reporting product. A technician edits inspections and checklists in the mobile app; the SyncEngine records local changes and queued photos, then pushes, uploads, and pulls when connectivity permits. The API validates and merges operations, records history and idempotency state, and serves photo uploads. The README documents search, filters, restore, conflict resolution, and browser support; unsampled implementation details are represented at subsystem level, with only documented relationships shown where source excerpts do not establish calls.
Main entry points: App.tsx App shell · InspectionDetail.tsx Inspection detail · api.ts API client · app.module.ts API composition
Components 24
Mobile experience
- App shell
mobile/App.tsx - Inspection list
mobile/src/ui/InspectionList.tsx - Inspection detail
mobile/src/ui/InspectionDetail.tsx - Photo viewer
mobile/src/ui/PhotoViewer.tsx - UI components
mobile/src/ui/components.tsx - Theme
mobile/src/theme.ts
Offline data and sync
- Sync engine
mobile/src/core/engine.ts - Local store
mobile/src/db/sqliteStore.ts - Browser store
mobile/src/db/sqliteStore.web.ts - API client
mobile/src/api.ts - Photo storage
mobile/src/platform/photoStorage.ts - Upload adapter
mobile/src/platform/upload.ts - Settings adapter
mobile/src/platform/settings.ts
API and reconciliation
- Sync routes
backend/src/sync/sync.controller.ts - Operation validation
backend/src/sync/validation.ts - Sync service
backend/src/sync/sync.service.ts - Three-way merge
backend/src/sync/merge.ts - Photo routes
backend/src/photos.controller.ts - Auth guard
backend/src/auth.guard.ts - API composition
backend/src/app.module.ts
Server persistence
- Data entities
backend/src/entities.ts - PostgreSQL
- Photo files
Other components
- Technician
Connections 35
- Technician → App shell: uses
README.md - App shell → Sync engine: creates
mobile/App.tsx - App shell → Local store: opens
mobile/App.tsx - App shell → API client: configures
mobile/App.tsx - App shell → Settings adapter: loads
mobile/App.tsx - App shell → Inspection list: renders
mobile/App.tsx - App shell → Inspection detail: renders
mobile/App.tsx - App shell → UI components: uses
mobile/App.tsx - Inspection detail → Sync engine: edits through
mobile/src/ui/InspectionDetail.tsx - Inspection detail → Photo storage: persists photos
mobile/src/ui/InspectionDetail.tsx - Inspection detail → Photo viewer: shows
mobile/src/ui/InspectionDetail.tsx - Inspection detail → API client: requests history
mobile/src/ui/InspectionDetail.tsx - Inspection list → UI components: uses
mobile/src/ui/InspectionList.tsx - Inspection detail → UI components: uses
mobile/src/ui/InspectionDetail.tsx - UI components → Theme: reads
mobile/src/ui/components.tsx - Inspection list → Theme: reads
mobile/src/ui/InspectionList.tsx - Inspection detail → Theme: reads
mobile/src/ui/InspectionDetail.tsx - Sync engine → Local store: persists operations
README.md - Sync engine → API client: syncs through
README.md - API client → Upload adapter: uploads with
mobile/src/api.ts - API client → Sync routes: pushes and pulls
README.md - API client → Photo routes: sends photo requests
README.md - Sync routes → Operation validation: validates operations
backend/src/sync/sync.controller.ts - Sync routes → Sync service: dispatches
backend/src/sync/sync.controller.ts - Sync service → Three-way merge: merges patches
backend/src/sync/sync.service.ts - Sync service → Data entities: reads and writes
backend/src/sync/sync.service.ts - Photo routes → Data entities: stores photo metadata
backend/src/photos.controller.ts - Photo routes → Photo files: reads and writes
backend/src/photos.controller.ts - API composition → Sync routes: registers
backend/src/app.module.ts - API composition → Photo routes: registers
backend/src/app.module.ts - API composition → Sync service: provides
backend/src/app.module.ts - API composition → Auth guard: installs guard
backend/src/app.module.ts - API composition → Data entities: configures
backend/src/app.module.ts - Data entities → PostgreSQL: persisted in
README.md - Sync engine → Browser store: uses in browser
README.md