Files
motovaultpro/docs/PLATFORM-SERVICES.md
Eric Gullickson d8d0ada83f Docs Cleanup
2025-11-03 16:12:29 -06:00

2.4 KiB

MVP Platform Module

Overview

The MVP Platform module is fully integrated inside the MotoVaultPro backend container. It delivers all platform capabilities without requiring a separate service or container in the simplified five-container stack.

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

The platform provides vehicle data capabilities including:

  • Vehicle makes, models, trims
  • Engine and transmission data
  • VIN decoding
  • Year-based vehicle information

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

Development Workflow

Local Development

Start All Services:

make start  # Starts the five-container stack

Backend Logs (includes platform module):

make logs-backend

Backend Shell (platform code lives here):

make shell-backend

Database Management

Shared Database:

  • PostgreSQL (port 5432): mvp-postgres
  • Redis (port 6379): mvp-redis

Database Access:

# PostgreSQL
make db-shell-app

Deployment Strategy

Integrated Deployment

The platform module deploys with the main application:

  • Same deployment pipeline
  • Shares database and cache
  • Deployed as part of the five-container stack

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