# ajeetht25-hub/bike-website architecture

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

- Interactive diagram: https://gitdiagram.com/ajeetht25-hub/bike-website
- Repository: https://github.com/ajeetht25-hub/bike-website

## Overview

This is a responsive, browser-based bike-selling storefront with account and customer-dashboard pages. The intended shopping journey is to browse bikes, add them to the cart, proceed through checkout, and reach order confirmation. The tree also shows login, registration, profile, and order pages. The README documents catalog, product-detail, contact, and cart capabilities, but some named pages are absent from the supplied tree. Source excerpts show dashboard behavior and dark-mode persistence; other page-to-page links follow the README’s documented workflow, not inspected page code.

Main entry points: [`dashboard.js`](https://github.com/ajeetht25-hub/bike-website/blob/main/dashboard.js) (Dashboard behavior), [`index.html`](https://github.com/ajeetht25-hub/bike-website/blob/main/index.html) (Bike storefront), [`order.html`](https://github.com/ajeetht25-hub/bike-website/blob/main/order.html) (Order page), [`profile-edit.html`](https://github.com/ajeetht25-hub/bike-website/blob/main/profile-edit.html) (Profile editing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Storefront"]
  node_home["Bike storefront<br/>[index.html]"]
  node_catalog["Bike catalog<br/>[index.html]"]
end

subgraph group_purchase["Purchase flow"]
  node_cart["Shopping cart<br/>[cart.html]"]
  node_checkout["Checkout<br/>[checkout.html]"]
  node_orders["Order page<br/>[order.html]"]
  node_confirmation["Order confirmation"]
end

subgraph group_account["Account and orders"]
  node_login["Login<br/>[login.html]"]
  node_register["Registration<br/>[register.html]"]
  node_dashboard["Dashboard<br/>[dashboard.html]"]
  node_dashboard_logic["Dashboard behavior<br/>[dashboard.js]"]
  node_profile["Profile editing<br/>[profile-edit.html]"]
end

subgraph group_shared["Shared interface"]
  node_theme_logic["Dark-mode toggle<br/>[darkmode.js]"]
  node_styles["Site styling<br/>[style.css]"]
  node_profile_styles["Profile styling<br/>[profile.css]"]
end

node_shopper(("Shopper"))

node_shopper -->|"browses"| node_home
node_home -->|"explores bikes"| node_catalog
node_catalog -->|"adds bikes"| node_cart
node_cart -->|"proceeds to"| node_checkout
node_checkout -.->|"places order"| node_orders
node_orders -.->|"confirms order"| node_confirmation
node_shopper -.->|"signs in"| node_login
node_shopper -.->|"creates account"| node_register
node_dashboard -->|"runs"| node_dashboard_logic
node_dashboard_logic -->|"redirects if logged out"| node_login
node_dashboard_logic -.->|"loads profile"| node_profile
node_shopper -.->|"edits profile"| node_profile
node_dashboard_logic -->|"updates order views"| node_orders
node_dashboard_logic -.->|"applies dark mode"| node_theme_logic
node_theme_logic -->|"persists preference"| node_shopper
node_home -.->|"uses styles"| node_styles
node_profile -.->|"uses styles"| node_profile_styles

click node_home "https://github.com/ajeetht25-hub/bike-website/blob/main/index.html"
click node_catalog "https://github.com/ajeetht25-hub/bike-website/blob/main/index.html"
click node_cart "https://github.com/ajeetht25-hub/bike-website/blob/main/cart.html"
click node_checkout "https://github.com/ajeetht25-hub/bike-website/blob/main/checkout.html"
click node_orders "https://github.com/ajeetht25-hub/bike-website/blob/main/order.html"
click node_confirmation "https://github.com/ajeetht25-hub/bike-website/blob/main/orderconfirmation.html"
click node_login "https://github.com/ajeetht25-hub/bike-website/blob/main/login.html"
click node_register "https://github.com/ajeetht25-hub/bike-website/blob/main/register.html"
click node_dashboard "https://github.com/ajeetht25-hub/bike-website/blob/main/dashboard.html"
click node_dashboard_logic "https://github.com/ajeetht25-hub/bike-website/blob/main/dashboard.js"
click node_profile "https://github.com/ajeetht25-hub/bike-website/blob/main/profile-edit.html"
click node_theme_logic "https://github.com/ajeetht25-hub/bike-website/blob/main/darkmode.js"
click node_styles "https://github.com/ajeetht25-hub/bike-website/blob/main/css/style.css"
click node_profile_styles "https://github.com/ajeetht25-hub/bike-website/blob/main/css/profile.css"

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 toneBlue
class node_cart,node_checkout,node_orders,node_confirmation toneAmber
class node_login,node_register,node_dashboard,node_dashboard_logic,node_profile toneMint
class node_theme_logic,node_styles,node_profile_styles toneRose
class node_shopper toneIndigo
```

## Components

### Storefront

- [Bike storefront](https://github.com/ajeetht25-hub/bike-website/blob/main/index.html): `index.html`
- [Bike catalog](https://github.com/ajeetht25-hub/bike-website/blob/main/index.html): `index.html`

### Purchase flow

- [Shopping cart](https://github.com/ajeetht25-hub/bike-website/blob/main/cart.html): `cart.html`
- [Checkout](https://github.com/ajeetht25-hub/bike-website/blob/main/checkout.html): `checkout.html`
- [Order page](https://github.com/ajeetht25-hub/bike-website/blob/main/order.html): `order.html`
- [Order confirmation](https://github.com/ajeetht25-hub/bike-website/blob/main/orderconfirmation.html): `orderconfirmation.html`

### Account and orders

- [Login](https://github.com/ajeetht25-hub/bike-website/blob/main/login.html): `login.html`
- [Registration](https://github.com/ajeetht25-hub/bike-website/blob/main/register.html): `register.html`
- [Dashboard](https://github.com/ajeetht25-hub/bike-website/blob/main/dashboard.html): `dashboard.html`
- [Dashboard behavior](https://github.com/ajeetht25-hub/bike-website/blob/main/dashboard.js): `dashboard.js`
- [Profile editing](https://github.com/ajeetht25-hub/bike-website/blob/main/profile-edit.html): `profile-edit.html`

### Shared interface

- [Dark-mode toggle](https://github.com/ajeetht25-hub/bike-website/blob/main/darkmode.js): `darkmode.js`
- [Site styling](https://github.com/ajeetht25-hub/bike-website/blob/main/css/style.css): `css/style.css`
- [Profile styling](https://github.com/ajeetht25-hub/bike-website/blob/main/css/profile.css): `css/profile.css`

### Other components

- **Shopper**

## Connections

- Shopper → Bike storefront: browses (evidence: `README.md`)
- Bike storefront → Bike catalog: explores bikes (evidence: `README.md`)
- Bike catalog → Shopping cart: adds bikes (evidence: `README.md`)
- Shopping cart → Checkout: proceeds to (evidence: `README.md`)
- Checkout → Order page: places order
- Order page → Order confirmation: confirms order
- Shopper → Login: signs in
- Shopper → Registration: creates account
- Dashboard → Dashboard behavior: runs (evidence: `dashboard.js`)
- Dashboard behavior → Login: redirects if logged out (evidence: `dashboard.js`)
- Dashboard behavior → Profile editing: loads profile
- Shopper → Profile editing: edits profile
- Dashboard behavior → Order page: updates order views (evidence: `dashboard.js`)
- Dashboard behavior → Dark-mode toggle: applies dark mode
- Dark-mode toggle → Shopper: persists preference (evidence: `darkmode.js`)
- Bike storefront → Site styling: uses styles
- Profile editing → Profile styling: uses styles
