# macky2javier2006-prog/autopick2 architecture

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

- Interactive diagram: https://gitdiagram.com/macky2javier2006-prog/autopick2
- Repository: https://github.com/macky2javier2006-prog/autopick2

## Overview

AutoPick is a React vehicle-selection application. A user interacts with the single large App component, which contains vehicle, preference, scoring, purchase-points, and account/referral UI and logic; the excerpts do not establish separate services or persistence. The app is mounted by the browser entry point and imports a toast host. The remaining graph captures the reusable UI layer and its evidenced dependencies. App internals are only partially excerpted, so their domain responsibilities are represented without guessing internal call order.

Main entry points: [`src/app/components/ui/utils.ts`](https://github.com/macky2javier2006-prog/autopick2/blob/main/src/app/components/ui/utils.ts) (Class utilities), [`src/app/components/ui/sidebar.tsx`](https://github.com/macky2javier2006-prog/autopick2/blob/main/src/app/components/ui/sidebar.tsx) (Sidebar), [`src/main.tsx`](https://github.com/macky2javier2006-prog/autopick2/blob/main/src/main.tsx) (React entry point), [`src/app/App.tsx`](https://github.com/macky2javier2006-prog/autopick2/blob/main/src/app/App.tsx) (Vehicle selection app)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_product["AutoPick app"]
  node_entry["React entry point<br/>[main.tsx]"]
  node_app["Vehicle selection app<br/>[App.tsx]"]
  node_match["Vehicle preferences and scoring<br/>[App.tsx]"]
  node_purchase["Purchase points<br/>[App.tsx]"]
  node_account["Account and referrals<br/>[App.tsx]"]
end

subgraph group_ui["UI components"]
  node_toast["Toast host<br/>[sonner.tsx]"]
  node_button["Button<br/>[button.tsx]"]
  node_chart["Charts<br/>[chart.tsx]"]
  node_dialog["Dialogs<br/>[dialog.tsx]"]
  node_dropdown["Dropdown menus<br/>[dropdown-menu.tsx]"]
  node_menubar["Menubars<br/>[menubar.tsx]"]
  node_sheet["Sheets<br/>[sheet.tsx]"]
  node_sidebar["Sidebar<br/>[sidebar.tsx]"]
  node_contextmenu["Context menus<br/>[context-menu.tsx]"]
end

subgraph group_shared["UI foundations"]
  node_utils["Class utilities<br/>[utils.ts]"]
  node_mobile["Mobile detection<br/>[use-mobile.ts]"]
end

node_user(("Vehicle shopper"))

node_user -->|"opens app"| node_entry
node_entry -->|"mounts"| node_app
node_app -->|"renders"| node_toast
node_sidebar -->|"uses"| node_sheet
node_sidebar -->|"checks viewport"| node_mobile
node_sidebar -->|"renders"| node_button
node_sidebar -.-> node_dropdown
node_dialog -->|"merges classes"| node_utils
node_sheet -->|"merges classes"| node_utils
node_button -->|"merges classes"| node_utils
node_chart -->|"merges classes"| node_utils
node_dropdown -.->|"merges classes"| node_utils
node_menubar -.->|"merges classes"| node_utils
node_contextmenu -->|"merges classes"| node_utils

click node_entry "https://github.com/macky2javier2006-prog/autopick2/blob/main/src/main.tsx"
click node_app "https://github.com/macky2javier2006-prog/autopick2/blob/main/src/app/App.tsx"
click node_match "https://github.com/macky2javier2006-prog/autopick2/blob/main/src/app/App.tsx"
click node_purchase "https://github.com/macky2javier2006-prog/autopick2/blob/main/src/app/App.tsx"
click node_account "https://github.com/macky2javier2006-prog/autopick2/blob/main/src/app/App.tsx"
click node_toast "https://github.com/macky2javier2006-prog/autopick2/blob/main/src/app/components/ui/sonner.tsx"
click node_button "https://github.com/macky2javier2006-prog/autopick2/blob/main/src/app/components/ui/button.tsx"
click node_chart "https://github.com/macky2javier2006-prog/autopick2/blob/main/src/app/components/ui/chart.tsx"
click node_dialog "https://github.com/macky2javier2006-prog/autopick2/blob/main/src/app/components/ui/dialog.tsx"
click node_dropdown "https://github.com/macky2javier2006-prog/autopick2/blob/main/src/app/components/ui/dropdown-menu.tsx"
click node_menubar "https://github.com/macky2javier2006-prog/autopick2/blob/main/src/app/components/ui/menubar.tsx"
click node_sheet "https://github.com/macky2javier2006-prog/autopick2/blob/main/src/app/components/ui/sheet.tsx"
click node_sidebar "https://github.com/macky2javier2006-prog/autopick2/blob/main/src/app/components/ui/sidebar.tsx"
click node_contextmenu "https://github.com/macky2javier2006-prog/autopick2/blob/main/src/app/components/ui/context-menu.tsx"
click node_utils "https://github.com/macky2javier2006-prog/autopick2/blob/main/src/app/components/ui/utils.ts"
click node_mobile "https://github.com/macky2javier2006-prog/autopick2/blob/main/src/app/components/ui/use-mobile.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_entry,node_app,node_match,node_purchase,node_account toneBlue
class node_toast,node_button,node_chart,node_dialog,node_dropdown,node_menubar,node_sheet,node_sidebar,node_contextmenu toneAmber
class node_utils,node_mobile toneMint
class node_user toneIndigo
```

## Components

### AutoPick app

- [React entry point](https://github.com/macky2javier2006-prog/autopick2/blob/main/src/main.tsx): `src/main.tsx`
- [Vehicle selection app](https://github.com/macky2javier2006-prog/autopick2/blob/main/src/app/App.tsx): `src/app/App.tsx`
- [Vehicle preferences and scoring](https://github.com/macky2javier2006-prog/autopick2/blob/main/src/app/App.tsx): `src/app/App.tsx`
- [Purchase points](https://github.com/macky2javier2006-prog/autopick2/blob/main/src/app/App.tsx): `src/app/App.tsx`
- [Account and referrals](https://github.com/macky2javier2006-prog/autopick2/blob/main/src/app/App.tsx): `src/app/App.tsx`

### UI components

- [Toast host](https://github.com/macky2javier2006-prog/autopick2/blob/main/src/app/components/ui/sonner.tsx): `src/app/components/ui/sonner.tsx`
- [Button](https://github.com/macky2javier2006-prog/autopick2/blob/main/src/app/components/ui/button.tsx): `src/app/components/ui/button.tsx`
- [Charts](https://github.com/macky2javier2006-prog/autopick2/blob/main/src/app/components/ui/chart.tsx): `src/app/components/ui/chart.tsx`
- [Dialogs](https://github.com/macky2javier2006-prog/autopick2/blob/main/src/app/components/ui/dialog.tsx): `src/app/components/ui/dialog.tsx`
- [Dropdown menus](https://github.com/macky2javier2006-prog/autopick2/blob/main/src/app/components/ui/dropdown-menu.tsx): `src/app/components/ui/dropdown-menu.tsx`
- [Menubars](https://github.com/macky2javier2006-prog/autopick2/blob/main/src/app/components/ui/menubar.tsx): `src/app/components/ui/menubar.tsx`
- [Sheets](https://github.com/macky2javier2006-prog/autopick2/blob/main/src/app/components/ui/sheet.tsx): `src/app/components/ui/sheet.tsx`
- [Sidebar](https://github.com/macky2javier2006-prog/autopick2/blob/main/src/app/components/ui/sidebar.tsx): `src/app/components/ui/sidebar.tsx`
- [Context menus](https://github.com/macky2javier2006-prog/autopick2/blob/main/src/app/components/ui/context-menu.tsx): `src/app/components/ui/context-menu.tsx`

### UI foundations

- [Class utilities](https://github.com/macky2javier2006-prog/autopick2/blob/main/src/app/components/ui/utils.ts): `src/app/components/ui/utils.ts`
- [Mobile detection](https://github.com/macky2javier2006-prog/autopick2/blob/main/src/app/components/ui/use-mobile.ts): `src/app/components/ui/use-mobile.ts`

### Other components

- **Vehicle shopper**

## Connections

- Vehicle shopper → React entry point: opens app (evidence: `src/main.tsx`)
- React entry point → Vehicle selection app: mounts (evidence: `src/main.tsx`)
- Vehicle selection app → Toast host: renders (evidence: `src/app/App.tsx`)
- Sidebar → Sheets: uses (evidence: `src/app/components/ui/sidebar.tsx`)
- Sidebar → Mobile detection: checks viewport (evidence: `src/app/components/ui/sidebar.tsx`)
- Sidebar → Button: renders (evidence: `src/app/components/ui/sidebar.tsx`)
- Sidebar → Dropdown menus
- Dialogs → Class utilities: merges classes (evidence: `src/app/components/ui/dialog.tsx`)
- Sheets → Class utilities: merges classes (evidence: `src/app/components/ui/sheet.tsx`)
- Button → Class utilities: merges classes (evidence: `src/app/components/ui/button.tsx`)
- Charts → Class utilities: merges classes (evidence: `src/app/components/ui/chart.tsx`)
- Dropdown menus → Class utilities: merges classes (evidence: `src/app/components/ui/dropdown-menu.tsx`)
- Menubars → Class utilities: merges classes (evidence: `src/app/components/ui/menubar.tsx`)
- Context menus → Class utilities: merges classes (evidence: `src/app/components/ui/context-menu.tsx`)
