Commit Graph

12 Commits

Author SHA1 Message Date
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
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
4897f0a52c feat: delete users - not tested 2025-12-22 18:20:25 -06:00
Eric Gullickson
719c80ecd8 Notification updates 2025-12-21 19:56:52 -06:00
Eric Gullickson
95f5e89e48 Community 93 Premium feature complete 2025-12-21 11:31:10 -06:00
Eric Gullickson
b84d4c7fef Vehicle ETL Process fixed. Admin settings fixed. 2025-12-15 20:51:52 -06:00
Eric Gullickson
bcb1cea311 Security fix: Implement Google Maps API photo proxy (Fix 3)
Completed HIGH severity security fix (CVSS 6.5) to prevent Google Maps
API key exposure to frontend clients.

Issue: API key was embedded in photo URLs sent to frontend, allowing
potential abuse and quota exhaustion.

Solution: Implemented backend proxy endpoint for photos.

Backend Changes:
- google-maps.client.ts: Changed photoUrl to photoReference, added fetchPhoto()
- stations.types.ts: Updated type definition (photoUrl → photoReference)
- stations.controller.ts: Added getStationPhoto() proxy method
- stations.routes.ts: Added GET /api/stations/photo/:reference route
- stations.service.ts: Updated to use photoReference
- stations.repository.ts: Updated database queries and mappings
- admin controllers/services: Updated for consistency
- Created migration 003 to rename photo_url column

Frontend Changes:
- stations.types.ts: Updated type definition (photoUrl → photoReference)
- photo-utils.ts: NEW - Helper to generate proxy URLs
- StationCard.tsx: Use photoReference with helper function

Tests & Docs:
- Updated mock data to use photoReference
- Updated test expectations for proxy URLs
- Updated API.md and TESTING.md documentation

Database Migration:
- 003_rename_photo_url_to_photo_reference.sql: Renames column in station_cache

Security Benefits:
- API key never sent to frontend
- All photo requests proxied through authenticated endpoint
- Photos cached for 24 hours (Cache-Control header)
- No client-side API key exposure

Files modified: 16 files
New files: 2 (photo-utils.ts, migration 003)

Status: All 3 P0 security fixes now complete
- Fix 1: crypto.randomBytes() ✓
- Fix 2: Magic byte validation ✓
- Fix 3: API key proxy ✓

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-14 09:56:33 -06:00
Eric Gullickson
efbe9ba3c0 Vehicle Admin improvements 2025-11-07 16:03:50 -06:00
Eric Gullickson
5630979adf Admin Page work - Still blank/broken 2025-11-06 16:29:11 -06:00
Eric Gullickson
858cf31d38 Admin settings fixed 2025-11-06 14:07:16 -06:00
Eric Gullickson
8174e0d5f9 Admin User v1 2025-11-05 19:04:06 -06:00