# selenophile-67/tastebuds architecture

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

- Interactive diagram: https://gitdiagram.com/selenophile-67/tastebuds
- Repository: https://github.com/selenophile-67/tastebuds

## Overview

TasteBuds is a frontend restaurant-discovery and food-ordering demonstration. Customers search from the homepage, browse restaurant listings, inspect a restaurant and its menu, then manage items in a cart; authentication and reviews are also frontend features. Shared context persists cart, user and review state in localStorage. The README documents filters, cuisine/menu details, ordering totals and confirmation, but sampled excerpts do not expose all of those implementations. No live backend or payment integration is configured.

Main entry points: [`src/routes/restaurant.$id.tsx`](https://github.com/selenophile-67/tastebuds/blob/main/src/routes/restaurant.%24id.tsx) (Restaurant details), [`src/routes/restaurants.tsx`](https://github.com/selenophile-67/tastebuds/blob/main/src/routes/restaurants.tsx) (Restaurant listings), [`src/routes/__root.tsx`](https://github.com/selenophile-67/tastebuds/blob/main/src/routes/__root.tsx) (Root application), [`src/routeTree.gen.ts`](https://github.com/selenophile-67/tastebuds/blob/main/src/routeTree.gen.ts) (Route registry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Restaurant discovery"]
  node_home["Homepage search<br/>[index.tsx]"]
  node_listing["Restaurant listings<br/>[restaurants.tsx]"]
  node_restaurant["Restaurant details<br/>[restaurant.$id.tsx]"]
  node_restaurant_data["Restaurant data<br/>[data.ts]"]
  node_restaurant_card["Restaurant cards<br/>[RestaurantCard.tsx]"]
  node_rating["Ratings display<br/>[Rating.tsx]"]
end

subgraph group_ordering["Ordering and account"]
  node_app_store["Client state<br/>[store.tsx]"]
  node_cart_drawer["Cart and totals<br/>[CartDrawer.tsx]"]
  node_auth_modal["Authentication UI<br/>[AuthModal.tsx]"]
end

subgraph group_shell["Application shell"]
  node_navbar["Navigation bar<br/>[Navbar.tsx]"]
  node_root["Root application<br/>[__root.tsx]"]
  node_route_tree["Route registry<br/>[routeTree.gen.ts]"]
  node_router["Router setup<br/>[router.tsx]"]
end

subgraph group_runtime["Server errors"]
  node_server["SSR request handler<br/>[server.ts]"]
  node_error_capture["Error capture<br/>[error-capture.ts]"]
  node_error_page["Error page<br/>[error-page.ts]"]
  node_error_reporting["Error reporting"]
end

node_customer(("Customer"))

node_customer -->|"searches"| node_home
node_home -->|"navigates"| node_listing
node_home -->|"reads"| node_restaurant_data
node_home -->|"renders"| node_restaurant_card
node_listing -->|"reads"| node_restaurant_data
node_listing -->|"renders"| node_restaurant_card
node_customer -->|"filters"| node_listing
node_listing -->|"opens details"| node_restaurant
node_restaurant -->|"reads"| node_restaurant_data
node_restaurant -->|"renders"| node_rating
node_restaurant -->|"updates cart and reviews"| node_app_store
node_restaurant -->|"shows menu and reviews"| node_customer
node_root -->|"provides state"| node_app_store
node_root -->|"renders"| node_auth_modal
node_root -->|"renders"| node_cart_drawer
node_auth_modal -->|"updates user"| node_app_store
node_cart_drawer -->|"reads and updates"| node_app_store
node_navbar -->|"reads and updates"| node_app_store
node_route_tree -->|"registers"| node_root
node_route_tree -->|"registers"| node_home
node_route_tree -->|"registers"| node_listing
node_route_tree -->|"registers"| node_restaurant
node_router -->|"configures"| node_route_tree
node_root -->|"reports errors"| node_error_reporting
node_server -->|"consumes errors"| node_error_capture
node_server -->|"renders on failure"| node_error_page
node_customer -->|"places demo order"| node_cart_drawer

click node_home "https://github.com/selenophile-67/tastebuds/blob/main/src/routes/index.tsx"
click node_listing "https://github.com/selenophile-67/tastebuds/blob/main/src/routes/restaurants.tsx"
click node_restaurant "https://github.com/selenophile-67/tastebuds/blob/main/src/routes/restaurant.%24id.tsx"
click node_restaurant_data "https://github.com/selenophile-67/tastebuds/blob/main/src/lib/data.ts"
click node_restaurant_card "https://github.com/selenophile-67/tastebuds/blob/main/src/components/RestaurantCard.tsx"
click node_rating "https://github.com/selenophile-67/tastebuds/blob/main/src/components/Rating.tsx"
click node_app_store "https://github.com/selenophile-67/tastebuds/blob/main/src/lib/store.tsx"
click node_cart_drawer "https://github.com/selenophile-67/tastebuds/blob/main/src/components/CartDrawer.tsx"
click node_auth_modal "https://github.com/selenophile-67/tastebuds/blob/main/src/components/AuthModal.tsx"
click node_navbar "https://github.com/selenophile-67/tastebuds/blob/main/src/components/Navbar.tsx"
click node_root "https://github.com/selenophile-67/tastebuds/blob/main/src/routes/__root.tsx"
click node_route_tree "https://github.com/selenophile-67/tastebuds/blob/main/src/routeTree.gen.ts"
click node_router "https://github.com/selenophile-67/tastebuds/blob/main/src/router.tsx"
click node_server "https://github.com/selenophile-67/tastebuds/blob/main/src/server.ts"
click node_error_capture "https://github.com/selenophile-67/tastebuds/blob/main/src/lib/error-capture.ts"
click node_error_page "https://github.com/selenophile-67/tastebuds/blob/main/src/lib/error-page.ts"
click node_error_reporting "https://github.com/selenophile-67/tastebuds/blob/main/src/lib/lovable-error-reporting.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_listing,node_restaurant,node_restaurant_data,node_restaurant_card,node_rating toneBlue
class node_app_store,node_cart_drawer,node_auth_modal toneAmber
class node_navbar,node_root,node_route_tree,node_router toneMint
class node_server,node_error_capture,node_error_page,node_error_reporting toneRose
class node_customer toneIndigo
```

## Components

### Restaurant discovery

- [Homepage search](https://github.com/selenophile-67/tastebuds/blob/main/src/routes/index.tsx): `src/routes/index.tsx`
- [Restaurant listings](https://github.com/selenophile-67/tastebuds/blob/main/src/routes/restaurants.tsx): `src/routes/restaurants.tsx`
- [Restaurant details](https://github.com/selenophile-67/tastebuds/blob/main/src/routes/restaurant.%24id.tsx): `src/routes/restaurant.$id.tsx`
- [Restaurant data](https://github.com/selenophile-67/tastebuds/blob/main/src/lib/data.ts): `src/lib/data.ts`
- [Restaurant cards](https://github.com/selenophile-67/tastebuds/blob/main/src/components/RestaurantCard.tsx): `src/components/RestaurantCard.tsx`
- [Ratings display](https://github.com/selenophile-67/tastebuds/blob/main/src/components/Rating.tsx): `src/components/Rating.tsx`

### Ordering and account

- [Client state](https://github.com/selenophile-67/tastebuds/blob/main/src/lib/store.tsx): `src/lib/store.tsx`
- [Cart and totals](https://github.com/selenophile-67/tastebuds/blob/main/src/components/CartDrawer.tsx): `src/components/CartDrawer.tsx`
- [Authentication UI](https://github.com/selenophile-67/tastebuds/blob/main/src/components/AuthModal.tsx): `src/components/AuthModal.tsx`

### Application shell

- [Navigation bar](https://github.com/selenophile-67/tastebuds/blob/main/src/components/Navbar.tsx): `src/components/Navbar.tsx`
- [Root application](https://github.com/selenophile-67/tastebuds/blob/main/src/routes/__root.tsx): `src/routes/__root.tsx`
- [Route registry](https://github.com/selenophile-67/tastebuds/blob/main/src/routeTree.gen.ts): `src/routeTree.gen.ts`
- [Router setup](https://github.com/selenophile-67/tastebuds/blob/main/src/router.tsx): `src/router.tsx`

### Server errors

- [SSR request handler](https://github.com/selenophile-67/tastebuds/blob/main/src/server.ts): `src/server.ts`
- [Error capture](https://github.com/selenophile-67/tastebuds/blob/main/src/lib/error-capture.ts): `src/lib/error-capture.ts`
- [Error page](https://github.com/selenophile-67/tastebuds/blob/main/src/lib/error-page.ts): `src/lib/error-page.ts`
- [Error reporting](https://github.com/selenophile-67/tastebuds/blob/main/src/lib/lovable-error-reporting.ts): `src/lib/lovable-error-reporting.ts`

### Other components

- **Customer**

## Connections

- Customer → Homepage search: searches (evidence: `README.md`)
- Homepage search → Restaurant listings: navigates (evidence: `src/routes/index.tsx`)
- Homepage search → Restaurant data: reads (evidence: `src/routes/index.tsx`)
- Homepage search → Restaurant cards: renders (evidence: `src/routes/index.tsx`)
- Restaurant listings → Restaurant data: reads (evidence: `src/routes/restaurants.tsx`)
- Restaurant listings → Restaurant cards: renders (evidence: `src/routes/restaurants.tsx`)
- Customer → Restaurant listings: filters (evidence: `README.md`)
- Restaurant listings → Restaurant details: opens details (evidence: `README.md`)
- Restaurant details → Restaurant data: reads (evidence: `src/routes/restaurant.$id.tsx`)
- Restaurant details → Ratings display: renders (evidence: `src/routes/restaurant.$id.tsx`)
- Restaurant details → Client state: updates cart and reviews (evidence: `src/routes/restaurant.$id.tsx`)
- Restaurant details → Customer: shows menu and reviews (evidence: `README.md`)
- Root application → Client state: provides state (evidence: `src/routes/__root.tsx`)
- Root application → Authentication UI: renders (evidence: `src/routes/__root.tsx`)
- Root application → Cart and totals: renders (evidence: `src/routes/__root.tsx`)
- Authentication UI → Client state: updates user (evidence: `src/components/AuthModal.tsx`)
- Cart and totals → Client state: reads and updates (evidence: `src/components/CartDrawer.tsx`)
- Navigation bar → Client state: reads and updates (evidence: `src/components/Navbar.tsx`)
- Route registry → Root application: registers (evidence: `src/routeTree.gen.ts`)
- Route registry → Homepage search: registers (evidence: `src/routeTree.gen.ts`)
- Route registry → Restaurant listings: registers (evidence: `src/routeTree.gen.ts`)
- Route registry → Restaurant details: registers (evidence: `src/routeTree.gen.ts`)
- Router setup → Route registry: configures (evidence: `src/router.tsx`)
- Root application → Error reporting: reports errors (evidence: `src/routes/__root.tsx`)
- SSR request handler → Error capture: consumes errors (evidence: `src/server.ts`)
- SSR request handler → Error page: renders on failure (evidence: `src/server.ts`)
- Customer → Cart and totals: places demo order (evidence: `README.md`)
