How matyqrr/vehicle-maintenance-log works
Vehicle Maintenance Log is a React client and Express/SQLite API for creating, listing, and deleting vehicle records. The main flow starts in the browser: App loads vehicles, renders the form and list, and coordinates refresh and deletion; form submissions and App requests call the REST API, which delegates persistence to the vehicle repository and SQLite. Maintenance-history tracking and cost/service intervals are planned, not implemented. Relationships are limited to calls, rendering, and data flow shown in excerpts or documented in the README.
Main entry points: App.tsx App coordinator · VehicleList.tsx Vehicle list · VehicleForm.tsx Vehicle form · vehicleRepository.ts Vehicle repository
Components 10
Vehicle client
- React entry
frontend/src/main.tsx - App coordinator
frontend/src/App.tsx - Vehicle form
frontend/src/components/VehicleForm.tsx - Vehicle list
frontend/src/components/VehicleList.tsx - Vehicle type
frontend/src/types/vehicle.ts
REST API
- Express API
backend/src/api/server.ts
Vehicle storage
- Vehicle repository
backend/src/data/vehicleRepository.ts - Vehicle model
backend/src/models/vehicle.ts - SQLite database
backend/src/data/db.ts
Other components
- User
Connections 14
- User → React entry: opens app
README.md - React entry → App coordinator: renders
frontend/src/main.tsx - App coordinator → Vehicle form: renders
frontend/src/App.tsx - App coordinator → Vehicle list: renders
frontend/src/App.tsx - App coordinator → Express API: loads and deletes
frontend/src/App.tsx - Vehicle form → Express API: submits vehicle
frontend/src/components/VehicleForm.tsx - Vehicle form → App coordinator: requests refresh
frontend/src/components/VehicleForm.tsx - App coordinator → Vehicle list: passes vehicles
frontend/src/App.tsx - Vehicle list → App coordinator: dispatches deletion
frontend/src/components/VehicleList.tsx - Vehicle list → Vehicle type: uses type
frontend/src/components/VehicleList.tsx - App coordinator → Vehicle type: uses type
frontend/src/App.tsx - Express API → Vehicle repository: calls CRUD
backend/src/api/server.ts - Vehicle repository → SQLite database: queries and writes
backend/src/data/vehicleRepository.ts - Vehicle repository → Vehicle model: uses types
backend/src/data/vehicleRepository.ts