How aeyvmor/cuddlebuddies works
ASTIG turns vehicle trips into geolocated infrastructure evidence, then supports officer review and work-order resolution. The principal path is mobile capture and offline queuing, API upload, asynchronous AI processing and persistence, then web review, prioritization, and work-order tracking. The README also documents analytics and a mock/demo web mode. Edges follow README-described workflow or shown calls; unsampled subsystems are represented at their exact directory paths, without asserting unverified internal wiring.
Main entry points: app.ts Authenticated API · App.tsx Operations dashboard · src Postgres and PostGIS · ingest.ts Image processing
Components 21
Field capture
- Capture app
apps/mobile/App.tsx - Image and GPS capture
apps/mobile/src/capture.ts - Trip sessions
apps/mobile/src/session.ts - Offline queue
apps/mobile/src/queue.ts - Private device storage
apps/mobile/src/storage.ts - Background uploader
apps/mobile/src/upload.ts
Processing and data
- Authenticated API
services/api/src/app.ts - Image processing
services/worker/src/ingest.ts - Vision provider
services/worker/src/provider.ts - Operational repositories
services/api/src/repositories - Postgres and PostGIS
database/src
Officer operations
- Operations dashboard
apps/web/src/App.tsx - Web API adapter
apps/web/src/api/httpClient.ts - Offline demo API
apps/web/src/api/mockClient.ts - Issue map and review
apps/web/src/components/IssueMap.tsx - Work-order panel
apps/web/src/components/WorkOrderPanel.tsx - Summary analytics
apps/web/src/components/AnalyticsPanel.tsx
Domain and contracts
- Risk and issue rules
packages/domain/src - Shared API schemas
packages/contracts/src
Other components
- Vehicle operator
- Authorized officer
Connections 26
- Vehicle operator → Capture app: starts trip
README.md - Capture app → Trip sessions: manages session
apps/mobile/App.tsx - Trip sessions → Image and GPS capture: samples trip
apps/mobile/src/session.ts - Image and GPS capture → Offline queue: records attempt
apps/mobile/src/queue.ts - Offline queue → Private device storage: persists queue
apps/mobile/src/storage.ts - Capture app → Background uploader: uploads captures
apps/mobile/App.tsx - Background uploader → Authenticated API: registers and uploads
README.md - Authenticated API → Image processing: triggers processing
README.md - Image processing → Vision provider: analyzes image
services/worker/src/ingest.ts - Image processing → Postgres and PostGIS: persists findings
README.md - Authorized officer → Operations dashboard: reviews issues
README.md - Operations dashboard → Web API adapter: requests issue data
apps/web/src/main.tsx - Operations dashboard → Offline demo API: selects demo data
apps/web/src/main.tsx - Web API adapter → Authenticated API: calls API
README.md - Authenticated API → Operational repositories: dispatches operations
services/api/src/app.ts - Authenticated API → Postgres and PostGIS: queries transaction
services/api/src/app.ts - Operational repositories → Postgres and PostGIS: reads and writes
- Postgres and PostGIS → Risk and issue rules: scores observations
database/src/observations.ts - Authenticated API → Shared API schemas: validates responses
services/api/src/app.ts - Image processing → Shared API schemas: validates detection
services/worker/src/ingest.ts - Operations dashboard → Issue map and review: presents issues
apps/web/src/App.tsx - Authorized officer → Work-order panel: reviews and resolves
README.md - Operations dashboard → Work-order panel: manages work orders
apps/web/src/App.tsx - Operations dashboard → Summary analytics: shows summaries
apps/web/src/App.tsx - Authorized officer → Authenticated API: creates and updates
README.md - Authenticated API → Postgres and PostGIS: stores work-order state
README.md