Pre-web changes

This commit is contained in:
Eric Gullickson
2025-11-05 11:04:48 -06:00
parent 45fea0f307
commit 0c3ed01f4b
25 changed files with 257 additions and 3538 deletions

View File

@@ -13,16 +13,17 @@ Primary entity for vehicle management consuming MVP Platform Vehicles Service. H
- `DELETE /api/vehicles/:id` - Soft delete vehicle
### Hierarchical Vehicle Dropdowns
**Status**: Dropdown methods are TODO stubs in vehicles service. Frontend directly consumes platform module endpoints.
**Status**: Vehicles service now proxies the platform vehicle catalog to provide fully dynamic dropdowns. Each selection step filters the next list, ensuring only valid combinations are shown.
Frontend consumes (via `/platform` module, not vehicles feature):
- `GET /api/platform/years` - Get all years
- `GET /api/platform/makes?year={year}` - Get makes for year
- `GET /api/platform/models?year={year}&make_id={make_id}` - Get models for make/year
- `GET /api/platform/trims?year={year}&make_id={make_id}&model_id={model_id}` - Get trims
- `GET /api/platform/engines?year={year}&make_id={make_id}&model_id={model_id}&trim_id={trim_id}` - Get engines
- `GET /api/platform/transmissions?year={year}&make_id={make_id}&model_id={model_id}` - Get transmissions
- `GET /api/platform/vehicle?vin={vin}` - Decode VIN
Sequence:
1. `GET /api/vehicles/dropdown/years``[number]` (latest to oldest).
2. `GET /api/vehicles/dropdown/makes?year={year}` `{ id, name }[]` (only makes produced in the selected year).
3. `GET /api/vehicles/dropdown/models?year={year}&make_id={id}` `{ id, name }[]` (models offered for that year/make).
4. `GET /api/vehicles/dropdown/trims?year={year}&make_id={id}&model_id={id}``{ id, name }[]` (valid trims for the chosen combination).
5. `GET /api/vehicles/dropdown/engines?year={year}&make_id={id}&model_id={id}&trim_id={id}` `{ id, name }[]` (engines tied to the trim).
6. `GET /api/vehicles/dropdown/transmissions?year={year}&make_id={id}&model_id={id}``{ id, name }[]` (static options: Automatic, Manual).
All dropdown endpoints call `Platform VehicleDataService` behind the scenes, reuse Redis caching, and return normalized `{ id, name }` payloads ready for the frontend.
## Authentication
- All vehicles endpoints (including dropdowns) require a valid JWT (Auth0).