Commit Graph

96 Commits

Author SHA1 Message Date
Eric Gullickson
911b7c0e3a fix: Display user email instead of Auth0 UID in audit logs (refs #10)
All checks were successful
Deploy to Staging / Build Images (pull_request) Successful in 4m40s
Deploy to Staging / Deploy to Staging (pull_request) Successful in 37s
Deploy to Staging / Verify Staging (pull_request) Successful in 6s
Deploy to Staging / Notify Staging Ready (pull_request) Successful in 5s
Deploy to Staging / Notify Staging Failure (pull_request) Has been skipped
- Add userEmail field to AuditLogEntry type in backend and frontend
- Update audit-log repository to LEFT JOIN with user_profiles table
- Update AdminLogsPage to show email with fallback to truncated userId
- Update AdminLogsMobileScreen with same display logic

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 12:30:57 -06:00
Eric Gullickson
fbde51b8fd feat: Add login/logout audit logging (refs #10)
All checks were successful
Deploy to Staging / Build Images (pull_request) Successful in 4m42s
Deploy to Staging / Deploy to Staging (pull_request) Successful in 38s
Deploy to Staging / Verify Staging (pull_request) Successful in 7s
Deploy to Staging / Notify Staging Ready (pull_request) Successful in 6s
Deploy to Staging / Notify Staging Failure (pull_request) Has been skipped
Backend:
- Add login event logging to getUserStatus() controller method
- Create POST /auth/track-logout endpoint for logout tracking

Frontend:
- Create useLogout hook that wraps Auth0 logout with audit tracking
- Update all logout locations to use the new hook (SettingsPage,
  Layout, MobileSettingsScreen, useDeletion)

Login events are logged when the frontend calls /auth/user-status after
Auth0 callback. Logout events are logged via fire-and-forget call to
/auth/track-logout before Auth0 logout.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 12:08:41 -06:00
Eric Gullickson
cdfba3c1a8 fix: Add audit-log to migration order (refs #10)
All checks were successful
Deploy to Staging / Build Images (pull_request) Successful in 2m23s
Deploy to Staging / Deploy to Staging (pull_request) Successful in 28s
Deploy to Staging / Verify Staging (pull_request) Successful in 7s
Deploy to Staging / Notify Staging Ready (pull_request) Successful in 6s
Deploy to Staging / Notify Staging Failure (pull_request) Has been skipped
The audit_logs table migration was not being executed because the
audit-log feature was missing from MIGRATION_ORDER in run-all.ts,
causing 500 errors when accessing the audit logs API.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 11:42:42 -06:00
Eric Gullickson
80275c1670 fix: Remove duplicate audit-logs route from admin routes (refs #10)
All checks were successful
Deploy to Staging / Build Images (pull_request) Successful in 2m23s
Deploy to Staging / Deploy to Staging (pull_request) Successful in 28s
Deploy to Staging / Verify Staging (pull_request) Successful in 6s
Deploy to Staging / Notify Staging Ready (pull_request) Successful in 6s
Deploy to Staging / Notify Staging Failure (pull_request) Has been skipped
The old /api/admin/audit-logs route in admin.routes.ts conflicted with the
new centralized audit-log feature. Removed the old route since we're now
using the unified audit logging system.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 11:18:45 -06:00
Eric Gullickson
c98211f4a2 feat: Implement centralized audit logging admin interface (refs #10)
Some checks failed
Deploy to Staging / Build Images (pull_request) Successful in 4m42s
Deploy to Staging / Deploy to Staging (pull_request) Successful in 37s
Deploy to Staging / Verify Staging (pull_request) Failing after 6s
Deploy to Staging / Notify Staging Ready (pull_request) Has been skipped
Deploy to Staging / Notify Staging Failure (pull_request) Successful in 6s
- Add audit_logs table with categories, severities, and indexes
- Create AuditLogService and AuditLogRepository
- Add REST API endpoints for viewing and exporting logs
- Wire audit logging into auth, vehicles, admin, and backup features
- Add desktop AdminLogsPage with filters and CSV export
- Add mobile AdminLogsMobileScreen with card layout
- Implement 90-day retention cleanup job
- Remove old AuditLogPanel from AdminCatalogPage

Security fixes:
- Escape LIKE special characters to prevent pattern injection
- Limit CSV export to 5000 records to prevent memory exhaustion
- Add truncation warning headers for large exports

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 11:09:09 -06:00
Eric Gullickson
19ece562ed fix: Implement tiered backup retention classification (refs #6)
All checks were successful
Deploy to Staging / Build Images (pull_request) Successful in 6m15s
Deploy to Staging / Deploy to Staging (pull_request) Successful in 28s
Deploy to Staging / Verify Staging (pull_request) Successful in 7s
Deploy to Staging / Notify Staging Ready (pull_request) Successful in 6s
Deploy to Staging / Notify Staging Failure (pull_request) Has been skipped
Replace per-schedule count-based retention with unified tiered classification.
Backups are now classified by timestamp into categories (hourly/daily/weekly/monthly)
and are only deleted when they exceed ALL applicable category quotas.

Changes:
- Add backup-classification.service.ts for timestamp-based classification
- Rewrite backup-retention.service.ts with tiered logic
- Add categories and expires_at columns to backup_history
- Add Expires column to desktop and mobile backup UI
- Add unit tests for classification logic (22 tests)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 21:53:43 -06:00
Eric Gullickson
f494f77150 feat: Implement user tier-based feature gating system (refs #8)
All checks were successful
Deploy to Staging / Build Images (pull_request) Successful in 4m35s
Deploy to Staging / Deploy to Staging (pull_request) Successful in 27s
Deploy to Staging / Verify Staging (pull_request) Successful in 5s
Deploy to Staging / Notify Staging Ready (pull_request) Successful in 5s
Deploy to Staging / Notify Staging Failure (pull_request) Has been skipped
Add subscription tier system to gate features behind Free/Pro/Enterprise tiers.

Backend:
- Create feature-tiers.ts with FEATURE_TIERS config and utilities
- Add /api/config/feature-tiers endpoint for frontend config fetch
- Create requireTier middleware for route-level tier enforcement
- Add subscriptionTier to request.userContext in auth plugin
- Gate scanForMaintenance in documents controller (Pro+ required)
- Add migration to reset scanForMaintenance for free users

Frontend:
- Create useTierAccess hook for tier checking
- Create UpgradeRequiredDialog component (responsive)
- Gate DocumentForm checkbox with lock icon for free users
- Add SubscriptionTier type to profile.types.ts

Documentation:
- Add TIER-GATING.md with usage guide

Tests: 30 passing (feature-tiers, tier-guard, controller)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 14:34:47 -06:00
Eric Gullickson
4fc5b391e1 feat: Add admin vehicle management and profile vehicles display (refs #11)
All checks were successful
Deploy to Staging / Build Images (pull_request) Successful in 4m34s
Deploy to Staging / Deploy to Staging (pull_request) Successful in 37s
Deploy to Staging / Verify Staging (pull_request) Successful in 6s
Deploy to Staging / Notify Staging Ready (pull_request) Successful in 6s
Deploy to Staging / Notify Staging Failure (pull_request) Has been skipped
- Add GET /api/admin/stats endpoint for Total Vehicles widget
- Add GET /api/admin/users/:auth0Sub/vehicles endpoint for user vehicle list
- Update AdminUsersPage with Total Vehicles stat and expandable vehicle rows
- Add My Vehicles section to SettingsPage (desktop) and MobileSettingsScreen
- Update AdminUsersMobileScreen with stats header and vehicle expansion
- Add defense-in-depth admin checks and error handling
- Update admin README documentation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 13:18:38 -06:00
Eric Gullickson
3053b62fa5 chore: Update Documentation
All checks were successful
Deploy to Staging / Build Images (push) Successful in 2m19s
Deploy to Staging / Deploy to Staging (push) Successful in 27s
Deploy to Staging / Verify Staging (push) Successful in 5s
Deploy to Staging / Notify Staging Ready (push) Successful in 5s
Deploy to Staging / Notify Staging Failure (push) Has been skipped
Mirror Base Images / Mirror Base Images (push) Successful in 29s
2026-01-03 15:10:19 -06:00
Eric Gullickson
dec91ccfc2 feat: add Terms & Conditions checkbox to signup (refs #4)
All checks were successful
Deploy to Staging / Build Images (pull_request) Successful in 4m38s
Deploy to Staging / Deploy to Staging (pull_request) Successful in 28s
Deploy to Staging / Verify Staging (pull_request) Successful in 6s
Deploy to Staging / Notify Staging Ready (pull_request) Successful in 6s
Deploy to Staging / Notify Staging Failure (pull_request) Has been skipped
- Add terms_agreements table for legal audit trail
- Create terms-agreement feature capsule with repository
- Modify signup to create terms agreement atomically
- Add checkbox with PDF link to SignupForm
- Capture IP, User-Agent, terms version, content hash
- Update CLAUDE.md documentation index

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 12:27:45 -06:00
Eric Gullickson
b933329539 feat: update docs for token efficient usage
Some checks failed
Deploy to Staging / Build Images (push) Has started running
Deploy to Staging / Deploy to Staging (push) Has been cancelled
Deploy to Staging / Verify Staging (push) Has been cancelled
Deploy to Staging / Notify Staging Ready (push) Has been cancelled
Deploy to Staging / Notify Staging Failure (push) Has been cancelled
2026-01-03 11:59:47 -06:00
Eric Gullickson
0b16b8307f feat: add vehicle count column to admin user management
All checks were successful
Deploy to Staging / Build Images (push) Successful in 4m34s
Deploy to Staging / Deploy to Staging (push) Successful in 37s
Deploy to Staging / Verify Staging (push) Successful in 6s
Deploy to Staging / Notify Staging Ready (push) Successful in 5s
Deploy to Staging / Notify Staging Failure (push) Has been skipped
Add a new "Vehicles" column to the admin user management table showing
the count of active vehicles for each user.

Backend changes:
- Add vehicleCount to UserWithAdminStatus type
- Add SQL subquery to count active vehicles (is_active=true, not deleted)
- Add vehicleCount as sortable column option

Frontend changes:
- Add Vehicles column to desktop table (between Tier and Status)
- Add VehicleCountBadge component to mobile user cards
- Update ManagedUser type with vehicleCount field

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 15:23:23 -06:00
Eric Gullickson
9043a581b1 feat: backup improvements
All checks were successful
Deploy to Staging / Build Images (push) Successful in 4m31s
Deploy to Staging / Deploy to Staging (push) Successful in 37s
Deploy to Staging / Verify Staging (push) Successful in 6s
Deploy to Staging / Notify Staging Ready (push) Successful in 6s
Deploy to Staging / Notify Staging Failure (push) Has been skipped
2026-01-01 13:57:36 -06:00
Eric Gullickson
ea482b745e fix: Backup and restore fixes
All checks were successful
Deploy to Staging / Build Images (push) Successful in 2m20s
Deploy to Staging / Deploy to Staging (push) Successful in 28s
Deploy to Staging / Verify Staging (push) Successful in 6s
Deploy to Staging / Notify Staging Ready (push) Successful in 5s
Deploy to Staging / Notify Staging Failure (push) Has been skipped
2026-01-01 13:11:51 -06:00
Eric Gullickson
7f278f6574 fix: Backup schedules and pruning
All checks were successful
Deploy to Staging / Build Images (push) Successful in 4m30s
Deploy to Staging / Deploy to Staging (push) Successful in 37s
Deploy to Staging / Verify Staging (push) Successful in 6s
Deploy to Staging / Notify Staging Ready (push) Successful in 5s
Deploy to Staging / Notify Staging Failure (push) Has been skipped
2026-01-01 11:40:49 -06:00
Eric Gullickson
d8ea0c7297 fix: Implement distribute locker in Redis for cron jobs
Some checks failed
Deploy to Staging / Build Images (push) Failing after 30s
Deploy to Staging / Deploy to Staging (push) Has been skipped
Deploy to Staging / Verify Staging (push) Has been skipped
Deploy to Staging / Notify Staging Ready (push) Has been skipped
Deploy to Staging / Notify Staging Failure (push) Successful in 6s
2026-01-01 11:02:54 -06:00
Eric Gullickson
ffd8ecd1d0 fix: OS Detection of theme removed.
All checks were successful
Deploy to Staging / Build Images (push) Successful in 4m34s
Deploy to Staging / Deploy to Staging (push) Successful in 37s
Deploy to Staging / Verify Staging (push) Successful in 6s
Deploy to Staging / Notify Staging Ready (push) Successful in 5s
Deploy to Staging / Notify Staging Failure (push) Has been skipped
2026-01-01 10:30:08 -06:00
Eric Gullickson
f79fda79b9 fix: Short VIN Storage - Issue #1
All checks were successful
Deploy to Staging / Build Images (push) Successful in 4m31s
Deploy to Staging / Deploy to Staging (push) Successful in 36s
Deploy to Staging / Verify Staging (push) Successful in 5s
Deploy to Staging / Notify Staging Ready (push) Successful in 5s
Deploy to Staging / Notify Staging Failure (push) Has been skipped
2026-01-01 10:05:56 -06:00
Eric Gullickson
52f9414fd4 fix: edit vehicle null fix
All checks were successful
Deploy to Staging / Build Images (push) Successful in 4m32s
Deploy to Staging / Deploy to Staging (push) Successful in 27s
Deploy to Staging / Verify Staging (push) Successful in 6s
Deploy to Staging / Notify Staging Ready (push) Successful in 5s
Deploy to Staging / Notify Staging Failure (push) Has been skipped
2025-12-31 15:33:27 -06:00
Eric Gullickson
83d79da3aa CI/CD Gitea v1.0
Some checks failed
Deploy to Staging / Build Images (push) Failing after 7s
Deploy to Staging / Deploy to Staging (push) Has been skipped
Deploy to Staging / Verify Staging (push) Has been skipped
Deploy to Staging / Notify Staging Ready (push) Has been skipped
Deploy to Staging / Notify Staging Failure (push) Failing after 6s
2025-12-29 18:51:41 -06:00
Eric Gullickson
9b0de6a5b8 fix: I dunno, I'm making git server changes 2025-12-29 08:44:49 -06:00
Eric Gullickson
57d2c43da7 fix: Email template improvements 2025-12-28 16:56:36 -06:00
Eric Gullickson
69171f7778 fix: post Dark mode fixes 2025-12-27 20:00:51 -06:00
Eric Gullickson
bf84e64ee9 fix: CI/CD permission fix 2025-12-27 16:38:28 -06:00
Eric Gullickson
dc2c731119 fix: Database schema fixes. CI/CD improvements. 2025-12-27 16:23:22 -06:00
Eric Gullickson
344df5184c fix: Restore backup bug 2025-12-27 13:54:38 -06:00
Eric Gullickson
bfb0c23ae1 fix: Fix imports and database bugs. Removed legacy ETL code. 2025-12-27 12:07:24 -06:00
Eric Gullickson
fb52ce398b feat: user export service. bug and UX fixes. Complete minus outstanding email template fixes. 2025-12-26 14:06:03 -06:00
Eric Gullickson
8c13dc0a55 feat: navigation and UX improvements complete 2025-12-26 09:25:42 -06:00
Eric Gullickson
2ab58267dd feat: expand documents to include manuals 2025-12-25 12:54:00 -06:00
Eric Gullickson
0357ce391f feat: Backup & Restore - Manual backup tested complete. 2025-12-25 10:50:09 -06:00
Eric Gullickson
8ef6b3d853 fix: before admin stations removal 2025-12-24 17:20:11 -06:00
Eric Gullickson
96ee43ea94 feat: User onboarding finished 2025-12-23 10:26:10 -06:00
Eric Gullickson
55cf4923b8 feat: onboarding pre-work 2025-12-22 21:34:05 -06:00
Eric Gullickson
4897f0a52c feat: delete users - not tested 2025-12-22 18:20:25 -06:00
Eric Gullickson
91b4534e76 feat: Scheduled Maintenance feature complete 2025-12-22 14:12:33 -06:00
Eric Gullickson
719c80ecd8 Notification updates 2025-12-21 19:56:52 -06:00
Eric Gullickson
144f1d5bb0 Fixed saved Premium 93 station logic and display. 2025-12-21 13:56:59 -06:00
Eric Gullickson
95f5e89e48 Community 93 Premium feature complete 2025-12-21 11:31:10 -06:00
Eric Gullickson
1bde31247f Update dependencies and fix security vulnerabilities
Security fixes:
- get-jwks: 9.0.0 -> 11.0.3 (critical vulnerability)
- vite: 5.4.11 -> 6.0.0 (moderate vulnerability)
- patch-package: 6.5.1 -> 8.0.1 (low vulnerability)

Package updates:
- Backend: @fastify/cors 11.2.0, @fastify/helmet 13.0.2, @fastify/jwt 10.0.0
- Backend: supertest 7.1.4, @types/supertest 6.0.3, @types/node 22.0.0
- Frontend: @vitejs/plugin-react 5.1.2, zustand 5.0.0, framer-motion 12.0.0

Removed unused:
- minio (not imported anywhere in codebase)

TypeScript:
- Temporarily disabled exactOptionalPropertyTypes, noPropertyAccessFromIndexSignature,
  noUncheckedIndexedAccess to fix pre-existing type errors (TODO: re-enable)
- Fixed process.env bracket notation access
- Fixed unused React imports in test files
- Renamed test files with JSX from .ts to .tsx

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-20 14:18:41 -06:00
Eric Gullickson
aa37ecfcd3 Add local development build workflow
- Add Makefile targets: install, type-check, lint, build-local
- Add type-check script to backend/package.json
- Create backend/.gitignore for build artifacts

Enables quick TypeScript error detection without Docker rebuilds.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-20 12:47:18 -06:00
Eric Gullickson
513df9c027 Updated image to node:lts-alpine 2025-12-20 12:16:58 -06:00
Eric Gullickson
9eb025a21f Update to production Let's Encrypt certificates 2025-12-20 11:14:44 -06:00
Eric Gullickson
a17944d79f Update deployment health checks. Fix UI bugs. 2025-12-20 10:50:44 -06:00
Eric Gullickson
b9801d5f3b Update Dockerfile with curl 2025-12-20 09:50:00 -06:00
Eric Gullickson
0e85cf48c3 Updated packages. Changed date picker package to Day.JS and applied it across whole app. 2025-12-18 16:07:30 -06:00
Eric Gullickson
cdb9d5575f Fix: Move catalog search indexes to ETL migration 2025-12-18 13:53:50 -06:00
Eric Gullickson
7a2e11953a Update config defs 2025-12-18 13:40:57 -06:00
Eric Gullickson
b611b56336 Initial Commit 2025-12-17 15:43:32 -06:00
Eric Gullickson
cd0cfa8913 Vehicle drop down and Gas Station fixes 2025-12-17 10:49:29 -06:00