Initial Commit
This commit is contained in:
190
.ai/context.json
190
.ai/context.json
@@ -1,51 +1,99 @@
|
||||
{
|
||||
"version": "2.0.0",
|
||||
"architecture": "modified-feature-capsule",
|
||||
"ai_optimization": {
|
||||
"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_independence": "100%"
|
||||
"feature_capsule_organization": "100%",
|
||||
"platform_service_independence": "100%",
|
||||
"hybrid_deployment_model": "100%",
|
||||
"production_only_development": true,
|
||||
"docker_first": true
|
||||
},
|
||||
"loading_strategy": {
|
||||
"ai_loading_strategy": {
|
||||
"project_overview": {
|
||||
"instruction": "Start with AI_PROJECT_GUIDE.md for complete project context",
|
||||
"example": "AI_PROJECT_GUIDE.md",
|
||||
"completeness": "100% - all navigation and architecture information"
|
||||
"instruction": "Start with README.md for complete microservices context",
|
||||
"files": ["README.md"],
|
||||
"completeness": "100% - all navigation and distributed architecture information"
|
||||
},
|
||||
"feature_work": {
|
||||
"instruction": "Load entire feature directory",
|
||||
"example": "backend/src/features/vehicles/",
|
||||
"completeness": "100% - everything needed is in one directory"
|
||||
"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 feature",
|
||||
"example": [
|
||||
"backend/src/features/vehicles/index.ts",
|
||||
"backend/src/features/vehicles/README.md"
|
||||
"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",
|
||||
"example": [
|
||||
"backend/src/features/[feature]/README.md",
|
||||
"backend/src/features/[feature]/tests/",
|
||||
"backend/src/features/[feature]/docs/TROUBLESHOOTING.md"
|
||||
"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",
|
||||
"example": "docs/README.md",
|
||||
"files": ["docs/README.md"],
|
||||
"completeness": "All documentation links and navigation"
|
||||
}
|
||||
},
|
||||
"feature_capsules": {
|
||||
"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": "primary_entity",
|
||||
"type": "platform_service_consumer",
|
||||
"self_contained": true,
|
||||
"external_apis": ["NHTSA vPIC"],
|
||||
"database_tables": ["vehicles", "vin_cache"],
|
||||
"cache_strategy": "VIN lookups: 30 days"
|
||||
"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/",
|
||||
@@ -53,11 +101,93 @@
|
||||
"self_contained": true,
|
||||
"depends_on": ["vehicles"],
|
||||
"database_tables": ["fuel_logs"],
|
||||
"cache_strategy": "User logs: 5 minutes"
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"migration_order": {
|
||||
"explanation": "Order determined by foreign key dependencies",
|
||||
"sequence": ["vehicles", "fuel-logs", "maintenance", "stations"]
|
||||
"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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user