Files
motovaultpro/docs/PLATFORM-SERVICES.md
Eric Gullickson 72275096f8
All checks were successful
Deploy to Staging / Build Images (pull_request) Successful in 31s
Deploy to Staging / Deploy to Staging (pull_request) Successful in 22s
Deploy to Staging / Verify Staging (pull_request) Successful in 2m31s
Deploy to Staging / Notify Staging Ready (pull_request) Successful in 8s
Deploy to Staging / Notify Staging Failure (pull_request) Has been skipped
docs: add unified logging system documentation and CI/CD integration (refs #87)
- Update staging workflow to use LOG_LEVEL=DEBUG
- Create docs/LOGGING.md with unified logging documentation
- Delete docs/UX-DEBUGGING.md (replaced by LOGGING.md)
- Update architecture to 9-container (6 app + 3 logging)
- Update CLAUDE.md, README.md, docs/README.md, docs/CLAUDE.md
- Update docs/PLATFORM-SERVICES.md deployment section

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 20:50:20 -06:00

2.7 KiB

MVP Platform Module

Overview

The MVP Platform module is fully integrated inside the MotoVaultPro backend container.

Architecture

The platform module runs as part of the backend service:

  • Runtime: mvp-backend container (Fastify API)
  • Shared Database: Uses mvp-postgres
  • Shared Cache: Uses mvp-redis

Platform Capabilities

Vehicle Data Service (Implemented)

The platform provides vehicle hierarchical data lookups:

  • Vehicle years (distinct, descending)
  • Vehicle makes for a specific year
  • Vehicle models for year and make
  • Vehicle trims for year, make, and model
  • Engine and transmission data

Endpoints:

  • GET /api/platform/years - Available model years
  • GET /api/platform/makes?year={year} - Makes for year
  • GET /api/platform/models?year={year}&make={make} - Models for year/make
  • GET /api/platform/trims?year={year}&make={make}&model={model} - Trims
  • GET /api/platform/engines?year={year}&make={make}&model={model}&trim={trim} - Engines
  • GET /api/platform/transmissions?... - Transmissions

VIN Decoding (Planned/Future)

VIN decoding is planned but not yet implemented. Future capabilities will include:

  • GET /api/platform/vehicle?vin={vin} - Decode VIN to vehicle details
  • PostgreSQL-based VIN decode function
  • NHTSA vPIC API fallback with circuit breaker
  • Redis caching (7-day TTL for successful decodes)

Data Source: Vehicle data from standardized sources Cache Strategy: Year-based hierarchical caching using mvp-redis

Service Communication

Application → Platform Communication

  • Protocol: Internal service calls within the application
  • Database: Shared mvp-postgres database
  • Cache: Shared mvp-redis cache

Deployment Strategy

Integrated Deployment

The platform module deploys with the main application:

  • Same deployment pipeline
  • Shares database and cache
  • Deployed as part of the 9-container stack (6 application + 3 logging)

See docs/LOGGING.md for unified logging system documentation.

Integration Patterns

Data Access

Application features access platform data through shared database:

  • Direct database queries
  • Shared cache for performance
  • Single transaction context

Troubleshooting

Common Issues

Service Discovery Problems:

  • Verify Docker networking: docker network ls
  • Check backend container connectivity: docker compose exec mvp-backend sh

Database Connection Issues:

  • Verify mvp-postgres is healthy
  • Check port mappings and network connectivity

Health Checks

Verify Backend Service (contains platform module):

docker compose ps mvp-backend

Logs and Debugging

Service Logs:

docker compose logs -f mvp-backend

Database Logs:

docker compose logs -f mvp-postgres