# mohdasif-one/website-dev architecture

> Architecture diagram of the GitHub repository mohdasif-one/website-dev, 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/mohdasif-one/website-dev
- Repository: https://github.com/mohdasif-one/website-dev

## Overview

REACH Studio is a public agency website with a React single-page frontend and Go API. Visitors explore the studio’s work, services, approach, process, and pricing, then submit a quote request; the API validates and stores requests. Newsletter signup and health checking are separate API capabilities. The backend supports PostgreSQL and a local SQLite fallback. Edges follow sampled calls or explicit README documentation; the subscription UI and several storage details were not sampled, so those links are not inferred.

Main entry points: [`backend/internal/store/store.go`](https://github.com/mohdasif-one/website-dev/blob/main/backend/internal/store/store.go) (Store adapter), [`backend/internal/httpapi/router.go`](https://github.com/mohdasif-one/website-dev/blob/main/backend/internal/httpapi/router.go) (HTTP routes), [`frontend/src/app/App.tsx`](https://github.com/mohdasif-one/website-dev/blob/main/frontend/src/app/App.tsx) (App routing), [`backend/cmd/api/main.go`](https://github.com/mohdasif-one/website-dev/blob/main/backend/cmd/api/main.go) (API server)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Public website"]
  node_app["App routing<br/>[App.tsx]"]
  node_home["Agency landing<br/>[HomePage.tsx]"]
  node_interactions["Site interactions"]
  node_quoteform["Quote form<br/>[QuoteForm.tsx]"]
  node_notfound["Not found<br/>[NotFoundPage.tsx]"]
  node_query["Query client<br/>[queryClient.ts]"]
  node_quoteclient["Quote API client<br/>[quotes.ts]"]
  node_subscriptionclient["Subscription API client<br/>[subscriptions.ts]"]
  node_httpclient["HTTP client<br/>[client.ts]"]
end

subgraph group_api["API workflows"]
  node_server["API server<br/>[main.go]"]
  node_router["HTTP routes<br/>[router.go]"]
  node_quotehandler["Quote intake<br/>[router.go]"]
  node_subscriptionhandler["Newsletter signup<br/>[router.go]"]
  node_healthhandler["Health check<br/>[router.go]"]
  node_config["Runtime config<br/>[config.go]"]
end

subgraph group_persistence["Persistence"]
  node_store["Store adapter<br/>[store.go]"]
  node_dbgen["Postgres bindings<br/>[quotes.sql.go]"]
  node_postgres[("PostgreSQL")]
  node_sqlite[("SQLite fallback<br/>[store.go]")]
  node_newsletterdb[("Subscriber records<br/>[store.go]")]
end

node_visitor(("Site visitor"))
node_apiuser(("API caller"))

node_visitor -->|"opens site"| node_app
node_app -->|"routes to"| node_home
node_app -->|"routes unmatched"| node_notfound
node_app -->|"provides queries"| node_query
node_home -->|"uses interactions"| node_interactions
node_home -->|"renders form"| node_quoteform
node_quoteform -->|"submits quote"| node_quoteclient
node_quoteclient -->|"requests through"| node_httpclient
node_subscriptionclient -->|"requests through"| node_httpclient
node_apiuser -->|"sends API request"| node_router
node_server -->|"loads settings"| node_config
node_server -->|"opens store"| node_store
node_server -->|"serves handler"| node_router
node_router -->|"registers route"| node_quotehandler
node_router -->|"registers route"| node_subscriptionhandler
node_router -->|"registers route"| node_healthhandler
node_quotehandler -->|"saves quote"| node_store
node_subscriptionhandler -->|"saves email"| node_store
node_healthhandler -->|"checks connection"| node_store
node_store -->|"uses bindings"| node_dbgen
node_store -->|"migrates schema"| node_postgres
node_store -->|"writes locally"| node_sqlite
node_store -->|"stores subscribers"| node_newsletterdb
node_httpclient -.->|"calls API"| node_router

click node_app "https://github.com/mohdasif-one/website-dev/blob/main/frontend/src/app/App.tsx"
click node_home "https://github.com/mohdasif-one/website-dev/blob/main/frontend/src/pages/HomePage.tsx"
click node_interactions "https://github.com/mohdasif-one/website-dev/blob/main/frontend/src/hooks/useSiteInteractions.ts"
click node_quoteform "https://github.com/mohdasif-one/website-dev/blob/main/frontend/src/components/QuoteForm.tsx"
click node_notfound "https://github.com/mohdasif-one/website-dev/blob/main/frontend/src/pages/NotFoundPage.tsx"
click node_query "https://github.com/mohdasif-one/website-dev/blob/main/frontend/src/app/queryClient.ts"
click node_quoteclient "https://github.com/mohdasif-one/website-dev/blob/main/frontend/src/api/quotes.ts"
click node_subscriptionclient "https://github.com/mohdasif-one/website-dev/blob/main/frontend/src/api/subscriptions.ts"
click node_httpclient "https://github.com/mohdasif-one/website-dev/blob/main/frontend/src/api/client.ts"
click node_server "https://github.com/mohdasif-one/website-dev/blob/main/backend/cmd/api/main.go"
click node_router "https://github.com/mohdasif-one/website-dev/blob/main/backend/internal/httpapi/router.go"
click node_quotehandler "https://github.com/mohdasif-one/website-dev/blob/main/backend/internal/httpapi/router.go"
click node_subscriptionhandler "https://github.com/mohdasif-one/website-dev/blob/main/backend/internal/httpapi/router.go"
click node_healthhandler "https://github.com/mohdasif-one/website-dev/blob/main/backend/internal/httpapi/router.go"
click node_config "https://github.com/mohdasif-one/website-dev/blob/main/backend/internal/config/config.go"
click node_store "https://github.com/mohdasif-one/website-dev/blob/main/backend/internal/store/store.go"
click node_dbgen "https://github.com/mohdasif-one/website-dev/blob/main/backend/internal/store/dbgen/quotes.sql.go"
click node_postgres "https://github.com/mohdasif-one/website-dev/blob/main/backend/db/migrations/postgres/00001_initial_schema.sql"
click node_sqlite "https://github.com/mohdasif-one/website-dev/blob/main/backend/internal/store/store.go"
click node_newsletterdb "https://github.com/mohdasif-one/website-dev/blob/main/backend/internal/store/store.go"

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_home,node_interactions,node_quoteform,node_notfound,node_query,node_quoteclient,node_subscriptionclient,node_httpclient toneBlue
class node_server,node_router,node_quotehandler,node_subscriptionhandler,node_healthhandler,node_config toneAmber
class node_store,node_dbgen,node_postgres,node_sqlite,node_newsletterdb,node_apiuser toneMint
class node_visitor toneIndigo
```

## Components

### Public website

- [App routing](https://github.com/mohdasif-one/website-dev/blob/main/frontend/src/app/App.tsx): `frontend/src/app/App.tsx`
- [Agency landing](https://github.com/mohdasif-one/website-dev/blob/main/frontend/src/pages/HomePage.tsx): `frontend/src/pages/HomePage.tsx`
- [Site interactions](https://github.com/mohdasif-one/website-dev/blob/main/frontend/src/hooks/useSiteInteractions.ts): `frontend/src/hooks/useSiteInteractions.ts`
- [Quote form](https://github.com/mohdasif-one/website-dev/blob/main/frontend/src/components/QuoteForm.tsx): `frontend/src/components/QuoteForm.tsx`
- [Not found](https://github.com/mohdasif-one/website-dev/blob/main/frontend/src/pages/NotFoundPage.tsx): `frontend/src/pages/NotFoundPage.tsx`
- [Query client](https://github.com/mohdasif-one/website-dev/blob/main/frontend/src/app/queryClient.ts): `frontend/src/app/queryClient.ts`
- [Quote API client](https://github.com/mohdasif-one/website-dev/blob/main/frontend/src/api/quotes.ts): `frontend/src/api/quotes.ts`
- [Subscription API client](https://github.com/mohdasif-one/website-dev/blob/main/frontend/src/api/subscriptions.ts): `frontend/src/api/subscriptions.ts`
- [HTTP client](https://github.com/mohdasif-one/website-dev/blob/main/frontend/src/api/client.ts): `frontend/src/api/client.ts`

### API workflows

- [API server](https://github.com/mohdasif-one/website-dev/blob/main/backend/cmd/api/main.go): `backend/cmd/api/main.go`
- [HTTP routes](https://github.com/mohdasif-one/website-dev/blob/main/backend/internal/httpapi/router.go): `backend/internal/httpapi/router.go`
- [Quote intake](https://github.com/mohdasif-one/website-dev/blob/main/backend/internal/httpapi/router.go): `backend/internal/httpapi/router.go`
- [Newsletter signup](https://github.com/mohdasif-one/website-dev/blob/main/backend/internal/httpapi/router.go): `backend/internal/httpapi/router.go`
- [Health check](https://github.com/mohdasif-one/website-dev/blob/main/backend/internal/httpapi/router.go): `backend/internal/httpapi/router.go`
- [Runtime config](https://github.com/mohdasif-one/website-dev/blob/main/backend/internal/config/config.go): `backend/internal/config/config.go`

### Persistence

- [Store adapter](https://github.com/mohdasif-one/website-dev/blob/main/backend/internal/store/store.go): `backend/internal/store/store.go`
- [Postgres bindings](https://github.com/mohdasif-one/website-dev/blob/main/backend/internal/store/dbgen/quotes.sql.go): `backend/internal/store/dbgen/quotes.sql.go`
- [PostgreSQL](https://github.com/mohdasif-one/website-dev/blob/main/backend/db/migrations/postgres/00001_initial_schema.sql): `backend/db/migrations/postgres/00001_initial_schema.sql`
- [SQLite fallback](https://github.com/mohdasif-one/website-dev/blob/main/backend/internal/store/store.go): `backend/internal/store/store.go`
- [Subscriber records](https://github.com/mohdasif-one/website-dev/blob/main/backend/internal/store/store.go): `backend/internal/store/store.go`

### Other components

- **Site visitor**
- **API caller**

## Connections

- Site visitor → App routing: opens site
- App routing → Agency landing: routes to (evidence: `frontend/src/app/App.tsx`)
- App routing → Not found: routes unmatched (evidence: `frontend/src/app/App.tsx`)
- App routing → Query client: provides queries (evidence: `frontend/src/app/App.tsx`)
- Agency landing → Site interactions: uses interactions (evidence: `frontend/src/pages/HomePage.tsx`)
- Agency landing → Quote form: renders form (evidence: `frontend/src/pages/HomePage.tsx`)
- Quote form → Quote API client: submits quote (evidence: `frontend/src/components/QuoteForm.tsx`)
- Quote API client → HTTP client: requests through (evidence: `frontend/src/api/quotes.ts`)
- Subscription API client → HTTP client: requests through (evidence: `frontend/src/api/subscriptions.ts`)
- API caller → HTTP routes: sends API request (evidence: `backend/internal/httpapi/router.go`)
- API server → Runtime config: loads settings (evidence: `backend/cmd/api/main.go`)
- API server → Store adapter: opens store (evidence: `backend/cmd/api/main.go`)
- API server → HTTP routes: serves handler (evidence: `backend/cmd/api/main.go`)
- HTTP routes → Quote intake: registers route (evidence: `backend/internal/httpapi/router.go`)
- HTTP routes → Newsletter signup: registers route (evidence: `backend/internal/httpapi/router.go`)
- HTTP routes → Health check: registers route (evidence: `backend/internal/httpapi/router.go`)
- Quote intake → Store adapter: saves quote (evidence: `backend/internal/httpapi/router.go`)
- Newsletter signup → Store adapter: saves email (evidence: `backend/internal/httpapi/router.go`)
- Health check → Store adapter: checks connection (evidence: `backend/internal/httpapi/router.go`)
- Store adapter → Postgres bindings: uses bindings (evidence: `backend/internal/store/store.go`)
- Store adapter → PostgreSQL: migrates schema (evidence: `backend/internal/store/store.go`)
- Store adapter → SQLite fallback: writes locally (evidence: `backend/internal/store/store.go`)
- Store adapter → Subscriber records: stores subscribers (evidence: `backend/internal/store/store.go`)
- HTTP client → HTTP routes: calls API
