Documentation Index
Fetch the complete documentation index at: https://dhanurgo.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Document Management
The Documents page provides centralized storage for all fleet-related paperwork. Track registrations, insurance policies, inspections, and 40+ other document types with expiry alerts and health scoring.Uploading Documents
UseDocumentUploadDialog to upload a document with:
- File — PDF, image, or other document file (stored in Supabase Storage)
- Document type — Selected from 40+ predefined types
- Vehicle — Associate with a specific vehicle (optional)
- Expiry date — When the document expires (optional but recommended)
- Notes — Free-text description
Document Types
Documents are organized into categories:| Category | Example Types |
|---|---|
| Registration | Vehicle registration, title, temporary plates |
| Insurance | Liability policy, comprehensive, gap insurance |
| Inspection | State inspection, emissions test, safety check |
| Maintenance | Service records, repair receipts, warranty docs |
| Legal | Lease agreement, lien release, power of attorney |
| Tax | 1099 forms, depreciation schedules, business license |
| Rental | Turo listing agreement, guest damage claims |
| Other | Miscellaneous documentation |
Document Health Score
TheFleetHealthBar component calculates a health score as a percentage:
Expiry Tracking
Each document can have an expiry date. The system provides:- Visual indicators — Color-coded badges showing valid, expiring soon, or expired status
- Notification alerts — Upcoming expirations appear in the notification center
- Health impact — Expired documents lower the fleet health score
Document Cards
DocumentCard displays each document with:
- Document type icon and label
- Associated vehicle name
- Upload date and expiry date
- Quick actions: download, view, delete
- Expiry status badge (valid / expiring / expired)
Key Components
| Component | Purpose |
|---|---|
DocumentUploadDialog | Upload form with type selection and expiry |
FleetHealthBar | Fleet-wide document health percentage |
DocumentCard | Individual document display with actions |
Data Layer
Documents are stored in thedocuments table with files in Supabase Storage. Operations are in src/lib/db/documents.ts. The useDocuments hook (src/hooks/useDocuments.ts) handles fetching and CRUD.