{ "version": "4.0.0", "architecture": "hybrid-platform-microservices-modular-monolith", "critical_requirements": { "mobile_desktop_development": "ALL features MUST be implemented and tested on BOTH mobile and desktop", "context_efficiency": "95%", "single_load_completeness": "100%", "feature_capsule_organization": "100%", "platform_service_independence": "100%", "hybrid_deployment_model": "100%", "production_only_development": true, "docker_first": true }, "ai_loading_strategy": { "project_overview": { "instruction": "Start with README.md for complete microservices context", "files": ["README.md"], "completeness": "100% - all navigation and distributed architecture information" }, "application_feature_work": { "instruction": "Load entire application feature directory (features are modules within monolith)", "pattern": "backend/src/features/{feature}/", "completeness": "100% - everything needed is in one directory, deployed together as single service" }, "platform_service_work": { "instruction": "Load platform services documentation for service architecture", "files": ["docs/PLATFORM-SERVICES.md"], "completeness": "100% - complete service architecture, API patterns, development workflow" }, "service_integration_work": { "instruction": "Load platform service docs + consuming application feature docs", "files": [ "docs/PLATFORM-SERVICES.md", "backend/src/features/{feature}/README.md" ], "completeness": "Complete service integration patterns" }, "cross_feature_work": { "instruction": "Load index.ts and README.md from each application feature", "pattern": [ "backend/src/features/{feature}/index.ts", "backend/src/features/{feature}/README.md" ] }, "debugging": { "instruction": "Start with feature README, expand to tests and docs", "pattern": [ "backend/src/features/{feature}/README.md", "backend/src/features/{feature}/tests/", "backend/src/features/{feature}/docs/TROUBLESHOOTING.md" ] }, "documentation": { "instruction": "Use docs/README.md for complete documentation index", "files": ["docs/README.md"], "completeness": "All documentation links and navigation" } }, "platform_services": { "mvp-platform-vehicles": { "type": "hierarchical_vehicle_api", "architecture": "3_container_microservice", "containers": ["db", "etl", "api"], "api_framework": "FastAPI", "database": "PostgreSQL with vpic schema", "port": 8000, "db_port": 5433, "endpoints": [ "GET /vehicles/makes?year={year}", "GET /vehicles/models?year={year}&make_id={make_id}", "GET /vehicles/trims?year={year}&make_id={make_id}&model_id={model_id}", "GET /vehicles/engines?year={year}&make_id={make_id}&model_id={model_id}", "GET /vehicles/transmissions?year={year}&make_id={make_id}&model_id={model_id}", "POST /vehicles/vindecode" ], "cache_strategy": "Year-based hierarchical caching", "data_source": "Weekly ETL from NHTSA MSSQL database", "auth": "Service token via PLATFORM_VEHICLES_API_KEY" } }, "application_features": { "tenant-management": { "path": "backend/src/features/tenant-management/", "type": "cross_cutting_feature", "self_contained": false, "database_tables": [], "status": "basic_implementation" }, "vehicles": { "path": "backend/src/features/vehicles/", "type": "platform_service_consumer", "self_contained": true, "platform_service": "mvp-platform-vehicles", "database_tables": ["vehicles"], "cache_strategy": "User vehicle lists: 5 minutes", "status": "ready_for_platform_migration" }, "fuel-logs": { "path": "backend/src/features/fuel-logs/", "type": "dependent_feature", "self_contained": true, "depends_on": ["vehicles"], "database_tables": ["fuel_logs"], "cache_strategy": "User logs: 5 minutes", "status": "implemented_tests_scaffolded" }, "maintenance": { "path": "backend/src/features/maintenance/", "type": "dependent_feature", "self_contained": true, "depends_on": ["vehicles"], "database_tables": ["maintenance_logs", "maintenance_schedules"], "cache_strategy": "Upcoming maintenance: 1 hour", "status": "basic_structure_implemented" }, "stations": { "path": "backend/src/features/stations/", "type": "independent_feature", "self_contained": true, "external_apis": ["Google Maps API"], "database_tables": ["stations"], "cache_strategy": "Station searches: 1 hour", "status": "partial_implementation" } }, "service_dependencies": { "platform_services": { "explanation": "Platform services are independent and can be deployed separately", "sequence": ["mvp-platform-vehicles"] }, "application_features": { "explanation": "Logical dependencies within single application service - all deploy together", "sequence": ["vehicles", "fuel-logs", "maintenance", "stations", "tenant-management"] } }, "development_environment": { "type": "production_only_docker", "ssl_enabled": true, "application_frontend_url": "https://admin.motovaultpro.com", "platform_landing_url": "https://motovaultpro.com", "backend_url": "http://localhost:3001", "cert_path": "./certs", "hosts_file_entry": "127.0.0.1 motovaultpro.com admin.motovaultpro.com" }, "testing_strategy": { "framework": "Jest (backend + frontend)", "container_based": true, "commands": { "all_tests": "make test", "backend_only": "make shell-backend && npm test", "frontend_only": "make test-frontend", "feature_specific": "npm test -- features/{feature}" } }, "authentication": { "provider": "Auth0", "backend_framework": "Fastify with @fastify/jwt", "service_auth": "Service tokens for platform service communication", "environment_variables": [ "PLATFORM_VEHICLES_API_URL", "PLATFORM_VEHICLES_API_KEY" ] }, "external_services": { "application": { "PostgreSQL": "port 5432", "Redis": "port 6379", "MinIO": "port 9000/9001" }, "platform": { "Platform PostgreSQL": "port 5434", "Platform Redis": "port 6381", "MVP Platform Vehicles DB": "port 5433", "MVP Platform Vehicles Redis": "port 6380", "MVP Platform Vehicles API": "port 8000", "MVP Platform Tenants API": "port 8001" }, "external_apis": [ "Google Maps API", "Auth0" ] }, "ai_optimization_metadata": { "feature_capsule_pattern": "backend/src/features/{name}/", "platform_service_pattern": "docs/PLATFORM-SERVICES.md", "single_directory_context": true, "hybrid_architecture_context": true, "modular_monolith_deployment": true, "platform_microservices_deployment": true, "migration_dependency_aware": true, "docker_first_development": true } }