Initial Commit

This commit is contained in:
Eric Gullickson
2025-09-17 16:09:15 -05:00
parent 0cdb9803de
commit a052040e3a
373 changed files with 437090 additions and 6773 deletions

View File

@@ -1,17 +1,19 @@
# MotoVaultPro Documentation
Complete documentation for the MotoVaultPro vehicle management platform using Modified Feature Capsule architecture.
Complete documentation for the MotoVaultPro distributed microservices platform with Modified Feature Capsule application layer and MVP Platform Services.
## Quick Navigation
### 🚀 Getting Started
- **[AI Project Guide](../AI_PROJECT_GUIDE.md)** - Complete AI-friendly project overview and navigation
- **[Security Architecture](security.md)** - Authentication, authorization, and security considerations
- **[Security Architecture](SECURITY.md)** - Authentication, authorization, and security considerations
### 🏗️ Architecture
- **[Architecture Directory](architecture/)** - Detailed architectural documentation
- **Feature Capsules** - Each feature has complete documentation in `backend/src/features/[name]/README.md`:
- **[Vehicles](../backend/src/features/vehicles/README.md)** - Primary entity with VIN decoding
- **[Platform Services Guide](PLATFORM-SERVICES.md)** - MVP Platform Services architecture and development
- **[Vehicles API (Authoritative)](VEHICLES-API.md)** - Vehicles platform service + app integration
- **Application Feature Capsules** - Each feature has complete documentation in `backend/src/features/[name]/README.md`:
- **[Vehicles](../backend/src/features/vehicles/README.md)** - Platform service consumer for vehicle management
- **[Fuel Logs](../backend/src/features/fuel-logs/README.md)** - Fuel tracking and analytics
- **[Maintenance](../backend/src/features/maintenance/README.md)** - Vehicle maintenance scheduling
- **[Stations](../backend/src/features/stations/README.md)** - Gas station location services
@@ -34,22 +36,29 @@ Each feature contains complete test suites:
- **Migration Order**: vehicles → fuel-logs → maintenance → stations
### 🔐 Security
- **[Security Overview](security.md)** - Complete security architecture
- **[Security Overview](SECURITY.md)** - Complete security architecture
- **Authentication**: Auth0 JWT for all protected endpoints
- **Authorization**: User-scoped data access
- **External APIs**: Rate limiting and caching strategies
### 📦 External Integrations
- **NHTSA vPIC API**: Vehicle VIN decoding (30-day cache)
### 📦 Services & Integrations
#### MVP Platform Services
- See **Vehicles API (Authoritative)**: [VEHICLES-API.md](VEHICLES-API.md)
- Future Platform Services: Analytics, notifications, payments, document management
#### Application Services
- **PostgreSQL**: Application data storage
- **Redis**: Application caching layer
- **MinIO**: Object storage for files
#### External APIs
- **Google Maps API**: Station location services (1-hour cache)
- **Auth0**: Authentication and authorization
- **PostgreSQL**: Primary data storage
- **Redis**: Caching layer
- **MinIO**: Object storage for files
### 🚀 Deployment
- **[Kubernetes](../k8s/)** - Production deployment manifests
- **Environment**: Use `.env.example` as template
- **Environment**: Ensure a valid `.env` exists at project root
- **Services**: All services containerized with health checks
## Documentation Standards
@@ -70,12 +79,15 @@ Each feature capsule maintains comprehensive documentation:
### Quick Commands
```bash
# Start everything
make dev
# Start full microservices environment
make start
# View all logs
make logs
# View platform service logs
make logs-platform-vehicles
# Run all tests
make test
@@ -83,17 +95,23 @@ make test
make rebuild
# Access container shells
make shell-backend
make shell-backend # Application service
make shell-frontend
make shell-platform-vehicles # Platform service
```
### Health Checks
#### Application Services
- **Frontend**: http://localhost:3000
- **Backend API**: http://localhost:3001/health
- **MinIO Console**: http://localhost:9001
#### Platform Services
- **Platform Vehicles API**: http://localhost:8000/health
- **Platform Vehicles Docs**: http://localhost:8000/docs
### Troubleshooting
1. **Container Issues**: `make clean && make dev`
1. **Container Issues**: `make clean && make start`
2. **Database Issues**: Check `make logs-backend` for migration errors
3. **Permission Issues**: Verify USER_ID/GROUP_ID in `.env`
4. **Port Conflicts**: Ensure ports 3000, 3001, 5432, 6379, 9000, 9001 are available
@@ -108,21 +126,24 @@ make shell-frontend
5. **Migrate**: Create and test database migrations
### Code Standards
- **Feature Independence**: No shared business logic between features
- **Service Independence**: Platform services are completely independent
- **Feature Independence**: No shared business logic between application features
- **Docker-First**: All development in containers
- **Test Coverage**: Unit and integration tests required
- **Documentation**: AI-friendly documentation for all features
- **Documentation**: AI-friendly documentation for all services and features
## Architecture Benefits
### For AI Maintenance
- **Single Directory Context**: Load one feature directory for complete understanding
- **Self-Contained Features**: No need to trace dependencies across codebase
- **Consistent Structure**: Every feature follows identical patterns
- **Complete Documentation**: All information needed is co-located with code
- **Service-Level Context**: Load platform service docs OR feature directory for complete understanding
- **Self-Contained Components**: No need to trace dependencies across service boundaries
- **Consistent Patterns**: Platform services and application features follow consistent structures
- **Complete Documentation**: All information needed is co-located with service/feature code
- **Clear Boundaries**: Explicit separation between platform and application concerns
### For Developers
- **Feature Isolation**: Work on features independently
- **Predictable Structure**: Same organization across all features
- **Easy Testing**: Feature-level test isolation
- **Clear Dependencies**: Explicit feature dependency graph
- **Service Independence**: Work on platform services and application features independently
- **Microservices Benefits**: Independent deployment, scaling, and technology choices
- **Predictable Structure**: Same organization patterns across services and features
- **Easy Testing**: Service-level and feature-level test isolation
- **Clear Dependencies**: Explicit service communication patterns