# 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
```bash
# Run feature tests
npm test -- features/documents

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

