# MotoVaultPro Navigation Map - Modified Feature Capsule Design ## Architecture Philosophy Each feature is a complete, self-contained capsule. Load ONE directory for 100% context. ## Quick Task Guide ### Working on a Feature ```bash # Load complete context cd backend/src/features/[feature-name]/ # Everything is here: # - API endpoints (api/) # - Business logic (domain/) # - Database operations (data/) # - Schema migrations (migrations/) # - External integrations (external/) # - All tests (tests/) # - Documentation (docs/) ``` ### Adding New Feature ```bash ./scripts/generate-feature-capsule.sh [feature-name] # Creates complete capsule structure with all subdirectories ``` ### Running Feature Migrations ```bash # Single feature npm run migrate:feature [feature-name] # All features (respects dependencies) npm run migrate:all ``` ### Testing Strategy ```bash # Test single feature (complete isolation) npm test -- features/[feature-name] # Test feature integration npm test -- features/[feature-name]/tests/integration # Test everything npm test ``` ## Feature Capsules ### Vehicles (Primary Entity) - Path: `backend/src/features/vehicles/` - External: NHTSA vPIC for VIN decoding - Dependencies: None (base feature) - Cache: VIN lookups for 30 days ### Fuel Logs - Path: `backend/src/features/fuel-logs/` - External: None - Dependencies: Vehicles (for vehicle_id) - Cache: User's logs for 5 minutes ### Maintenance - Path: `backend/src/features/maintenance/` - External: None - Dependencies: Vehicles (for vehicle_id) - Cache: Upcoming maintenance for 1 hour ### Stations - Path: `backend/src/features/stations/` - External: Google Maps API - Dependencies: None (independent) - Cache: Station searches for 1 hour