# zepter75013/samparis12 architecture

> Architecture diagram of the GitHub repository zepter75013/samparis12, 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/zepter75013/samparis12
- Repository: https://github.com/zepter75013/samparis12

## Overview

SAM Paris 12 is a club website with a public presentation and payment path, plus a member portal implemented in the codebase. The public journey runs from site entry through the routed home page; visitors can proceed to the external payment form. Member login and dashboard features use a shared API client and a Go HTTP backend. The README documents MySQL use and several retained API endpoints. Backend domain wiring is not visible in the supplied excerpts, so those internal relationships are omitted rather than inferred.

Main entry points: [`frontend/src/App.jsx`](https://github.com/zepter75013/samparis12/blob/main/frontend/src/App.jsx) (React routes), [`frontend/src/pages/adherent/Dashboard.jsx`](https://github.com/zepter75013/samparis12/blob/main/frontend/src/pages/adherent/Dashboard.jsx) (Member dashboard), [`frontend/src/lib/api.js`](https://github.com/zepter75013/samparis12/blob/main/frontend/src/lib/api.js) (API client), [`frontend/src/pages/adherent/Login.jsx`](https://github.com/zepter75013/samparis12/blob/main/frontend/src/pages/adherent/Login.jsx) (Member login)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_app["React routes<br/>[App.jsx]"]
  node_home["Club home<br/>[Home.jsx]"]
  node_header["Site navigation<br/>[Header.jsx]"]
  node_footer["Partner footer<br/>[Footer.jsx]"]
  node_fetch["Fetch state<br/>[useFetch.js]"]
  node_payment["Payment form<br/>[Paiement.jsx]"]
end

subgraph group_member["Member portal"]
  node_login["Member login<br/>[Login.jsx]"]
  node_dashboard["Member dashboard<br/>[Dashboard.jsx]"]
  node_session[("Session token<br/>[session.js]")]
  node_about["About content<br/>[AboutContent.jsx]"]
  node_api_client["API client<br/>[api.js]"]
end

subgraph group_backend["Backend API"]
  node_api_server["Go HTTP API<br/>[router.go]"]
  node_config["Configuration<br/>[config.go]"]
  node_contact["Contact endpoint<br/>[contact.go]"]
  node_events["Events endpoint<br/>[event.go]"]
  node_groups["Groups endpoint<br/>[group.go]"]
  node_news["News endpoint<br/>[news.go]"]
  node_partners["Partners endpoint<br/>[partner.go]"]
  node_members["Member management<br/>[member.go]"]
  node_auth["Member authentication<br/>[auth.go]"]
  node_races["Race management<br/>[race.go]"]
  node_documents["Document management<br/>[document.go]"]
  node_mailer["Email delivery<br/>[mailer.go]"]
end

subgraph group_data["Persistence and services"]
  node_database[("MySQL<br/>[db.go]")]
end

node_visitor(("Visitor"))
node_payservice["Sherlocks LCL"]
node_club_email["Email service"]

node_visitor -->|"opens site"| node_app
node_app -->|"routes to"| node_home
node_app -->|"renders"| node_header
node_app -->|"renders"| node_footer
node_visitor -->|"chooses payment"| node_payment
node_app -->|"routes to"| node_payment
node_payment -->|"posts payment"| node_payservice
node_footer -->|"loads data"| node_fetch
node_fetch -->|"runs request"| node_api_client
node_login -->|"authenticates"| node_api_client
node_login -->|"stores token"| node_session
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_dashboard
node_dashboard -->|"uses API"| node_api_client
node_dashboard -->|"reads token"| node_session
node_dashboard -->|"renders"| node_about
node_api_client -->|"sends API requests"| node_api_server
node_api_server -.->|"uses MySQL"| node_database
node_visitor -->|"emails club"| node_club_email

click node_app "https://github.com/zepter75013/samparis12/blob/main/frontend/src/App.jsx"
click node_home "https://github.com/zepter75013/samparis12/blob/main/frontend/src/pages/Home.jsx"
click node_header "https://github.com/zepter75013/samparis12/blob/main/frontend/src/components/Header.jsx"
click node_footer "https://github.com/zepter75013/samparis12/blob/main/frontend/src/components/Footer.jsx"
click node_fetch "https://github.com/zepter75013/samparis12/blob/main/frontend/src/lib/useFetch.js"
click node_payment "https://github.com/zepter75013/samparis12/blob/main/frontend/src/pages/Paiement.jsx"
click node_login "https://github.com/zepter75013/samparis12/blob/main/frontend/src/pages/adherent/Login.jsx"
click node_dashboard "https://github.com/zepter75013/samparis12/blob/main/frontend/src/pages/adherent/Dashboard.jsx"
click node_session "https://github.com/zepter75013/samparis12/blob/main/frontend/src/lib/session.js"
click node_about "https://github.com/zepter75013/samparis12/blob/main/frontend/src/components/AboutContent.jsx"
click node_api_client "https://github.com/zepter75013/samparis12/blob/main/frontend/src/lib/api.js"
click node_api_server "https://github.com/zepter75013/samparis12/blob/main/backend/internal/httpapi/router.go"
click node_config "https://github.com/zepter75013/samparis12/blob/main/backend/internal/config/config.go"
click node_contact "https://github.com/zepter75013/samparis12/blob/main/backend/internal/contact/contact.go"
click node_events "https://github.com/zepter75013/samparis12/blob/main/backend/internal/event/event.go"
click node_groups "https://github.com/zepter75013/samparis12/blob/main/backend/internal/group/group.go"
click node_news "https://github.com/zepter75013/samparis12/blob/main/backend/internal/news/news.go"
click node_partners "https://github.com/zepter75013/samparis12/blob/main/backend/internal/partner/partner.go"
click node_members "https://github.com/zepter75013/samparis12/blob/main/backend/internal/member/member.go"
click node_auth "https://github.com/zepter75013/samparis12/blob/main/backend/internal/member/auth.go"
click node_races "https://github.com/zepter75013/samparis12/blob/main/backend/internal/race/race.go"
click node_documents "https://github.com/zepter75013/samparis12/blob/main/backend/internal/document/document.go"
click node_mailer "https://github.com/zepter75013/samparis12/blob/main/backend/internal/mailer/mailer.go"
click node_database "https://github.com/zepter75013/samparis12/blob/main/backend/internal/db/db.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_header,node_footer,node_fetch,node_payment toneBlue
class node_login,node_dashboard,node_session,node_about,node_api_client toneAmber
class node_api_server,node_config,node_contact,node_events,node_groups,node_news,node_partners,node_members,node_auth,node_races,node_documents,node_mailer toneMint
class node_database toneRose
class node_visitor,node_payservice,node_club_email toneIndigo
```

## Components

### Web experience

- [React routes](https://github.com/zepter75013/samparis12/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Club home](https://github.com/zepter75013/samparis12/blob/main/frontend/src/pages/Home.jsx): `frontend/src/pages/Home.jsx`
- [Site navigation](https://github.com/zepter75013/samparis12/blob/main/frontend/src/components/Header.jsx): `frontend/src/components/Header.jsx`
- [Partner footer](https://github.com/zepter75013/samparis12/blob/main/frontend/src/components/Footer.jsx): `frontend/src/components/Footer.jsx`
- [Fetch state](https://github.com/zepter75013/samparis12/blob/main/frontend/src/lib/useFetch.js): `frontend/src/lib/useFetch.js`
- [Payment form](https://github.com/zepter75013/samparis12/blob/main/frontend/src/pages/Paiement.jsx): `frontend/src/pages/Paiement.jsx`

### Member portal

- [Member login](https://github.com/zepter75013/samparis12/blob/main/frontend/src/pages/adherent/Login.jsx): `frontend/src/pages/adherent/Login.jsx`
- [Member dashboard](https://github.com/zepter75013/samparis12/blob/main/frontend/src/pages/adherent/Dashboard.jsx): `frontend/src/pages/adherent/Dashboard.jsx`
- [Session token](https://github.com/zepter75013/samparis12/blob/main/frontend/src/lib/session.js): `frontend/src/lib/session.js`
- [About content](https://github.com/zepter75013/samparis12/blob/main/frontend/src/components/AboutContent.jsx): `frontend/src/components/AboutContent.jsx`
- [API client](https://github.com/zepter75013/samparis12/blob/main/frontend/src/lib/api.js): `frontend/src/lib/api.js`

### Backend API

- [Go HTTP API](https://github.com/zepter75013/samparis12/blob/main/backend/internal/httpapi/router.go): `backend/internal/httpapi/router.go`
- [Configuration](https://github.com/zepter75013/samparis12/blob/main/backend/internal/config/config.go): `backend/internal/config/config.go`
- [Contact endpoint](https://github.com/zepter75013/samparis12/blob/main/backend/internal/contact/contact.go): `backend/internal/contact/contact.go`
- [Events endpoint](https://github.com/zepter75013/samparis12/blob/main/backend/internal/event/event.go): `backend/internal/event/event.go`
- [Groups endpoint](https://github.com/zepter75013/samparis12/blob/main/backend/internal/group/group.go): `backend/internal/group/group.go`
- [News endpoint](https://github.com/zepter75013/samparis12/blob/main/backend/internal/news/news.go): `backend/internal/news/news.go`
- [Partners endpoint](https://github.com/zepter75013/samparis12/blob/main/backend/internal/partner/partner.go): `backend/internal/partner/partner.go`
- [Member management](https://github.com/zepter75013/samparis12/blob/main/backend/internal/member/member.go): `backend/internal/member/member.go`
- [Member authentication](https://github.com/zepter75013/samparis12/blob/main/backend/internal/member/auth.go): `backend/internal/member/auth.go`
- [Race management](https://github.com/zepter75013/samparis12/blob/main/backend/internal/race/race.go): `backend/internal/race/race.go`
- [Document management](https://github.com/zepter75013/samparis12/blob/main/backend/internal/document/document.go): `backend/internal/document/document.go`
- [Email delivery](https://github.com/zepter75013/samparis12/blob/main/backend/internal/mailer/mailer.go): `backend/internal/mailer/mailer.go`

### Persistence and services

- [MySQL](https://github.com/zepter75013/samparis12/blob/main/backend/internal/db/db.go): `backend/internal/db/db.go`

### Other components

- **Visitor**
- **Sherlocks LCL**
- **Email service**

## Connections

- Visitor → React routes: opens site (evidence: `README.md`)
- React routes → Club home: routes to (evidence: `frontend/src/App.jsx`)
- React routes → Site navigation: renders (evidence: `frontend/src/App.jsx`)
- React routes → Partner footer: renders (evidence: `frontend/src/App.jsx`)
- Visitor → Payment form: chooses payment
- React routes → Payment form: routes to (evidence: `frontend/src/App.jsx`)
- Payment form → Sherlocks LCL: posts payment (evidence: `frontend/src/pages/Paiement.jsx`)
- Partner footer → Fetch state: loads data (evidence: `frontend/src/components/Footer.jsx`)
- Fetch state → API client: runs request (evidence: `frontend/src/components/Footer.jsx`)
- Member login → API client: authenticates (evidence: `frontend/src/pages/adherent/Login.jsx`)
- Member login → Session token: stores token (evidence: `frontend/src/pages/adherent/Login.jsx`)
- React routes → Member login: routes to (evidence: `frontend/src/App.jsx`)
- React routes → Member dashboard: routes to (evidence: `frontend/src/App.jsx`)
- Member dashboard → API client: uses API (evidence: `frontend/src/pages/adherent/Dashboard.jsx`)
- Member dashboard → Session token: reads token (evidence: `frontend/src/pages/adherent/Dashboard.jsx`)
- Member dashboard → About content: renders (evidence: `frontend/src/pages/adherent/Dashboard.jsx`)
- API client → Go HTTP API: sends API requests (evidence: `README.md`)
- Go HTTP API → MySQL: uses MySQL (evidence: `README.md`)
- Visitor → Email service: emails club
