Files
motovaultpro/backend/src/features/documents
Eric Gullickson dd3b58e061
All checks were successful
Deploy to Staging / Build Images (pull_request) Successful in 3m40s
Deploy to Staging / Deploy to Staging (pull_request) Successful in 24s
Deploy to Staging / Verify Staging (pull_request) Successful in 10s
Deploy to Staging / Notify Staging Ready (pull_request) Successful in 8s
Deploy to Staging / Notify Staging Failure (pull_request) Has been skipped
fix: migrate remaining controllers from Auth0 sub to UUID identity (refs #220)
16 controllers still used request.user.sub (Auth0 ID) instead of
request.userContext.userId (UUID) after the user_id column migration,
causing 500 errors on all authenticated endpoints including dashboard.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 11:38:46 -06:00
..
2026-02-05 21:49:35 -06:00
2025-09-28 20:35:46 -05:00
2025-11-04 18:38:06 -06:00

Documents Feature Capsule

Quick Summary (50 tokens)

Secure vehicle document management with filesystem storage. Metadata and file uploads with private access, user and vehicle ownership enforcement, and mobile-first UX.

API Endpoints

  • GET /api/documents
  • GET /api/documents/:id
  • POST /api/documents
  • PUT /api/documents/:id
  • DELETE /api/documents/:id
  • GET /api/documents/vehicle/:vehicleId
  • POST /api/documents/:id/upload
  • GET /api/documents/:id/download

Structure

  • api/ - HTTP endpoints, routes, validators
  • domain/ - Business logic, types, rules
  • data/ - Repository, database queries
  • migrations/ - Feature-specific schema
  • tests/ - All feature tests

Dependencies

  • Internal: core/auth (JWT validation), core/storage (filesystem adapter), core/logging
  • Database: documents table
  • Storage: Filesystem adapter (/app/data/documents)

Quick Commands

# Run feature tests
npm test -- features/documents

# Run migrations (all features)
npm run migrate:all