# leodevtech/odisejanzu architecture

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

- Interactive diagram: https://gitdiagram.com/leodevtech/odisejanzu
- Repository: https://github.com/leodevtech/odisejanzu

## Overview

Odise Janzu is a public Janzu therapy website with an administration dashboard. Its principal workflow is visitors browsing service and media pages or sending a contact message; administrators authenticate to manage gallery media, reviews, and editable site content. The backend separates HTTP routing, controllers, and MySQL-backed models, with Cloudflare handling uploaded media and email verification supporting account registration. The frontend tree documents additional public pages and dashboard sections, but the empty README and limited excerpts do not establish their runtime API connections.

Main entry points: [`BACKEND/app.js`](https://github.com/leodevtech/odisejanzu/blob/main/BACKEND/app.js) (Express application), [`BACKEND/middleware/auth.middleware.js`](https://github.com/leodevtech/odisejanzu/blob/main/BACKEND/middleware/auth.middleware.js) (Authentication and roles), [`BACKEND/config/db.js`](https://github.com/leodevtech/odisejanzu/blob/main/BACKEND/config/db.js) (MySQL connection pool), [`BACKEND/routes/auth.routes.js`](https://github.com/leodevtech/odisejanzu/blob/main/BACKEND/routes/auth.routes.js) (Authentication routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_public["Public website"]
  node_publicpages["Public pages"]
  node_gallerypage["Gallery page<br/>[page.jsx]"]
  node_contactform["Contact form<br/>[ContactForm.jsx]"]
  node_apiclient["API client<br/>[axios.js]"]
end

subgraph group_admin["Admin dashboard"]
  node_loginpage["Admin login<br/>[page.jsx]"]
  node_dashreviews["Review management<br/>[page.jsx]"]
  node_dashgallery["Gallery management<br/>[page.jsx]"]
  node_dashcontent["Content settings<br/>[page.jsx]"]
  node_dashhome["Dashboard overview<br/>[page.jsx]"]
end

subgraph group_api["Backend API"]
  node_authroutes["Authentication routes<br/>[auth.routes.js]"]
  node_authcontroller["Authentication<br/>[auth.controller.js]"]
  node_authmw["Authentication and roles<br/>[auth.middleware.js]"]
  node_validmw["Request validation"]
  node_photoroutes["Media routes<br/>[photo.routes.js]"]
  node_photocontroller["Media management"]
  node_messageroutes["Message routes<br/>[message.routes.js]"]
  node_messagecontroller["Contact messages"]
  node_avisroutes["Review routes<br/>[avis.routes.js]"]
  node_aviscontroller["Review management<br/>[avis.controller.js]"]
  node_contentroutes["Site content routes"]
  node_contentcontroller["Site content"]
  node_app["Express application<br/>[app.js]"]
end

subgraph group_data["Persistence and media"]
  node_dbpool[("MySQL connection pool<br/>[db.js]")]
  node_usermodel[("User records<br/>[user.model.js]")]
  node_photomodel[("Media records<br/>[photo.model.js]")]
  node_messagemodel[("Message records<br/>[message.model.js]")]
  node_avismodel[("Review records<br/>[avis.model.js]")]
  node_contentmodel[("Site content records")]
end

node_visitor(("Site visitor"))
node_adminuser(("Administrator"))
node_cloudflare{{"Cloudflare Images / Stream"}}
node_mailer{{"Verification email service"}}

node_app -->|"mounts routes"| node_authroutes
node_app -->|"mounts routes"| node_photoroutes
node_app -->|"mounts routes"| node_messageroutes
node_app -->|"mounts routes"| node_avisroutes
node_app -->|"mounts routes"| node_contentroutes
node_authroutes -->|"dispatches"| node_authcontroller
node_authroutes -->|"protects routes"| node_authmw
node_authroutes -->|"validates input"| node_validmw
node_authcontroller -->|"manages users"| node_usermodel
node_authcontroller -->|"sends verification"| node_mailer
node_photoroutes -->|"dispatches"| node_photocontroller
node_photoroutes -->|"protects admin routes"| node_authmw
node_photocontroller -->|"reads and writes"| node_photomodel
node_photocontroller -->|"uploads and deletes"| node_cloudflare
node_messageroutes -->|"dispatches"| node_messagecontroller
node_messageroutes -->|"protects admin routes"| node_authmw
node_messagecontroller -->|"reads and writes"| node_messagemodel
node_avisroutes -->|"dispatches"| node_aviscontroller
node_avisroutes -->|"protects admin routes"| node_authmw
node_aviscontroller -->|"reads and writes"| node_avismodel
node_contentroutes -->|"dispatches"| node_contentcontroller
node_contentroutes -->|"protects routes"| node_authmw
node_contentcontroller -->|"reads and updates"| node_contentmodel
node_usermodel -->|"queries"| node_dbpool
node_photomodel -->|"queries"| node_dbpool
node_messagemodel -->|"queries"| node_dbpool
node_avismodel -->|"queries"| node_dbpool
node_contentmodel -->|"queries"| node_dbpool

click node_publicpages "https://github.com/leodevtech/odisejanzu/tree/main/FRONTEND/o-di-se-janzu-bootstrap/src/app"
click node_gallerypage "https://github.com/leodevtech/odisejanzu/blob/main/FRONTEND/o-di-se-janzu-bootstrap/src/app/galerie/page.jsx"
click node_contactform "https://github.com/leodevtech/odisejanzu/blob/main/FRONTEND/o-di-se-janzu-bootstrap/src/components/ContactForm.jsx"
click node_apiclient "https://github.com/leodevtech/odisejanzu/blob/main/FRONTEND/o-di-se-janzu-bootstrap/src/api/axios.js"
click node_loginpage "https://github.com/leodevtech/odisejanzu/blob/main/FRONTEND/o-di-se-janzu-bootstrap/src/app/admin/login/page.jsx"
click node_dashreviews "https://github.com/leodevtech/odisejanzu/blob/main/FRONTEND/o-di-se-janzu-bootstrap/src/app/admin/dashboard/avis/page.jsx"
click node_dashgallery "https://github.com/leodevtech/odisejanzu/blob/main/FRONTEND/o-di-se-janzu-bootstrap/src/app/admin/dashboard/galerie/page.jsx"
click node_dashcontent "https://github.com/leodevtech/odisejanzu/blob/main/FRONTEND/o-di-se-janzu-bootstrap/src/app/admin/dashboard/parametres/page.jsx"
click node_dashhome "https://github.com/leodevtech/odisejanzu/blob/main/FRONTEND/o-di-se-janzu-bootstrap/src/app/admin/dashboard/page.jsx"
click node_authroutes "https://github.com/leodevtech/odisejanzu/blob/main/BACKEND/routes/auth.routes.js"
click node_authcontroller "https://github.com/leodevtech/odisejanzu/blob/main/BACKEND/controllers/auth.controller.js"
click node_authmw "https://github.com/leodevtech/odisejanzu/blob/main/BACKEND/middleware/auth.middleware.js"
click node_validmw "https://github.com/leodevtech/odisejanzu/blob/main/BACKEND/middleware/validation.middleware.js"
click node_photoroutes "https://github.com/leodevtech/odisejanzu/blob/main/BACKEND/routes/photo.routes.js"
click node_photocontroller "https://github.com/leodevtech/odisejanzu/blob/main/BACKEND/controllers/photo.controller.js"
click node_messageroutes "https://github.com/leodevtech/odisejanzu/blob/main/BACKEND/routes/message.routes.js"
click node_messagecontroller "https://github.com/leodevtech/odisejanzu/blob/main/BACKEND/controllers/message.controller.js"
click node_avisroutes "https://github.com/leodevtech/odisejanzu/blob/main/BACKEND/routes/avis.routes.js"
click node_aviscontroller "https://github.com/leodevtech/odisejanzu/blob/main/BACKEND/controllers/avis.controller.js"
click node_contentroutes "https://github.com/leodevtech/odisejanzu/blob/main/BACKEND/routes/siteContent.routes.js"
click node_contentcontroller "https://github.com/leodevtech/odisejanzu/blob/main/BACKEND/controllers/siteContent.controller.js"
click node_app "https://github.com/leodevtech/odisejanzu/blob/main/BACKEND/app.js"
click node_dbpool "https://github.com/leodevtech/odisejanzu/blob/main/BACKEND/config/db.js"
click node_usermodel "https://github.com/leodevtech/odisejanzu/blob/main/BACKEND/models/user.model.js"
click node_photomodel "https://github.com/leodevtech/odisejanzu/blob/main/BACKEND/models/photo.model.js"
click node_messagemodel "https://github.com/leodevtech/odisejanzu/blob/main/BACKEND/models/message.model.js"
click node_avismodel "https://github.com/leodevtech/odisejanzu/blob/main/BACKEND/models/avis.model.js"
click node_contentmodel "https://github.com/leodevtech/odisejanzu/blob/main/BACKEND/models/siteContent.model.js"

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_publicpages,node_gallerypage,node_contactform,node_apiclient toneBlue
class node_loginpage,node_dashreviews,node_dashgallery,node_dashcontent,node_dashhome toneAmber
class node_authroutes,node_authcontroller,node_authmw,node_validmw,node_photoroutes,node_photocontroller,node_messageroutes,node_messagecontroller,node_avisroutes,node_aviscontroller,node_contentroutes,node_contentcontroller,node_app toneMint
class node_dbpool,node_usermodel,node_photomodel,node_messagemodel,node_avismodel,node_contentmodel toneRose
class node_visitor,node_adminuser,node_cloudflare,node_mailer toneIndigo
```

## Components

### Public website

- [Public pages](https://github.com/leodevtech/odisejanzu/tree/main/FRONTEND/o-di-se-janzu-bootstrap/src/app): `FRONTEND/o-di-se-janzu-bootstrap/src/app`
- [Gallery page](https://github.com/leodevtech/odisejanzu/blob/main/FRONTEND/o-di-se-janzu-bootstrap/src/app/galerie/page.jsx): `FRONTEND/o-di-se-janzu-bootstrap/src/app/galerie/page.jsx`
- [Contact form](https://github.com/leodevtech/odisejanzu/blob/main/FRONTEND/o-di-se-janzu-bootstrap/src/components/ContactForm.jsx): `FRONTEND/o-di-se-janzu-bootstrap/src/components/ContactForm.jsx`
- [API client](https://github.com/leodevtech/odisejanzu/blob/main/FRONTEND/o-di-se-janzu-bootstrap/src/api/axios.js): `FRONTEND/o-di-se-janzu-bootstrap/src/api/axios.js`

### Admin dashboard

- [Admin login](https://github.com/leodevtech/odisejanzu/blob/main/FRONTEND/o-di-se-janzu-bootstrap/src/app/admin/login/page.jsx): `FRONTEND/o-di-se-janzu-bootstrap/src/app/admin/login/page.jsx`
- [Review management](https://github.com/leodevtech/odisejanzu/blob/main/FRONTEND/o-di-se-janzu-bootstrap/src/app/admin/dashboard/avis/page.jsx): `FRONTEND/o-di-se-janzu-bootstrap/src/app/admin/dashboard/avis/page.jsx`
- [Gallery management](https://github.com/leodevtech/odisejanzu/blob/main/FRONTEND/o-di-se-janzu-bootstrap/src/app/admin/dashboard/galerie/page.jsx): `FRONTEND/o-di-se-janzu-bootstrap/src/app/admin/dashboard/galerie/page.jsx`
- [Content settings](https://github.com/leodevtech/odisejanzu/blob/main/FRONTEND/o-di-se-janzu-bootstrap/src/app/admin/dashboard/parametres/page.jsx): `FRONTEND/o-di-se-janzu-bootstrap/src/app/admin/dashboard/parametres/page.jsx`
- [Dashboard overview](https://github.com/leodevtech/odisejanzu/blob/main/FRONTEND/o-di-se-janzu-bootstrap/src/app/admin/dashboard/page.jsx): `FRONTEND/o-di-se-janzu-bootstrap/src/app/admin/dashboard/page.jsx`

### Backend API

- [Authentication routes](https://github.com/leodevtech/odisejanzu/blob/main/BACKEND/routes/auth.routes.js): `BACKEND/routes/auth.routes.js`
- [Authentication](https://github.com/leodevtech/odisejanzu/blob/main/BACKEND/controllers/auth.controller.js): `BACKEND/controllers/auth.controller.js`
- [Authentication and roles](https://github.com/leodevtech/odisejanzu/blob/main/BACKEND/middleware/auth.middleware.js): `BACKEND/middleware/auth.middleware.js`
- [Request validation](https://github.com/leodevtech/odisejanzu/blob/main/BACKEND/middleware/validation.middleware.js): `BACKEND/middleware/validation.middleware.js`
- [Media routes](https://github.com/leodevtech/odisejanzu/blob/main/BACKEND/routes/photo.routes.js): `BACKEND/routes/photo.routes.js`
- [Media management](https://github.com/leodevtech/odisejanzu/blob/main/BACKEND/controllers/photo.controller.js): `BACKEND/controllers/photo.controller.js`
- [Message routes](https://github.com/leodevtech/odisejanzu/blob/main/BACKEND/routes/message.routes.js): `BACKEND/routes/message.routes.js`
- [Contact messages](https://github.com/leodevtech/odisejanzu/blob/main/BACKEND/controllers/message.controller.js): `BACKEND/controllers/message.controller.js`
- [Review routes](https://github.com/leodevtech/odisejanzu/blob/main/BACKEND/routes/avis.routes.js): `BACKEND/routes/avis.routes.js`
- [Review management](https://github.com/leodevtech/odisejanzu/blob/main/BACKEND/controllers/avis.controller.js): `BACKEND/controllers/avis.controller.js`
- [Site content routes](https://github.com/leodevtech/odisejanzu/blob/main/BACKEND/routes/siteContent.routes.js): `BACKEND/routes/siteContent.routes.js`
- [Site content](https://github.com/leodevtech/odisejanzu/blob/main/BACKEND/controllers/siteContent.controller.js): `BACKEND/controllers/siteContent.controller.js`
- [Express application](https://github.com/leodevtech/odisejanzu/blob/main/BACKEND/app.js): `BACKEND/app.js`

### Persistence and media

- [MySQL connection pool](https://github.com/leodevtech/odisejanzu/blob/main/BACKEND/config/db.js): `BACKEND/config/db.js`
- [User records](https://github.com/leodevtech/odisejanzu/blob/main/BACKEND/models/user.model.js): `BACKEND/models/user.model.js`
- [Media records](https://github.com/leodevtech/odisejanzu/blob/main/BACKEND/models/photo.model.js): `BACKEND/models/photo.model.js`
- [Message records](https://github.com/leodevtech/odisejanzu/blob/main/BACKEND/models/message.model.js): `BACKEND/models/message.model.js`
- [Review records](https://github.com/leodevtech/odisejanzu/blob/main/BACKEND/models/avis.model.js): `BACKEND/models/avis.model.js`
- [Site content records](https://github.com/leodevtech/odisejanzu/blob/main/BACKEND/models/siteContent.model.js): `BACKEND/models/siteContent.model.js`

### Other components

- **Site visitor**
- **Administrator**
- **Cloudflare Images / Stream**
- **Verification email service**

## Connections

- Express application → Authentication routes: mounts routes (evidence: `BACKEND/app.js`)
- Express application → Media routes: mounts routes (evidence: `BACKEND/app.js`)
- Express application → Message routes: mounts routes (evidence: `BACKEND/app.js`)
- Express application → Review routes: mounts routes (evidence: `BACKEND/app.js`)
- Express application → Site content routes: mounts routes (evidence: `BACKEND/app.js`)
- Authentication routes → Authentication: dispatches (evidence: `BACKEND/routes/auth.routes.js`)
- Authentication routes → Authentication and roles: protects routes (evidence: `BACKEND/routes/auth.routes.js`)
- Authentication routes → Request validation: validates input (evidence: `BACKEND/routes/auth.routes.js`)
- Authentication → User records: manages users (evidence: `BACKEND/controllers/auth.controller.js`)
- Authentication → Verification email service: sends verification (evidence: `BACKEND/controllers/auth.controller.js`)
- Media routes → Media management: dispatches (evidence: `BACKEND/routes/photo.routes.js`)
- Media routes → Authentication and roles: protects admin routes (evidence: `BACKEND/routes/photo.routes.js`)
- Media management → Media records: reads and writes (evidence: `BACKEND/controllers/photo.controller.js`)
- Media management → Cloudflare Images / Stream: uploads and deletes (evidence: `BACKEND/controllers/photo.controller.js`)
- Message routes → Contact messages: dispatches (evidence: `BACKEND/routes/message.routes.js`)
- Message routes → Authentication and roles: protects admin routes (evidence: `BACKEND/routes/message.routes.js`)
- Contact messages → Message records: reads and writes (evidence: `BACKEND/controllers/message.controller.js`)
- Review routes → Review management: dispatches (evidence: `BACKEND/routes/avis.routes.js`)
- Review routes → Authentication and roles: protects admin routes (evidence: `BACKEND/routes/avis.routes.js`)
- Review management → Review records: reads and writes (evidence: `BACKEND/controllers/avis.controller.js`)
- Site content routes → Site content: dispatches (evidence: `BACKEND/routes/siteContent.routes.js`)
- Site content routes → Authentication and roles: protects routes (evidence: `BACKEND/routes/siteContent.routes.js`)
- Site content → Site content records: reads and updates (evidence: `BACKEND/controllers/siteContent.controller.js`)
- User records → MySQL connection pool: queries (evidence: `BACKEND/models/user.model.js`)
- Media records → MySQL connection pool: queries (evidence: `BACKEND/models/photo.model.js`)
- Message records → MySQL connection pool: queries (evidence: `BACKEND/models/message.model.js`)
- Review records → MySQL connection pool: queries (evidence: `BACKEND/models/avis.model.js`)
- Site content records → MySQL connection pool: queries (evidence: `BACKEND/models/siteContent.model.js`)
