# vipul2013/vipdriveverse architecture

> Architecture diagram of the GitHub repository vipul2013/vipdriveverse, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/vipul2013/vipdriveverse
- Repository: https://github.com/vipul2013/vipdriveverse

## Overview

CarVerse is an AI-assisted automotive discovery and ownership-advice web app. Users search from the homepage, view generated vehicle specifications and images, and can continue into comparisons, engine variants, ownership-cost estimates, brand pages, rankings, filtered discovery, or a PIN-protected Dream Garage. The README documents broader AI guidance and comparison capabilities; sampled routes confirm several paths, while unsampled modules are represented at their exact tree paths. Edges are limited to explicit README relationships or visible imports/calls; other documented capabilities are retained without speculative wiring.

Main entry points: [`src/router.tsx`](https://github.com/vipul2013/vipdriveverse/blob/main/src/router.tsx) (Route system), [`src/routes/car.$name.tsx`](https://github.com/vipul2013/vipdriveverse/blob/main/src/routes/car.%24name.tsx) (Car profile), [`src/lib/dream-garage.functions.ts`](https://github.com/vipul2013/vipdriveverse/blob/main/src/lib/dream-garage.functions.ts) (Garage operations), [`src/lib/dream-auth.functions.ts`](https://github.com/vipul2013/vipdriveverse/blob/main/src/lib/dream-auth.functions.ts) (Garage authentication)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Discovery and routing"]
  node_home["Home search<br/>[index.tsx]"]
  node_router["Route system<br/>[router.tsx]"]
  node_brands["Brand directory<br/>[brands.tsx]"]
  node_brandpage["Brand profile<br/>[brand.$name.tsx]"]
  node_finder["Car finder<br/>[finder.tsx]"]
  node_finderlogic["Finder scoring<br/>[finder-scoring.ts]"]
  node_rankings["Car rankings<br/>[rankings.tsx]"]
end

subgraph group_vehicle["Vehicle intelligence"]
  node_cardetail["Car profile<br/>[car.$name.tsx]"]
  node_specs["AI specifications<br/>[car.functions.ts]"]
  node_identity["Car identity<br/>[car-id.ts]"]
  node_engine["Engine options"]
  node_images["Car imagery"]
  node_assistant["AI car expert<br/>[AiAssistant.tsx]"]
end

subgraph group_advice["Comparison and advice"]
  node_compare["Comparison page<br/>[compare.tsx]"]
  node_comparisonai["AI comparison<br/>[car.functions.ts]"]
  node_calculator["Ownership calculator<br/>[calculator.tsx]"]
  node_costlogic["Cost estimation<br/>[cost-calculator.ts]"]
end

subgraph group_accounts["Garage and identity"]
  node_garagepage["Dream Garage<br/>[dream-garage.tsx]"]
  node_garageapi["Garage operations"]
  node_authapi["Garage authentication"]
  node_authsession["Session helpers"]
end

subgraph group_platform["Data and integrations"]
  node_supabase["Supabase service client<br/>[client.server.ts]"]
  node_database[("Supabase data store")]
  node_ai["AI model gateway"]
end

node_driver(("Car shopper"))
node_externalai(("AI provider"))

node_driver -->|"searches"| node_home
node_home -->|"navigates"| node_router
node_router -->|"routes to"| node_cardetail
node_router -->|"routes to"| node_compare
node_router -->|"routes to"| node_finder
node_router -->|"routes to"| node_calculator
node_router -->|"routes to"| node_garagepage
node_router -->|"routes to"| node_brands
node_router -->|"routes to"| node_rankings
node_router -->|"routes to"| node_brandpage
node_cardetail -->|"fetches specs"| node_specs
node_cardetail -->|"uses identity"| node_identity
node_cardetail -->|"fetches variants"| node_engine
node_cardetail -->|"loads images"| node_images
node_cardetail -->|"saves car"| node_garageapi
node_cardetail -->|"checks account"| node_authapi
node_engine -->|"reads and writes"| node_supabase
node_engine -->|"generates options"| node_ai
node_specs -->|"generates specs"| node_ai
node_ai -.->|"requests generation"| node_externalai
node_compare -->|"fetches car data"| node_specs
node_compare -->|"requests analysis"| node_comparisonai
node_calculator -->|"fetches car data"| node_specs
node_calculator -->|"estimates costs"| node_costlogic
node_finder -.->|"scores matches"| node_finderlogic
node_finder -->|"loads images"| node_images
node_brandpage -->|"uses expert"| node_assistant
node_garagepage -->|"authenticates"| node_authapi
node_garagepage -->|"manages cars"| node_garageapi
node_garageapi -->|"requires user"| node_authsession
node_authapi -->|"updates session"| node_authsession
node_garageapi -->|"reads and writes"| node_supabase
node_authapi -->|"reads and writes"| node_supabase
node_supabase -->|"accesses"| node_database
node_home -->|"presents expert"| node_assistant

click node_home "https://github.com/vipul2013/vipdriveverse/blob/main/src/routes/index.tsx"
click node_router "https://github.com/vipul2013/vipdriveverse/blob/main/src/router.tsx"
click node_brands "https://github.com/vipul2013/vipdriveverse/blob/main/src/routes/brands.tsx"
click node_brandpage "https://github.com/vipul2013/vipdriveverse/blob/main/src/routes/brand.%24name.tsx"
click node_finder "https://github.com/vipul2013/vipdriveverse/blob/main/src/routes/finder.tsx"
click node_finderlogic "https://github.com/vipul2013/vipdriveverse/blob/main/src/lib/finder-scoring.ts"
click node_rankings "https://github.com/vipul2013/vipdriveverse/blob/main/src/routes/rankings.tsx"
click node_cardetail "https://github.com/vipul2013/vipdriveverse/blob/main/src/routes/car.%24name.tsx"
click node_specs "https://github.com/vipul2013/vipdriveverse/blob/main/src/lib/car.functions.ts"
click node_identity "https://github.com/vipul2013/vipdriveverse/blob/main/src/lib/car-id.ts"
click node_engine "https://github.com/vipul2013/vipdriveverse/blob/main/src/lib/engine.functions.ts"
click node_images "https://github.com/vipul2013/vipdriveverse/blob/main/src/lib/car-images.functions.ts"
click node_assistant "https://github.com/vipul2013/vipdriveverse/blob/main/src/components/AiAssistant.tsx"
click node_compare "https://github.com/vipul2013/vipdriveverse/blob/main/src/routes/compare.tsx"
click node_comparisonai "https://github.com/vipul2013/vipdriveverse/blob/main/src/lib/car.functions.ts"
click node_calculator "https://github.com/vipul2013/vipdriveverse/blob/main/src/routes/calculator.tsx"
click node_costlogic "https://github.com/vipul2013/vipdriveverse/blob/main/src/lib/cost-calculator.ts"
click node_garagepage "https://github.com/vipul2013/vipdriveverse/blob/main/src/routes/dream-garage.tsx"
click node_garageapi "https://github.com/vipul2013/vipdriveverse/blob/main/src/lib/dream-garage.functions.ts"
click node_authapi "https://github.com/vipul2013/vipdriveverse/blob/main/src/lib/dream-auth.functions.ts"
click node_authsession "https://github.com/vipul2013/vipdriveverse/blob/main/src/lib/dream-auth.server.ts"
click node_supabase "https://github.com/vipul2013/vipdriveverse/blob/main/src/integrations/supabase/client.server.ts"
click node_ai "https://github.com/vipul2013/vipdriveverse/blob/main/src/lib/ai-gateway.server.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_home,node_router,node_brands,node_brandpage,node_finder,node_finderlogic,node_rankings toneBlue
class node_cardetail,node_specs,node_identity,node_engine,node_images,node_assistant toneAmber
class node_compare,node_comparisonai,node_calculator,node_costlogic toneMint
class node_garagepage,node_garageapi,node_authapi,node_authsession toneRose
class node_supabase,node_database,node_ai,node_driver,node_externalai toneIndigo
```

## Components

### Discovery and routing

- [Home search](https://github.com/vipul2013/vipdriveverse/blob/main/src/routes/index.tsx): `src/routes/index.tsx`
- [Route system](https://github.com/vipul2013/vipdriveverse/blob/main/src/router.tsx): `src/router.tsx`
- [Brand directory](https://github.com/vipul2013/vipdriveverse/blob/main/src/routes/brands.tsx): `src/routes/brands.tsx`
- [Brand profile](https://github.com/vipul2013/vipdriveverse/blob/main/src/routes/brand.%24name.tsx): `src/routes/brand.$name.tsx`
- [Car finder](https://github.com/vipul2013/vipdriveverse/blob/main/src/routes/finder.tsx): `src/routes/finder.tsx`
- [Finder scoring](https://github.com/vipul2013/vipdriveverse/blob/main/src/lib/finder-scoring.ts): `src/lib/finder-scoring.ts`
- [Car rankings](https://github.com/vipul2013/vipdriveverse/blob/main/src/routes/rankings.tsx): `src/routes/rankings.tsx`

### Vehicle intelligence

- [Car profile](https://github.com/vipul2013/vipdriveverse/blob/main/src/routes/car.%24name.tsx): `src/routes/car.$name.tsx`
- [AI specifications](https://github.com/vipul2013/vipdriveverse/blob/main/src/lib/car.functions.ts): `src/lib/car.functions.ts`
- [Car identity](https://github.com/vipul2013/vipdriveverse/blob/main/src/lib/car-id.ts): `src/lib/car-id.ts`
- [Engine options](https://github.com/vipul2013/vipdriveverse/blob/main/src/lib/engine.functions.ts): `src/lib/engine.functions.ts`
- [Car imagery](https://github.com/vipul2013/vipdriveverse/blob/main/src/lib/car-images.functions.ts): `src/lib/car-images.functions.ts`
- [AI car expert](https://github.com/vipul2013/vipdriveverse/blob/main/src/components/AiAssistant.tsx): `src/components/AiAssistant.tsx`

### Comparison and advice

- [Comparison page](https://github.com/vipul2013/vipdriveverse/blob/main/src/routes/compare.tsx): `src/routes/compare.tsx`
- [AI comparison](https://github.com/vipul2013/vipdriveverse/blob/main/src/lib/car.functions.ts): `src/lib/car.functions.ts`
- [Ownership calculator](https://github.com/vipul2013/vipdriveverse/blob/main/src/routes/calculator.tsx): `src/routes/calculator.tsx`
- [Cost estimation](https://github.com/vipul2013/vipdriveverse/blob/main/src/lib/cost-calculator.ts): `src/lib/cost-calculator.ts`

### Garage and identity

- [Dream Garage](https://github.com/vipul2013/vipdriveverse/blob/main/src/routes/dream-garage.tsx): `src/routes/dream-garage.tsx`
- [Garage operations](https://github.com/vipul2013/vipdriveverse/blob/main/src/lib/dream-garage.functions.ts): `src/lib/dream-garage.functions.ts`
- [Garage authentication](https://github.com/vipul2013/vipdriveverse/blob/main/src/lib/dream-auth.functions.ts): `src/lib/dream-auth.functions.ts`
- [Session helpers](https://github.com/vipul2013/vipdriveverse/blob/main/src/lib/dream-auth.server.ts): `src/lib/dream-auth.server.ts`

### Data and integrations

- [Supabase service client](https://github.com/vipul2013/vipdriveverse/blob/main/src/integrations/supabase/client.server.ts): `src/integrations/supabase/client.server.ts`
- **Supabase data store**
- [AI model gateway](https://github.com/vipul2013/vipdriveverse/blob/main/src/lib/ai-gateway.server.ts): `src/lib/ai-gateway.server.ts`

### Other components

- **Car shopper**
- **AI provider**

## Connections

- Car shopper → Home search: searches (evidence: `src/routes/index.tsx`)
- Home search → Route system: navigates (evidence: `src/routes/index.tsx`)
- Route system → Car profile: routes to (evidence: `src/routeTree.gen.ts`)
- Route system → Comparison page: routes to (evidence: `src/routeTree.gen.ts`)
- Route system → Car finder: routes to (evidence: `src/routeTree.gen.ts`)
- Route system → Ownership calculator: routes to (evidence: `src/routeTree.gen.ts`)
- Route system → Dream Garage: routes to (evidence: `src/routeTree.gen.ts`)
- Route system → Brand directory: routes to (evidence: `src/routeTree.gen.ts`)
- Route system → Car rankings: routes to (evidence: `src/routeTree.gen.ts`)
- Route system → Brand profile: routes to (evidence: `src/routeTree.gen.ts`)
- Car profile → AI specifications: fetches specs (evidence: `src/routes/car.$name.tsx`)
- Car profile → Car identity: uses identity (evidence: `src/routes/car.$name.tsx`)
- Car profile → Engine options: fetches variants (evidence: `src/routes/car.$name.tsx`)
- Car profile → Car imagery: loads images (evidence: `src/routes/car.$name.tsx`)
- Car profile → Garage operations: saves car (evidence: `src/routes/car.$name.tsx`)
- Car profile → Garage authentication: checks account (evidence: `src/routes/car.$name.tsx`)
- Engine options → Supabase service client: reads and writes (evidence: `src/lib/engine.functions.ts`)
- Engine options → AI model gateway: generates options (evidence: `src/lib/engine.functions.ts`)
- AI specifications → AI model gateway: generates specs (evidence: `src/lib/car.functions.ts`)
- AI model gateway → AI provider: requests generation
- Comparison page → AI specifications: fetches car data (evidence: `src/routes/compare.tsx`)
- Comparison page → AI comparison: requests analysis (evidence: `src/lib/car.functions.ts`)
- Ownership calculator → AI specifications: fetches car data (evidence: `src/routes/calculator.tsx`)
- Ownership calculator → Cost estimation: estimates costs (evidence: `src/routes/calculator.tsx`)
- Car finder → Finder scoring: scores matches
- Car finder → Car imagery: loads images (evidence: `src/routes/finder.tsx`)
- Brand profile → AI car expert: uses expert (evidence: `src/components/AiAssistant.tsx`)
- Dream Garage → Garage authentication: authenticates (evidence: `src/routes/dream-garage.tsx`)
- Dream Garage → Garage operations: manages cars (evidence: `src/routes/dream-garage.tsx`)
- Garage operations → Session helpers: requires user (evidence: `src/lib/dream-garage.functions.ts`)
- Garage authentication → Session helpers: updates session (evidence: `src/lib/dream-auth.functions.ts`)
- Garage operations → Supabase service client: reads and writes (evidence: `src/lib/dream-garage.functions.ts`)
- Garage authentication → Supabase service client: reads and writes (evidence: `src/lib/dream-auth.functions.ts`)
- Supabase service client → Supabase data store: accesses (evidence: `src/integrations/supabase/client.server.ts`)
- Home search → AI car expert: presents expert (evidence: `src/routes/index.tsx`)
