# christever/site-peintre architecture

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

- Interactive diagram: https://gitdiagram.com/christever/site-peintre
- Repository: https://github.com/christever/site-peintre

## Overview

This is a small Astro website for MS Peinture, presenting the business and its painting services while accepting contact and quote requests. Visitors reach the site’s pages; the contact endpoint validates submissions, emails the business, sends a confirmation, and redirects successful submissions to the thank-you page. The graph includes the route URL helper and the site’s main content areas. Source excerpts do not show page-to-component wiring or the contact form’s submission configuration, so those links are omitted.

Main entry points: [`public/contact.php`](https://github.com/christever/site-peintre/blob/main/public/contact.php) (Contact handler), [`src/routes/Routes.jsx`](https://github.com/christever/site-peintre/blob/main/src/routes/Routes.jsx) (Route catalog), [`src/pages`](https://github.com/christever/site-peintre/tree/main/src/pages) (Site pages), [`src/pages/merci.astro`](https://github.com/christever/site-peintre/blob/main/src/pages/merci.astro) (Thank-you page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_site["Public site"]
  node_pages["Site pages"]
  node_page_content["Page sections"]
  node_site_layout["Shared layout<br/>[Layout.astro]"]
  node_thank_you["Thank-you page<br/>[merci.astro]"]
end

subgraph group_contact["Contact handling"]
  node_contact_handler["Contact handler<br/>[contact.php]"]
  node_mail_service["Mail service"]
end

subgraph group_routing["Route utilities"]
  node_route_catalog["Route catalog<br/>[Routes.jsx]"]
  node_url_helper["Base URL helper<br/>[url.js]"]
  node_site_constants["Site constants<br/>[constants.js]"]
end

node_visitor(("Visitor"))

node_visitor -->|"opens routes"| node_pages
node_route_catalog -->|"builds URLs"| node_url_helper
node_visitor -->|"submits POST"| node_contact_handler
node_contact_handler -->|"sends emails"| node_mail_service
node_contact_handler -->|"redirects to"| node_thank_you

click node_pages "https://github.com/christever/site-peintre/tree/main/src/pages"
click node_page_content "https://github.com/christever/site-peintre/tree/main/src/components"
click node_site_layout "https://github.com/christever/site-peintre/blob/main/src/layouts/Layout.astro"
click node_route_catalog "https://github.com/christever/site-peintre/blob/main/src/routes/Routes.jsx"
click node_url_helper "https://github.com/christever/site-peintre/blob/main/src/utils/url.js"
click node_site_constants "https://github.com/christever/site-peintre/blob/main/src/utils/constants.js"
click node_contact_handler "https://github.com/christever/site-peintre/blob/main/public/contact.php"
click node_thank_you "https://github.com/christever/site-peintre/blob/main/src/pages/merci.astro"

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_pages,node_page_content,node_site_layout,node_thank_you toneBlue
class node_contact_handler,node_mail_service toneAmber
class node_route_catalog,node_url_helper,node_site_constants toneMint
class node_visitor toneIndigo
```

## Components

### Public site

- [Site pages](https://github.com/christever/site-peintre/tree/main/src/pages): `src/pages`
- [Page sections](https://github.com/christever/site-peintre/tree/main/src/components): `src/components`
- [Shared layout](https://github.com/christever/site-peintre/blob/main/src/layouts/Layout.astro): `src/layouts/Layout.astro`
- [Thank-you page](https://github.com/christever/site-peintre/blob/main/src/pages/merci.astro): `src/pages/merci.astro`

### Contact handling

- [Contact handler](https://github.com/christever/site-peintre/blob/main/public/contact.php): `public/contact.php`
- **Mail service**

### Route utilities

- [Route catalog](https://github.com/christever/site-peintre/blob/main/src/routes/Routes.jsx): `src/routes/Routes.jsx`
- [Base URL helper](https://github.com/christever/site-peintre/blob/main/src/utils/url.js): `src/utils/url.js`
- [Site constants](https://github.com/christever/site-peintre/blob/main/src/utils/constants.js): `src/utils/constants.js`

### Other components

- **Visitor**

## Connections

- Visitor → Site pages: opens routes (evidence: `README.md`)
- Route catalog → Base URL helper: builds URLs (evidence: `src/routes/Routes.jsx`)
- Visitor → Contact handler: submits POST (evidence: `public/contact.php`)
- Contact handler → Mail service: sends emails (evidence: `public/contact.php`)
- Contact handler → Thank-you page: redirects to (evidence: `public/contact.php`)
