# istqbtesttrial/motocity-website architecture

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

- Interactive diagram: https://gitdiagram.com/istqbtesttrial/motocity-website
- Repository: https://github.com/istqbtesttrial/motocity-website

## Overview

MotoCity Showroom is a Next.js scooter showroom: visitors browse featured and catalog models, inspect model details, then submit a contact/order request that is validated and emailed to the customer and showroom. Product records feed the home, catalog, detail, and form experiences. The current app’s pages and request flow are excerpted; the separate archived Vite app is represented as a legacy experience, with its internal relationships limited to those shown in the source index and excerpts.

Main entry points: [`app/page.tsx`](https://github.com/istqbtesttrial/motocity-website/blob/main/app/page.tsx) (Home page), [`data/products.ts`](https://github.com/istqbtesttrial/motocity-website/blob/main/data/products.ts) (Product records), [`app/products/page.tsx`](https://github.com/istqbtesttrial/motocity-website/blob/main/app/products/page.tsx) (Catalog page), [`app/products/[slug]/page.tsx`](https://github.com/istqbtesttrial/motocity-website/blob/main/app/products/%5Bslug%5D/page.tsx) (Product detail page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_showroom["Showroom pages"]
  node_home["Home page<br/>[page.tsx]"]
  node_catalog_page["Catalog page<br/>[page.tsx]"]
  node_detail_page["Product detail page<br/>[page.tsx]"]
  node_contact_page["Contact page<br/>[page.tsx]"]
  node_navbar["Navigation<br/>[Navbar.tsx]"]
  node_footer["Footer<br/>[Footer.tsx]"]
end

subgraph group_catalog["Product catalog"]
  node_hero["Featured hero<br/>[HeroPremium.tsx]"]
  node_product_data["Product records<br/>[products.ts]"]
  node_product_grid["Product grid<br/>[ProductGrid.tsx]"]
  node_product_card["Product card<br/>[ProductCard.tsx]"]
  node_product_details["Product details<br/>[ProductDetails.tsx]"]
  node_section_heading["Section heading<br/>[SectionHeading.tsx]"]
end

subgraph group_requests["Customer requests"]
  node_order_form["Order form<br/>[OrderForm.tsx]"]
  node_order_api["Order endpoint<br/>[route.ts]"]
  node_mailer["Order email sender<br/>[mailer.ts]"]
end

subgraph group_legacy["Archived experience"]
  node_legacy_app["Legacy showroom app<br/>[App.tsx]"]
  node_legacy_data["Legacy scooter data<br/>[data.ts]"]
  node_legacy_catalog["Legacy catalog data<br/>[catalog.ts]"]
  node_legacy_intro["Intro experience"]
  node_legacy_scene["Intro scene<br/>[scene.ts]"]
  node_legacy_entry["Legacy app entry<br/>[main.tsx]"]
end

node_visitor(("Visitor"))
node_resend["Resend email service"]

node_visitor -->|"opens"| node_home
node_visitor -->|"browses"| node_catalog_page
node_visitor -->|"selects model"| node_detail_page
node_visitor -->|"requests information"| node_contact_page
node_home -->|"renders"| node_navbar
node_home -->|"renders"| node_hero
node_home -->|"renders"| node_product_grid
node_home -->|"renders"| node_section_heading
node_home -->|"renders"| node_footer
node_catalog_page -->|"renders"| node_navbar
node_catalog_page -->|"renders"| node_product_grid
node_catalog_page -->|"renders"| node_section_heading
node_catalog_page -->|"renders"| node_footer
node_detail_page -->|"renders"| node_navbar
node_detail_page -->|"renders"| node_product_details
node_detail_page -->|"looks up"| node_product_data
node_detail_page -->|"renders"| node_footer
node_contact_page -->|"renders"| node_navbar
node_contact_page -->|"renders"| node_order_form
node_contact_page -->|"passes products"| node_product_data
node_contact_page -->|"renders"| node_footer
node_hero -->|"uses featured product"| node_product_data
node_product_grid -->|"renders"| node_product_card
node_product_grid -->|"uses products"| node_product_data
node_product_card -->|"uses product records"| node_product_data
node_product_details -->|"uses product records"| node_product_data
node_order_form -->|"uses products"| node_product_data
node_order_form -->|"posts request"| node_order_api
node_order_api -->|"sends order"| node_mailer
node_mailer -.->|"sends email"| node_resend
node_legacy_entry -->|"renders"| node_legacy_app
node_legacy_app -->|"uses scooter data"| node_legacy_data
node_legacy_app -->|"renders intro"| node_legacy_intro
node_legacy_intro -->|"uses scene"| node_legacy_scene
node_legacy_data -->|"references catalog"| node_legacy_catalog

click node_home "https://github.com/istqbtesttrial/motocity-website/blob/main/app/page.tsx"
click node_catalog_page "https://github.com/istqbtesttrial/motocity-website/blob/main/app/products/page.tsx"
click node_detail_page "https://github.com/istqbtesttrial/motocity-website/blob/main/app/products/%5Bslug%5D/page.tsx"
click node_contact_page "https://github.com/istqbtesttrial/motocity-website/blob/main/app/contact/page.tsx"
click node_navbar "https://github.com/istqbtesttrial/motocity-website/blob/main/components/Navbar.tsx"
click node_footer "https://github.com/istqbtesttrial/motocity-website/blob/main/components/Footer.tsx"
click node_hero "https://github.com/istqbtesttrial/motocity-website/blob/main/components/HeroPremium.tsx"
click node_product_data "https://github.com/istqbtesttrial/motocity-website/blob/main/data/products.ts"
click node_product_grid "https://github.com/istqbtesttrial/motocity-website/blob/main/components/ProductGrid.tsx"
click node_product_card "https://github.com/istqbtesttrial/motocity-website/blob/main/components/ProductCard.tsx"
click node_product_details "https://github.com/istqbtesttrial/motocity-website/blob/main/components/ProductDetails.tsx"
click node_section_heading "https://github.com/istqbtesttrial/motocity-website/blob/main/components/SectionHeading.tsx"
click node_order_form "https://github.com/istqbtesttrial/motocity-website/blob/main/components/OrderForm.tsx"
click node_order_api "https://github.com/istqbtesttrial/motocity-website/blob/main/app/api/order/route.ts"
click node_mailer "https://github.com/istqbtesttrial/motocity-website/blob/main/lib/mailer.ts"
click node_legacy_app "https://github.com/istqbtesttrial/motocity-website/blob/main/_archive_vite/src/App.tsx"
click node_legacy_data "https://github.com/istqbtesttrial/motocity-website/blob/main/_archive_vite/src/data.ts"
click node_legacy_catalog "https://github.com/istqbtesttrial/motocity-website/blob/main/_archive_vite/src/catalog.ts"
click node_legacy_intro "https://github.com/istqbtesttrial/motocity-website/blob/main/_archive_vite/src/intro/IntroExperience.tsx"
click node_legacy_scene "https://github.com/istqbtesttrial/motocity-website/blob/main/_archive_vite/src/intro/scene.ts"
click node_legacy_entry "https://github.com/istqbtesttrial/motocity-website/blob/main/_archive_vite/src/main.tsx"

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_catalog_page,node_detail_page,node_contact_page,node_navbar,node_footer toneBlue
class node_hero,node_product_data,node_product_grid,node_product_card,node_product_details,node_section_heading toneAmber
class node_order_form,node_order_api,node_mailer toneMint
class node_legacy_app,node_legacy_data,node_legacy_catalog,node_legacy_intro,node_legacy_scene,node_legacy_entry toneRose
class node_visitor,node_resend toneIndigo
```

## Components

### Showroom pages

- [Home page](https://github.com/istqbtesttrial/motocity-website/blob/main/app/page.tsx): `app/page.tsx`
- [Catalog page](https://github.com/istqbtesttrial/motocity-website/blob/main/app/products/page.tsx): `app/products/page.tsx`
- [Product detail page](https://github.com/istqbtesttrial/motocity-website/blob/main/app/products/%5Bslug%5D/page.tsx): `app/products/[slug]/page.tsx`
- [Contact page](https://github.com/istqbtesttrial/motocity-website/blob/main/app/contact/page.tsx): `app/contact/page.tsx`
- [Navigation](https://github.com/istqbtesttrial/motocity-website/blob/main/components/Navbar.tsx): `components/Navbar.tsx`
- [Footer](https://github.com/istqbtesttrial/motocity-website/blob/main/components/Footer.tsx): `components/Footer.tsx`

### Product catalog

- [Featured hero](https://github.com/istqbtesttrial/motocity-website/blob/main/components/HeroPremium.tsx): `components/HeroPremium.tsx`
- [Product records](https://github.com/istqbtesttrial/motocity-website/blob/main/data/products.ts): `data/products.ts`
- [Product grid](https://github.com/istqbtesttrial/motocity-website/blob/main/components/ProductGrid.tsx): `components/ProductGrid.tsx`
- [Product card](https://github.com/istqbtesttrial/motocity-website/blob/main/components/ProductCard.tsx): `components/ProductCard.tsx`
- [Product details](https://github.com/istqbtesttrial/motocity-website/blob/main/components/ProductDetails.tsx): `components/ProductDetails.tsx`
- [Section heading](https://github.com/istqbtesttrial/motocity-website/blob/main/components/SectionHeading.tsx): `components/SectionHeading.tsx`

### Customer requests

- [Order form](https://github.com/istqbtesttrial/motocity-website/blob/main/components/OrderForm.tsx): `components/OrderForm.tsx`
- [Order endpoint](https://github.com/istqbtesttrial/motocity-website/blob/main/app/api/order/route.ts): `app/api/order/route.ts`
- [Order email sender](https://github.com/istqbtesttrial/motocity-website/blob/main/lib/mailer.ts): `lib/mailer.ts`

### Archived experience

- [Legacy showroom app](https://github.com/istqbtesttrial/motocity-website/blob/main/_archive_vite/src/App.tsx): `_archive_vite/src/App.tsx`
- [Legacy scooter data](https://github.com/istqbtesttrial/motocity-website/blob/main/_archive_vite/src/data.ts): `_archive_vite/src/data.ts`
- [Legacy catalog data](https://github.com/istqbtesttrial/motocity-website/blob/main/_archive_vite/src/catalog.ts): `_archive_vite/src/catalog.ts`
- [Intro experience](https://github.com/istqbtesttrial/motocity-website/blob/main/_archive_vite/src/intro/IntroExperience.tsx): `_archive_vite/src/intro/IntroExperience.tsx`
- [Intro scene](https://github.com/istqbtesttrial/motocity-website/blob/main/_archive_vite/src/intro/scene.ts): `_archive_vite/src/intro/scene.ts`
- [Legacy app entry](https://github.com/istqbtesttrial/motocity-website/blob/main/_archive_vite/src/main.tsx): `_archive_vite/src/main.tsx`

### Other components

- **Visitor**
- **Resend email service**

## Connections

- Visitor → Home page: opens (evidence: `app/page.tsx`)
- Visitor → Catalog page: browses (evidence: `app/products/page.tsx`)
- Visitor → Product detail page: selects model (evidence: `app/products/[slug]/page.tsx`)
- Visitor → Contact page: requests information (evidence: `app/contact/page.tsx`)
- Home page → Navigation: renders (evidence: `app/page.tsx`)
- Home page → Featured hero: renders (evidence: `app/page.tsx`)
- Home page → Product grid: renders (evidence: `app/page.tsx`)
- Home page → Section heading: renders (evidence: `app/page.tsx`)
- Home page → Footer: renders (evidence: `app/page.tsx`)
- Catalog page → Navigation: renders (evidence: `app/products/page.tsx`)
- Catalog page → Product grid: renders (evidence: `app/products/page.tsx`)
- Catalog page → Section heading: renders (evidence: `app/products/page.tsx`)
- Catalog page → Footer: renders (evidence: `app/products/page.tsx`)
- Product detail page → Navigation: renders (evidence: `app/products/[slug]/page.tsx`)
- Product detail page → Product details: renders (evidence: `app/products/[slug]/page.tsx`)
- Product detail page → Product records: looks up (evidence: `app/products/[slug]/page.tsx`)
- Product detail page → Footer: renders (evidence: `app/products/[slug]/page.tsx`)
- Contact page → Navigation: renders (evidence: `app/contact/page.tsx`)
- Contact page → Order form: renders (evidence: `app/contact/page.tsx`)
- Contact page → Product records: passes products (evidence: `app/contact/page.tsx`)
- Contact page → Footer: renders (evidence: `app/contact/page.tsx`)
- Featured hero → Product records: uses featured product (evidence: `components/HeroPremium.tsx`)
- Product grid → Product card: renders (evidence: `components/ProductGrid.tsx`)
- Product grid → Product records: uses products (evidence: `components/ProductGrid.tsx`)
- Product card → Product records: uses product records (evidence: `components/ProductCard.tsx`)
- Product details → Product records: uses product records (evidence: `components/ProductDetails.tsx`)
- Order form → Product records: uses products (evidence: `components/OrderForm.tsx`)
- Order form → Order endpoint: posts request (evidence: `components/OrderForm.tsx`)
- Order endpoint → Order email sender: sends order (evidence: `app/api/order/route.ts`)
- Order email sender → Resend email service: sends email (evidence: `README.md`)
- Legacy app entry → Legacy showroom app: renders (evidence: `_archive_vite/src/main.tsx`)
- Legacy showroom app → Legacy scooter data: uses scooter data (evidence: `_archive_vite/src/App.tsx`)
- Legacy showroom app → Intro experience: renders intro (evidence: `_archive_vite/src/App.tsx`)
- Intro experience → Intro scene: uses scene (evidence: `_archive_vite/src/intro/IntroExperience.tsx`)
- Legacy scooter data → Legacy catalog data: references catalog (evidence: `_archive_vite/src/data.ts`)
