Vehicle Fleet Management
The Vehicles page lets you manage your entire fleet. Vehicles can be added manually or imported from Turo data, and each vehicle has a detail page showing photos, status, and financial performance.Adding Vehicles
Auto-creation from CSV Import
Auto-creation from CSV Import
When you import a Trip Earnings CSV, any new vehicle names that don’t match existing records are automatically created. The vehicle is linked to future trips by name matching.
Manual Add
Manual Add
Use the
AddVehicleModal to enter vehicle details: year, make, model, VIN, license plate, and status. VIN decoding is supported to auto-fill make/model/year.Vehicle Detail Page
Each vehicle has a dedicated page at/vehicles/[id] showing:
- Photo gallery — Up to 15 photos managed via
PhotoUploader - Vehicle info — Year, make, model, VIN, license plate, status
- Financial summary — Earnings, expenses, profit, and margin for that vehicle
- Trip history — All trips for the vehicle with the same filtering as the main bookings page
- Documents — Associated documents (registration, insurance, etc.)
Photo Management
ThePhotoUploader and VehiclePhotoSection components handle:
- Upload up to 15 photos per vehicle
- Drag-and-drop reordering
- Set a primary photo (used as thumbnail across the app)
- Delete individual photos
- Photos are stored in Supabase Storage
Status Lifecycle
Vehicles follow this status progression:| Status | Meaning |
|---|---|
active | Currently listed and available for rental |
inactive | Temporarily unlisted (maintenance, seasonal, etc.) |
sold | Vehicle has been sold, retained for historical reporting |
deleted | Soft-deleted with confirmation via DeleteVehicleDialog |
Depreciation Tracking
TheDepreciationWidget on the vehicle detail page shows estimated depreciation based on vehicle age and usage, helping hosts understand true cost of ownership.
Key Components
| Component | Purpose |
|---|---|
AddVehicleModal | Form for manually adding a vehicle |
PhotoUploader | Upload and manage vehicle photos |
VehiclePhotoSection | Photo gallery display on detail page |
DeleteVehicleDialog | Confirmation dialog for soft delete |
DepreciationWidget | Depreciation estimate display |
Data Layer
Vehicle CRUD operations are insrc/lib/db/index.ts. The useVehicles hook (src/hooks/useVehicles.ts) provides fetching, creation, update, and delete. Photo operations use src/hooks/useVehiclePhotos.ts backed by src/lib/db/storage.ts.