How gkishan5499/compareauto works
CompareAuto is a vehicle-discovery and ownership-research platform with a public site, an administrative console, and an API. The main user journey moves from browsing or searching vehicles to reviewing model and variant details, specifications, comparisons, prices, and dealer or enquiry options; news, used and upcoming cars, and calculators are distinct supporting capabilities. The backend exposes these domains through Express routes and persists catalog and content records in MongoDB models. The tree and excerpts support the application boundaries and selected controller behavior; wiring within unsampled frontend pages and most backend domains is not asserted.
Main entry points: App.tsx Public app · specsCSV.controller.ts Specs CSV import · app.ts API application · variant.controller.ts Variant controller
Components 26
Public discovery
- Public app
frontend/src/App.tsx - Browse vehicles
frontend/src/pages/Index.tsx - Brands and models
frontend/src/pages/BrandModels.tsx - Model and variant
frontend/src/pages/ModelOverview.tsx - Compare cars
frontend/src/pages/Compare.tsx - Pricing tools
frontend/src/pages/Tools.tsx - Used cars
frontend/src/pages/UsedCars.tsx - News and launches
frontend/src/pages/News.tsx - Enquiry form
frontend/src/components/enquiry/EnquiryForm.tsx
Backend API
- API application
backend/src/app.ts - Search endpoints
backend/src/routes/search.routes.ts - Review endpoints
backend/src/routes/review.routes.ts - Variant controller
backend/src/controllers/variant.controller.ts - Specifications controller
backend/src/controllers/space/specs.controller.ts - Specs CSV import
backend/src/controllers/space/specsCSV.controller.ts - Enquiry controller
backend/src/controllers/enquiry.controller.ts
Administration
- Admin console
admin/src/App.tsx - Admin route map
admin/src/routes/AppRoutes.tsx - Carousel manager
admin/src/pages/HeroCarousel/HeroCarouselManager.tsx
Domain state
- Catalog records
backend/src/models/CarModel.model.ts - Brand records
backend/src/models/Brand.model.ts - Variant records
backend/src/models/Variant.model.ts - Vehicle specifications
backend/src/models/carSpace/CarSpecs.model.ts - Review records
backend/src/models/Review.model.ts - Enquiry records
backend/src/models/Enquiry.model.ts
Other components
- Vehicle shopper
Connections 22
- Vehicle shopper → Public app: uses
- Public app → Browse vehicles: routes to
- Public app → Brands and models: routes to
- Public app → Model and variant: routes to
- Public app → Compare cars: routes to
- Public app → Pricing tools: routes to
- Public app → Used cars: routes to
- Public app → News and launches: routes to
- Public app → Enquiry form: renders
- API application → Search endpoints: mounts
- API application → Review endpoints: mounts
- Review endpoints → Review records: dispatches
- Variant controller → Variant records: reads/writes
- Variant controller → Vehicle specifications: upserts specs
- Specs CSV import → Brand records: looks up
- Specs CSV import → Catalog records: looks up
- Specs CSV import → Variant records: reads/writes
- Specs CSV import → Vehicle specifications: creates specs
- Enquiry controller → Enquiry records: persists enquiry
- Admin console → Admin route map: routes to
- Admin route map → Carousel manager: protects route
- Carousel manager → API application: posts API requests