Community 93 Premium feature complete

This commit is contained in:
Eric Gullickson
2025-12-21 11:31:10 -06:00
parent 1bde31247f
commit 95f5e89e48
60 changed files with 8061 additions and 350 deletions

View File

@@ -85,20 +85,30 @@ fuel-logs/
├── api/ # HTTP layer
│ ├── fuel-logs.controller.ts
│ ├── fuel-logs.routes.ts
── fuel-logs.validators.ts
── fuel-logs.validators.ts
│ └── fuel-grade.controller.ts # Fuel grade lookup endpoints
├── domain/ # Business logic
│ ├── fuel-logs.service.ts
── fuel-logs.types.ts
│ ├── fuel-logs.service.ts # Core fuel log operations
── fuel-logs.types.ts # Type definitions
│ ├── fuel-grade.service.ts # Fuel grade management
│ ├── efficiency-calculation.service.ts # MPG/L per 100km calculations
│ ├── unit-conversion.service.ts # Imperial/metric conversions
│ └── enhanced-validation.service.ts # Complex validation rules
├── data/ # Database layer
│ └── fuel-logs.repository.ts
├── external/ # External service integrations
│ └── user-settings.service.ts # User preference lookups
├── migrations/ # Feature schema
── 001_create_fuel_logs_table.sql
── 001_create_fuel_logs_table.sql
│ ├── 002_enhance_fuel_logs_schema.sql
│ ├── 003_drop_mpg_column.sql
│ └── 004_relax_odometer_and_trip_precision.sql
├── tests/ # All tests
│ ├── unit/
│ │ └── fuel-logs.service.test.ts
│ └── integration/
│ └── fuel-logs.integration.test.ts
└── docs/ # Additional docs
└── fixtures/ # Test fixtures (empty - uses inline mocks)
```
## Key Features
@@ -183,16 +193,16 @@ fuel-logs/
### Run Tests
```bash
# All fuel log tests
npm test -- features/fuel-logs
npm test -- --testPathPattern=src/features/fuel-logs
# Unit tests only
npm test -- features/fuel-logs/tests/unit
npm test -- --testPathPattern=src/features/fuel-logs/tests/unit
# Integration tests only
npm test -- features/fuel-logs/tests/integration
# Integration tests only
npm test -- --testPathPattern=src/features/fuel-logs/tests/integration
# With coverage
npm test -- features/fuel-logs --coverage
npm test -- --testPathPattern=src/features/fuel-logs --coverage
```
## Error Handling
@@ -224,5 +234,5 @@ make logs-backend | grep fuel-logs
make shell-backend
# Inside container - run feature tests
npm test -- features/fuel-logs
npm test -- --testPathPattern=src/features/fuel-logs
```