How wsu-4110/garageiq works
GarageIQ is a vehicle-garage web app with a React frontend and a FastAPI backend. The visible user workflow is sign-in, viewing a garage, editing vehicle/build/maintenance information, and saving profile changes to Firestore. The backend also initializes a separate advice service that retrieves vehicle-scoped modification and guide knowledge and generates grounded answers. README capabilities include future build planning and compatibility recommendations; the current frontend implements build logs and maintenance, while shop finding is explicitly unavailable in the shown UI. Backend wiring is clearer than frontend-to-backend advice traffic in the excerpts, so that link is omitted.
Main entry points: main.py FastAPI application · GaragePages.jsx Build and maintenance · App.jsx React app and routes · Dashboard.jsx Garage dashboard
Components 24
Garage interface
- React app and routes
frontend/src/App.jsx - Garage dashboard
frontend/src/pages/Dashboard.jsx - Build and maintenance
frontend/src/pages/GaragePages.jsx - Advice page
frontend/src/pages/Advisor.jsx
Account and garage data
- Auth context
frontend/src/context/AuthContext.jsx - Auth hook
frontend/src/hooks/useAuth.js - Profile subscription
frontend/src/hooks/useUserProfile.js - Profile persistence
frontend/src/lib/userProfile.js - Vehicle data helpers
frontend/src/lib/vehicleData.js - Maintenance rules
frontend/src/lib/maintenanceRules.js - Firebase client
frontend/src/lib/firebase.js
FastAPI services
- FastAPI application
backend/app/main.py - Vehicle API
backend/app/api/vehicles.py - Advice API
backend/app/api/advice.py - Vehicle store
backend/app/stores/vehicles.py - Advisor service
backend/app/rag/service.py
Advice knowledge
- Knowledge retriever
backend/app/rag/retriever.py - Text embedder
backend/app/rag/embeddings.py - Answer generator
backend/app/rag/generate.py - Knowledge loader
backend/app/knowledge/loader.py - Fitment hierarchy
backend/app/knowledge/hierarchy.py
Other components
- Driver
- Firestore
- Mod and guide knowledge
Connections 35
- Driver → React app and routes: uses
frontend/src/App.jsx - React app and routes → Auth context: provides auth
frontend/src/App.jsx - Auth hook → Auth context: reads context
frontend/src/hooks/useAuth.js - React app and routes → Garage dashboard: routes to
frontend/src/App.jsx - React app and routes → Build and maintenance: routes to
frontend/src/App.jsx - React app and routes → Auth hook: checks access
frontend/src/App.jsx - Auth context → Firebase client: uses auth client
frontend/src/context/AuthContext.jsx - Profile subscription → Auth hook: reads user
frontend/src/hooks/useUserProfile.js - Profile subscription → Profile persistence: subscribes
frontend/src/hooks/useUserProfile.js - Profile persistence → Firebase client: uses Firestore client
frontend/src/lib/userProfile.js - Firebase client → Firestore: reads and writes
- Garage dashboard → Profile subscription: reads profile
frontend/src/pages/Dashboard.jsx - Garage dashboard → Vehicle data helpers: uses vehicle data
frontend/src/pages/Dashboard.jsx - Garage dashboard → Maintenance rules: calculates reminders
frontend/src/pages/Dashboard.jsx - Build and maintenance → Profile subscription: reads profile
frontend/src/pages/GaragePages.jsx - Build and maintenance → Profile persistence: saves edits
frontend/src/pages/GaragePages.jsx - Build and maintenance → Vehicle data helpers: builds updates
frontend/src/pages/GaragePages.jsx - Build and maintenance → Maintenance rules: calculates reminders
frontend/src/pages/GaragePages.jsx - Build and maintenance → Advice page: renders
frontend/src/pages/GaragePages.jsx - FastAPI application → Vehicle API: registers router
backend/app/main.py - FastAPI application → Advice API: registers router
backend/app/main.py - FastAPI application → Knowledge loader: loads knowledge
backend/app/main.py - FastAPI application → Text embedder: builds embedder
backend/app/main.py - FastAPI application → Knowledge retriever: constructs retriever
backend/app/main.py - FastAPI application → Answer generator: builds generator
backend/app/main.py - FastAPI application → Advisor service: constructs service
backend/app/main.py - FastAPI application → Vehicle store: builds store
backend/app/main.py - Vehicle API → Vehicle store: uses store
backend/app/api/vehicles.py - Advice API → Advisor service: uses service
backend/app/api/advice.py - Advisor service → Knowledge retriever: searches knowledge
backend/app/rag/service.py - Advisor service → Answer generator: generates answer
backend/app/rag/service.py - Knowledge retriever → Text embedder: embeds queries
backend/app/rag/retriever.py - Knowledge retriever → Knowledge loader: consumes knowledge
backend/app/rag/retriever.py - Knowledge loader → Fitment hierarchy: resolves scope
backend/app/knowledge/loader.py - Knowledge loader → Mod and guide knowledge: loads datasets