# ramtnv/dynamichomewebsite architecture

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

- Interactive diagram: https://gitdiagram.com/ramtnv/dynamichomewebsite
- Repository: https://github.com/ramtnv/dynamichomewebsite

## Overview

Atelier & Co. is a configurable storefront with a React customer experience and protected admin, backed by an Express API and SQLite. The customer path runs from browsing and filtering products through cart and checkout preference selection to an order confirmation and downloadable PDF; payment itself is not processed. Admins manage site content, themes, products, and publication, while customers can submit contact messages. The graph uses the supplied excerpts and README; some server routes and frontend page details are documented but not excerpted, so those links are cited to the README.

Main entry points: [`src/api.ts`](https://github.com/ramtnv/dynamichomewebsite/blob/main/src/api.ts) (API client), [`src/App.tsx`](https://github.com/ramtnv/dynamichomewebsite/blob/main/src/App.tsx) (App and routes), [`src/PublicPages.tsx`](https://github.com/ramtnv/dynamichomewebsite/blob/main/src/PublicPages.tsx) (Public pages), [`server/index.ts`](https://github.com/ramtnv/dynamichomewebsite/blob/main/server/index.ts) (Express API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Public storefront"]
  node_app["App and routes<br/>[App.tsx]"]
  node_public["Public pages<br/>[PublicPages.tsx]"]
  node_contact["Contact messages<br/>[PublicPages.tsx]"]
end

subgraph group_commerce["Shopping and orders"]
  node_cart["Cart state<br/>[CartContext.tsx]"]
  node_orders["Checkout and orders<br/>[PublicPages.tsx]"]
end

subgraph group_admin["Administration"]
  node_admin_ui["Admin dashboard<br/>[Admin.tsx]"]
end

subgraph group_backend["API and persistence"]
  node_api_client["API client<br/>[api.ts]"]
  node_api_server["Express API<br/>[index.ts]"]
  node_site_config["Site configuration<br/>[defaults.ts]"]
  node_database[("SQLite data<br/>[db.ts]")]
  node_uploads["Image uploads<br/>[index.ts]"]
end

node_visitor(("Customer"))

node_visitor -->|"opens site"| node_app
node_app -->|"routes to"| node_public
node_app -->|"routes to"| node_admin_ui
node_app -->|"loads site"| node_api_client
node_app -->|"provides cart"| node_cart
node_public -->|"loads products"| node_api_client
node_public -->|"updates cart"| node_cart
node_public -->|"routes checkout"| node_orders
node_public -->|"renders form"| node_contact
node_orders -->|"submits order"| node_api_client
node_contact -->|"sends message"| node_api_client
node_admin_ui -->|"manages content"| node_api_client
node_admin_ui -->|"uploads images"| node_api_client
node_api_client -->|"calls API"| node_api_server
node_api_server -->|"reads and writes"| node_database
node_api_server -->|"serves settings"| node_site_config
node_database -->|"seeds defaults"| node_site_config
node_api_server -->|"stores images"| node_uploads

click node_app "https://github.com/ramtnv/dynamichomewebsite/blob/main/src/App.tsx"
click node_public "https://github.com/ramtnv/dynamichomewebsite/blob/main/src/PublicPages.tsx"
click node_api_client "https://github.com/ramtnv/dynamichomewebsite/blob/main/src/api.ts"
click node_cart "https://github.com/ramtnv/dynamichomewebsite/blob/main/src/CartContext.tsx"
click node_orders "https://github.com/ramtnv/dynamichomewebsite/blob/main/src/PublicPages.tsx"
click node_contact "https://github.com/ramtnv/dynamichomewebsite/blob/main/src/PublicPages.tsx"
click node_admin_ui "https://github.com/ramtnv/dynamichomewebsite/blob/main/src/Admin.tsx"
click node_api_server "https://github.com/ramtnv/dynamichomewebsite/blob/main/server/index.ts"
click node_site_config "https://github.com/ramtnv/dynamichomewebsite/blob/main/server/defaults.ts"
click node_database "https://github.com/ramtnv/dynamichomewebsite/blob/main/server/db.ts"
click node_uploads "https://github.com/ramtnv/dynamichomewebsite/blob/main/server/index.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_app,node_public,node_contact toneBlue
class node_cart,node_orders toneAmber
class node_admin_ui toneMint
class node_api_client,node_api_server,node_site_config,node_database,node_uploads toneRose
class node_visitor toneIndigo
```

## Components

### Public storefront

- [App and routes](https://github.com/ramtnv/dynamichomewebsite/blob/main/src/App.tsx): `src/App.tsx`
- [Public pages](https://github.com/ramtnv/dynamichomewebsite/blob/main/src/PublicPages.tsx): `src/PublicPages.tsx`
- [Contact messages](https://github.com/ramtnv/dynamichomewebsite/blob/main/src/PublicPages.tsx): `src/PublicPages.tsx`

### Shopping and orders

- [Cart state](https://github.com/ramtnv/dynamichomewebsite/blob/main/src/CartContext.tsx): `src/CartContext.tsx`
- [Checkout and orders](https://github.com/ramtnv/dynamichomewebsite/blob/main/src/PublicPages.tsx): `src/PublicPages.tsx`

### Administration

- [Admin dashboard](https://github.com/ramtnv/dynamichomewebsite/blob/main/src/Admin.tsx): `src/Admin.tsx`

### API and persistence

- [API client](https://github.com/ramtnv/dynamichomewebsite/blob/main/src/api.ts): `src/api.ts`
- [Express API](https://github.com/ramtnv/dynamichomewebsite/blob/main/server/index.ts): `server/index.ts`
- [Site configuration](https://github.com/ramtnv/dynamichomewebsite/blob/main/server/defaults.ts): `server/defaults.ts`
- [SQLite data](https://github.com/ramtnv/dynamichomewebsite/blob/main/server/db.ts): `server/db.ts`
- [Image uploads](https://github.com/ramtnv/dynamichomewebsite/blob/main/server/index.ts): `server/index.ts`

### Other components

- **Customer**

## Connections

- Customer → App and routes: opens site (evidence: `README.md`)
- App and routes → Public pages: routes to (evidence: `src/App.tsx`)
- App and routes → Admin dashboard: routes to (evidence: `src/App.tsx`)
- App and routes → API client: loads site (evidence: `src/App.tsx`)
- App and routes → Cart state: provides cart (evidence: `src/App.tsx`)
- Public pages → API client: loads products (evidence: `README.md`)
- Public pages → Cart state: updates cart (evidence: `README.md`)
- Public pages → Checkout and orders: routes checkout (evidence: `README.md`)
- Public pages → Contact messages: renders form (evidence: `README.md`)
- Checkout and orders → API client: submits order (evidence: `README.md`)
- Contact messages → API client: sends message (evidence: `src/api.ts`)
- Admin dashboard → API client: manages content (evidence: `src/Admin.tsx`)
- Admin dashboard → API client: uploads images (evidence: `README.md`)
- API client → Express API: calls API (evidence: `README.md`)
- Express API → SQLite data: reads and writes (evidence: `server/index.ts`)
- Express API → Site configuration: serves settings (evidence: `server/index.ts`)
- SQLite data → Site configuration: seeds defaults (evidence: `server/db.ts`)
- Express API → Image uploads: stores images (evidence: `README.md`)
