# bosspainter/califromlovable architecture

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

- Interactive diagram: https://gitdiagram.com/bosspainter/califromlovable
- Repository: https://github.com/bosspainter/califromlovable

## Overview

Calipro Painting’s application is a customer-facing painting-services website with project galleries, quote requests, a paint-advice feature, and a protected admin area for site content. Visitors enter through the home or service pages, browse gallery and project content, and can request a quote; the chat API and paint advisor provide a separate AI feature. Admins sign in, pass an authentication guard, and manage content backed by Supabase. The excerpts show the home page’s data loading and several integration calls; some listed routes and admin details are unsampled, so their internal behavior is not expanded.

Main entry points: [`src/routeTree.gen.ts`](https://github.com/bosspainter/califromlovable/blob/main/src/routeTree.gen.ts) (Route registry), [`src/routes/index.tsx`](https://github.com/bosspainter/califromlovable/blob/main/src/routes/index.tsx) (Home page), [`src/integrations/supabase/client.ts`](https://github.com/bosspainter/califromlovable/blob/main/src/integrations/supabase/client.ts) (Supabase backend), [`src/routes/auth.tsx`](https://github.com/bosspainter/califromlovable/blob/main/src/routes/auth.tsx) (Sign-in page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_public["Public website"]
  node_home["Home page<br/>[index.tsx]"]
  node_chimney["Chimney service"]
  node_gutters["Gutter service"]
  node_contact["Quote form<br/>[contact-form.tsx]"]
  node_advisor["Paint advisor<br/>[paint-advisor.tsx]"]
  node_chat["Chat API<br/>[chat.ts]"]
  node_responses["AI responses<br/>[responses.ts]"]
  node_runid["AI run IDs<br/>[run-id.ts]"]
end

subgraph group_content["Content and projects"]
  node_gallery["Project gallery"]
  node_galleryroute["Gallery page<br/>[gallery.tsx]"]
  node_projectlist["Project listings<br/>[projects.index.tsx]"]
  node_projectdetail["Project detail<br/>[projects.$slug.tsx]"]
  node_cms["CMS queries<br/>[cms.ts]"]
end

subgraph group_admin["Admin and identity"]
  node_admin["Admin console<br/>[admin.tsx]"]
  node_guard["Auth guard<br/>[route.tsx]"]
  node_auth["Sign-in page<br/>[auth.tsx]"]
  node_lovable["OAuth integration<br/>[index.ts]"]
end

subgraph group_platform["Application platform"]
  node_supabase["Supabase backend<br/>[client.ts]"]
  node_preview["Preview auth storage"]
  node_router["Router setup<br/>[router.tsx]"]
  node_routeindex["Route registry<br/>[routeTree.gen.ts]"]
  node_root["Application root<br/>[__root.tsx]"]
  node_server["Server handler<br/>[server.ts]"]
  node_errorcapture["Error capture<br/>[error-capture.ts]"]
  node_errorpage["Error response page<br/>[error-page.ts]"]
  node_button["Button component<br/>[button.tsx]"]
end

node_visitor(("Site visitor"))

node_visitor -->|"opens"| node_home
node_visitor -.->|"opens"| node_chimney
node_visitor -.->|"opens"| node_gutters
node_visitor -.->|"opens"| node_galleryroute
node_visitor -.->|"opens"| node_projectlist
node_visitor -.->|"opens"| node_projectdetail
node_visitor -.->|"opens"| node_auth
node_home -->|"loads content"| node_cms
node_home -->|"renders"| node_contact
node_home -->|"renders"| node_advisor
node_home -.->|"renders"| node_gallery
node_contact -->|"submits to"| node_supabase
node_contact -->|"renders"| node_button
node_chat -->|"requests"| node_responses
node_responses -->|"uses"| node_runid
node_gallery -->|"loads content"| node_cms
node_cms -->|"reads and uploads"| node_supabase
node_auth -->|"starts OAuth"| node_lovable
node_auth -->|"checks session"| node_supabase
node_guard -->|"checks user"| node_supabase
node_admin -->|"accesses backend"| node_supabase
node_admin -->|"uses content tools"| node_cms
node_supabase -->|"configures storage"| node_preview
node_router -->|"loads routes"| node_routeindex
node_routeindex -->|"registers route"| node_home
node_routeindex -->|"registers route"| node_auth
node_routeindex -->|"registers route"| node_chimney
node_routeindex -->|"registers route"| node_gutters
node_routeindex -->|"registers route"| node_galleryroute
node_routeindex -->|"registers route"| node_projectlist
node_routeindex -->|"registers route"| node_projectdetail
node_root -.->|"hosts routes"| node_routeindex
node_server -->|"captures errors"| node_errorcapture
node_server -->|"renders on failure"| node_errorpage

click node_home "https://github.com/bosspainter/califromlovable/blob/main/src/routes/index.tsx"
click node_chimney "https://github.com/bosspainter/califromlovable/blob/main/src/routes/chimney-fireplace.tsx"
click node_gutters "https://github.com/bosspainter/califromlovable/blob/main/src/routes/gutter-cleaning.tsx"
click node_contact "https://github.com/bosspainter/califromlovable/blob/main/src/components/contact-form.tsx"
click node_advisor "https://github.com/bosspainter/califromlovable/blob/main/src/components/paint-advisor.tsx"
click node_chat "https://github.com/bosspainter/califromlovable/blob/main/src/routes/api/chat.ts"
click node_responses "https://github.com/bosspainter/califromlovable/blob/main/src/lib/ai/responses.ts"
click node_runid "https://github.com/bosspainter/califromlovable/blob/main/src/lib/ai/run-id.ts"
click node_gallery "https://github.com/bosspainter/califromlovable/blob/main/src/components/project-gallery.tsx"
click node_galleryroute "https://github.com/bosspainter/califromlovable/blob/main/src/routes/gallery.tsx"
click node_projectlist "https://github.com/bosspainter/califromlovable/blob/main/src/routes/projects.index.tsx"
click node_projectdetail "https://github.com/bosspainter/califromlovable/blob/main/src/routes/projects.%24slug.tsx"
click node_cms "https://github.com/bosspainter/califromlovable/blob/main/src/lib/cms.ts"
click node_admin "https://github.com/bosspainter/califromlovable/blob/main/src/routes/_authenticated/admin.tsx"
click node_guard "https://github.com/bosspainter/califromlovable/blob/main/src/routes/_authenticated/route.tsx"
click node_auth "https://github.com/bosspainter/califromlovable/blob/main/src/routes/auth.tsx"
click node_lovable "https://github.com/bosspainter/califromlovable/blob/main/src/integrations/lovable/index.ts"
click node_supabase "https://github.com/bosspainter/califromlovable/blob/main/src/integrations/supabase/client.ts"
click node_preview "https://github.com/bosspainter/califromlovable/blob/main/src/integrations/supabase/previewAuthStorage.ts"
click node_router "https://github.com/bosspainter/califromlovable/blob/main/src/router.tsx"
click node_routeindex "https://github.com/bosspainter/califromlovable/blob/main/src/routeTree.gen.ts"
click node_root "https://github.com/bosspainter/califromlovable/blob/main/src/routes/__root.tsx"
click node_server "https://github.com/bosspainter/califromlovable/blob/main/src/server.ts"
click node_errorcapture "https://github.com/bosspainter/califromlovable/blob/main/src/lib/error-capture.ts"
click node_errorpage "https://github.com/bosspainter/califromlovable/blob/main/src/lib/error-page.ts"
click node_button "https://github.com/bosspainter/califromlovable/blob/main/src/components/ui/button.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_chimney,node_gutters,node_contact,node_advisor,node_chat,node_responses,node_runid toneBlue
class node_gallery,node_galleryroute,node_projectlist,node_projectdetail,node_cms toneAmber
class node_admin,node_guard,node_auth,node_lovable toneMint
class node_supabase,node_preview,node_router,node_routeindex,node_root,node_server,node_errorcapture,node_errorpage,node_button toneRose
class node_visitor toneIndigo
```

## Components

### Public website

- [Home page](https://github.com/bosspainter/califromlovable/blob/main/src/routes/index.tsx): `src/routes/index.tsx`
- [Chimney service](https://github.com/bosspainter/califromlovable/blob/main/src/routes/chimney-fireplace.tsx): `src/routes/chimney-fireplace.tsx`
- [Gutter service](https://github.com/bosspainter/califromlovable/blob/main/src/routes/gutter-cleaning.tsx): `src/routes/gutter-cleaning.tsx`
- [Quote form](https://github.com/bosspainter/califromlovable/blob/main/src/components/contact-form.tsx): `src/components/contact-form.tsx`
- [Paint advisor](https://github.com/bosspainter/califromlovable/blob/main/src/components/paint-advisor.tsx): `src/components/paint-advisor.tsx`
- [Chat API](https://github.com/bosspainter/califromlovable/blob/main/src/routes/api/chat.ts): `src/routes/api/chat.ts`
- [AI responses](https://github.com/bosspainter/califromlovable/blob/main/src/lib/ai/responses.ts): `src/lib/ai/responses.ts`
- [AI run IDs](https://github.com/bosspainter/califromlovable/blob/main/src/lib/ai/run-id.ts): `src/lib/ai/run-id.ts`

### Content and projects

- [Project gallery](https://github.com/bosspainter/califromlovable/blob/main/src/components/project-gallery.tsx): `src/components/project-gallery.tsx`
- [Gallery page](https://github.com/bosspainter/califromlovable/blob/main/src/routes/gallery.tsx): `src/routes/gallery.tsx`
- [Project listings](https://github.com/bosspainter/califromlovable/blob/main/src/routes/projects.index.tsx): `src/routes/projects.index.tsx`
- [Project detail](https://github.com/bosspainter/califromlovable/blob/main/src/routes/projects.%24slug.tsx): `src/routes/projects.$slug.tsx`
- [CMS queries](https://github.com/bosspainter/califromlovable/blob/main/src/lib/cms.ts): `src/lib/cms.ts`

### Admin and identity

- [Admin console](https://github.com/bosspainter/califromlovable/blob/main/src/routes/_authenticated/admin.tsx): `src/routes/_authenticated/admin.tsx`
- [Auth guard](https://github.com/bosspainter/califromlovable/blob/main/src/routes/_authenticated/route.tsx): `src/routes/_authenticated/route.tsx`
- [Sign-in page](https://github.com/bosspainter/califromlovable/blob/main/src/routes/auth.tsx): `src/routes/auth.tsx`
- [OAuth integration](https://github.com/bosspainter/califromlovable/blob/main/src/integrations/lovable/index.ts): `src/integrations/lovable/index.ts`

### Application platform

- [Supabase backend](https://github.com/bosspainter/califromlovable/blob/main/src/integrations/supabase/client.ts): `src/integrations/supabase/client.ts`
- [Preview auth storage](https://github.com/bosspainter/califromlovable/blob/main/src/integrations/supabase/previewAuthStorage.ts): `src/integrations/supabase/previewAuthStorage.ts`
- [Router setup](https://github.com/bosspainter/califromlovable/blob/main/src/router.tsx): `src/router.tsx`
- [Route registry](https://github.com/bosspainter/califromlovable/blob/main/src/routeTree.gen.ts): `src/routeTree.gen.ts`
- [Application root](https://github.com/bosspainter/califromlovable/blob/main/src/routes/__root.tsx): `src/routes/__root.tsx`
- [Server handler](https://github.com/bosspainter/califromlovable/blob/main/src/server.ts): `src/server.ts`
- [Error capture](https://github.com/bosspainter/califromlovable/blob/main/src/lib/error-capture.ts): `src/lib/error-capture.ts`
- [Error response page](https://github.com/bosspainter/califromlovable/blob/main/src/lib/error-page.ts): `src/lib/error-page.ts`
- [Button component](https://github.com/bosspainter/califromlovable/blob/main/src/components/ui/button.tsx): `src/components/ui/button.tsx`

### Other components

- **Site visitor**

## Connections

- Site visitor → Home page: opens (evidence: `src/routes/index.tsx`)
- Site visitor → Chimney service: opens
- Site visitor → Gutter service: opens
- Site visitor → Gallery page: opens
- Site visitor → Project listings: opens
- Site visitor → Project detail: opens
- Site visitor → Sign-in page: opens
- Home page → CMS queries: loads content (evidence: `src/routes/index.tsx`)
- Home page → Quote form: renders (evidence: `src/routes/index.tsx`)
- Home page → Paint advisor: renders (evidence: `src/routes/index.tsx`)
- Home page → Project gallery: renders (evidence: `src/routes/index.tsx`)
- Quote form → Supabase backend: submits to (evidence: `src/components/contact-form.tsx`)
- Quote form → Button component: renders (evidence: `src/components/contact-form.tsx`)
- Chat API → AI responses: requests (evidence: `src/routes/api/chat.ts`)
- AI responses → AI run IDs: uses (evidence: `src/lib/ai/responses.ts`)
- Project gallery → CMS queries: loads content (evidence: `src/components/project-gallery.tsx`)
- CMS queries → Supabase backend: reads and uploads (evidence: `src/lib/cms.ts`)
- Sign-in page → OAuth integration: starts OAuth (evidence: `src/routes/auth.tsx`)
- Sign-in page → Supabase backend: checks session (evidence: `src/routes/auth.tsx`)
- Auth guard → Supabase backend: checks user (evidence: `src/routes/_authenticated/route.tsx`)
- Admin console → Supabase backend: accesses backend (evidence: `src/routes/_authenticated/admin.tsx`)
- Admin console → CMS queries: uses content tools (evidence: `src/routes/_authenticated/admin.tsx`)
- Supabase backend → Preview auth storage: configures storage (evidence: `src/integrations/supabase/client.ts`)
- Router setup → Route registry: loads routes (evidence: `src/router.tsx`)
- Route registry → Home page: registers route (evidence: `src/routeTree.gen.ts`)
- Route registry → Sign-in page: registers route (evidence: `src/routeTree.gen.ts`)
- Route registry → Chimney service: registers route (evidence: `src/routeTree.gen.ts`)
- Route registry → Gutter service: registers route (evidence: `src/routeTree.gen.ts`)
- Route registry → Gallery page: registers route (evidence: `src/routeTree.gen.ts`)
- Route registry → Project listings: registers route (evidence: `src/routeTree.gen.ts`)
- Route registry → Project detail: registers route (evidence: `src/routeTree.gen.ts`)
- Application root → Route registry: hosts routes (evidence: `src/routeTree.gen.ts`)
- Server handler → Error capture: captures errors (evidence: `src/server.ts`)
- Server handler → Error response page: renders on failure (evidence: `src/server.ts`)
