Original Idea
Fleet Maintenance Logger A mobile app that scans VINs, logs odometers, and schedules service reminders to cut downtime.
Product Requirements Document: FleetFlow Maintenance Pro
1. Executive Summary
FleetFlow Maintenance Pro is a high-performance, mobile-first operations platform designed to eliminate commercial fleet downtime caused by manual tracking errors and missed service intervals. By leveraging AI-powered VIN scanning, "Local-First" data synchronization, and automated maintenance scheduling, the app provides fleet managers and drivers with a real-time, high-integrity health dashboard for their entire vehicle registry.
2. Problem Statement
Fleet managers currently rely on fragmented manual logs, spreadsheets, or outdated software that lacks mobile accessibility. This leads to:
- Costly Downtime: Missed preventive maintenance resulting in catastrophic engine/part failure.
- Data Inaccuracy: Manual VIN and odometer entry errors (typos) leading to incorrect parts ordering and non-compliance.
- Visibility Gaps: Drivers in remote areas with poor connectivity cannot log data, leaving managers "blind" to vehicle health for days.
3. Goals & Success Metrics
- Goal 1: Reduce unscheduled maintenance downtime by 20% within the first six months.
- Goal 2: Achieve 99.9% VIN data accuracy through automated OCR and NHTSA validation.
- Goal 3: Ensure 100% data availability in offline/low-connectivity environments.
- Success Metric: Average time to log a service event should be under 45 seconds.
4. User Personas
| Persona | Role | Key Needs | | :--- | :--- | :--- | | Danny the Driver | Commercial Driver | Quick data entry, mobile scanning, knowing if his truck is "safe to go." | | Miguel the Manager | Fleet Manager | Compliance reports (DOT), cost tracking, high-level health overview. | | Tammy the Tech | Maintenance Technician | Historical repair logs, specific vehicle specs, updating work orders. |
5. User Stories
- As a Driver, I want to scan a barcode or text VIN so that I don't have to manually type 17 characters.
- As a Driver, I want to log my odometer reading even when I have no cell service so that my records stay up to date.
- As a Manager, I want to see a Red/Yellow/Green status for every vehicle so that I can prioritize repairs.
- As a Technician, I want to upload a photo of a receipt or work order so that there is a digital paper trail for every service.
- As a Manager, I want to receive a push notification when a vehicle is within 500 miles of a required oil change.
6. Functional Requirements
6.1 Vehicle Onboarding & VIN Scanning
- The system shall use Anyline SDK or Vision Camera v5.x to scan VINs from windshields and door jambs.
- The system shall validate the 17-digit VIN using the NHTSA v4.01 API to auto-populate Make, Model, and Year.
- Manual override shall be available for legacy vehicles (pre-1981).
6.2 Odometer & Usage Tracking
- Daily odometer entry with automated mileage calculation since the last entry.
- Validation logic to prevent "mileage rollback" entries (e.g., current entry cannot be lower than the previous entry).
6.3 Maintenance Scheduling & Reminders
- Recurring triggers based on mileage (e.g., every 5,000 miles) or time (e.g., every 6 months).
- Automated push notifications and email alerts via SendGrid.
6.4 Service Logs & History
- Digital repository for all service events including cost, technician name, and part numbers.
- Camera integration for receipt and work order photo uploads.
7. Technical Requirements
7.1 Tech Stack (2026 Standards)
- Frontend: React Native 0.83.x (Expo SDK 55) with New Architecture (Fabric/TurboModules) enabled.
- State Management: TanStack Query v5 (Server) + Zustand (Local).
- Local Storage: WatermelonDB for relational local-first data; MMKV for high-speed caching.
- Backend: Node.js 22 (LTS) with Express.
- Database: PostgreSQL 17 with BRIN indexing for high-frequency logs and UUID v7 for primary keys.
- Authentication: Auth0 with Role-Based Access Control (RBAC) and CIBA for high-risk technician actions.
7.2 Integrations
- NHTSA vPIC API (v4.01): For VIN decoding.
- Google Cloud Vision API: For OCR processing of physical receipts.
- Anyline SDK: Specialized automotive OCR for metallic/curved surfaces.
8. Data Model
8.1 Vehicle Entity
id: UUID v7 (Primary Key)vin: String (Unique, 17 chars)make_model_year: String (From NHTSA)current_odometer: Integerstatus: Enum (HEALTHY, WARNING, CRITICAL)organization_id: UUID (Multi-tenant support)
8.2 ServiceRecord Entity
id: UUID v7vehicle_id: FK -> Vehicle.idservice_type: String (e.g., "Brake Pad Replacement")odometer_at_service: Integerreceipt_url: String (S3 Link)completed_at: Timestamp
9. API Specification
POST /api/v1/vehicles/decode
- Request:
{ "vin": "1234..." } - Response:
{ "make": "Freightliner", "model": "Cascadia", "year": 2024, "status": "valid" }
PATCH /api/v1/vehicles/:id/odometer
- Request:
{ "reading": 55000, "timestamp": "2026-01-15T10:00:00Z" } - Response:
200 OK(Triggers maintenance check in background)
10. UI/UX Requirements
- Dashboard: A "Traffic Light" system (Red/Yellow/Green) for fleet health.
- Scan Interface: A camera overlay with a "Region of Interest" (ROI) box specifically sized for VIN plates.
- Offline Indicator: A subtle sync status icon (Cloud-check or Cloud-sync) showing pending uploads.
- Accessibility: High-contrast buttons and large input fields for drivers wearing work gloves.
11. Non-Functional Requirements
- Performance: UI must maintain 60fps; JS execution off-loaded via React Native Worklets.
- Offline Mode: App must allow full logging functionality without a network connection.
- Security: AES-256 encryption at rest; JWT-based API authentication.
- Scalability: Database partitioning via
pg_partmanto handle millions of odometer logs.
12. Out of Scope
- Real-time GPS turn-by-turn navigation.
- Payroll or driver salary management.
- Direct parts purchasing/e-commerce integration (Phase 2).
13. Risks & Mitigations
| Risk | Mitigation | | :--- | :--- | | API Downtime (NHTSA) | Cache common VIN patterns locally; allow manual entry if API is unreachable. | | Hardware Limitations | Use Anyline/Scandit to handle low-end camera sensors on budget driver phones. | | Data Conflict | Implement "Last-Write-Wins" resolution with timestamp validation in WatermelonDB. |
14. Implementation Tasks
Phase 1: Project Setup & Infrastructure
- [ ] Initialize project with React Native 0.83 and Expo SDK 55
- [ ] Enable New Architecture (
newArchEnabled=trueingradle.properties) - [ ] Set up Node.js 22 Express server with TypeScript
- [ ] Configure PostgreSQL 17 with UUID v7 extension
- [ ] Initialize Auth0 tenant and define RBAC roles (Driver, Manager, Technician)
Phase 2: Core Data & Offline Engine
- [ ] Set up WatermelonDB schema for Vehicles and Odometer Logs
- [ ] Implement MMKV for local preference caching
- [ ] Build background sync worker using
react-native-background-actions - [ ] Implement exponential backoff for failed sync attempts
Phase 3: VIN & Odometer Features
- [ ] Integrate Anyline SDK for VIN scanning
- [ ] Create Node.js service for NHTSA v4.01 API integration
- [ ] Build Odometer entry UI with "mileage rollback" validation
- [ ] Implement BRIN indexing on Odometer table for performance
Phase 4: Fleet Management Dashboard
- [ ] Build "Traffic Light" Fleet Health Dashboard
- [ ] Implement TanStack Query for real-time dashboard updates
- [ ] Create PDF report generator for DOT compliance
- [ ] Configure SendGrid for automated service reminders
Phase 5: Security & Quality Assurance
- [ ] Implement AES-256 encryption for local storage
- [ ] Perform load testing on PostgreSQL partitioning
- [ ] Conduct field testing in low-connectivity zones
- [ ] Finalize CI/CD pipeline with automated Play Store/App Store deployments