# sousx-lab/portfolio architecture

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

- Interactive diagram: https://gitdiagram.com/sousx-lab/portfolio
- Repository: https://github.com/sousx-lab/portfolio

## Overview

This is a personal portfolio website with a home page and a contact workflow. A visitor opens the portfolio or submits the contact form; the contact controller validates the submitted data, delegates email delivery, and either reports an error or redirects home. The tree also shows browser-side interactions and styling, but the README and sampled source do not establish their exact wiring or the portfolio sections’ data sources.

Main entry points: [`src/Controller/ContactController/ContactController.php`](https://github.com/sousx-lab/portfolio/blob/main/src/Controller/ContactController/ContactController.php) (Contact controller), [`src/Services/Contact/ContactMailer.php`](https://github.com/sousx-lab/portfolio/blob/main/src/Services/Contact/ContactMailer.php) (Contact mailer), [`src/Kernel.php`](https://github.com/sousx-lab/portfolio/blob/main/src/Kernel.php) (Symfony kernel), [`public/index.php`](https://github.com/sousx-lab/portfolio/blob/main/public/index.php) (HTTP entry point)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web requests"]
  node_front_controller["HTTP entry point<br/>[index.php]"]
  node_kernel["Symfony kernel<br/>[Kernel.php]"]
  node_home_controller["Home controller<br/>[HomeController.php]"]
  node_contact_controller["Contact controller"]
end

subgraph group_contact["Contact workflow"]
  node_contact_form["Contact form<br/>[ContactType.php]"]
  node_contact_data["Contact data<br/>[ContactData.php]"]
  node_contact_mailer["Contact mailer<br/>[ContactMailer.php]"]
  node_email_template["Email template"]
end

subgraph group_presentation["Presentation"]
  node_home_template["Portfolio page<br/>[homepage.html.twig]"]
  node_contact_template["Contact page<br/>[contact.html.twig]"]
  node_base_template["Base layout<br/>[base.html.twig]"]
  node_home_styles["Home styles<br/>[HomePage.scss]"]
  node_contact_styles["Contact styles<br/>[ContactPage.scss]"]
  node_browser_scripts["Browser scripts<br/>[app.js]"]
end

node_visitor(("Visitor"))
node_mailer_transport["Mail transport"]

node_visitor -->|"HTTP request"| node_front_controller
node_front_controller -->|"creates kernel"| node_kernel
node_kernel -->|"routes home"| node_home_controller
node_kernel -->|"routes contact"| node_contact_controller
node_home_controller -->|"renders page"| node_home_template
node_contact_controller -->|"creates form"| node_contact_form
node_contact_form -->|"binds data"| node_contact_data
node_contact_controller -->|"renders form"| node_contact_template
node_contact_controller -->|"sends valid submission"| node_contact_mailer
node_contact_mailer -->|"reads fields"| node_contact_data
node_contact_mailer -->|"renders email"| node_email_template
node_contact_mailer -->|"sends message"| node_mailer_transport
node_home_template -->|"extends layout"| node_base_template
node_contact_template -->|"extends layout"| node_base_template

click node_front_controller "https://github.com/sousx-lab/portfolio/blob/main/public/index.php"
click node_kernel "https://github.com/sousx-lab/portfolio/blob/main/src/Kernel.php"
click node_home_controller "https://github.com/sousx-lab/portfolio/blob/main/src/Controller/HomeController.php"
click node_contact_controller "https://github.com/sousx-lab/portfolio/blob/main/src/Controller/ContactController/ContactController.php"
click node_home_template "https://github.com/sousx-lab/portfolio/blob/main/templates/home/homepage.html.twig"
click node_contact_template "https://github.com/sousx-lab/portfolio/blob/main/templates/contact/contact.html.twig"
click node_base_template "https://github.com/sousx-lab/portfolio/blob/main/templates/base.html.twig"
click node_contact_form "https://github.com/sousx-lab/portfolio/blob/main/src/Form/ContactType.php"
click node_contact_data "https://github.com/sousx-lab/portfolio/blob/main/src/Entity/Contact/ContactData.php"
click node_contact_mailer "https://github.com/sousx-lab/portfolio/blob/main/src/Services/Contact/ContactMailer.php"
click node_email_template "https://github.com/sousx-lab/portfolio/blob/main/templates/contact/email.contact.html.twig"
click node_home_styles "https://github.com/sousx-lab/portfolio/blob/main/assets/scss/HomePage/HomePage.scss"
click node_contact_styles "https://github.com/sousx-lab/portfolio/blob/main/assets/scss/ContactPage/ContactPage.scss"
click node_browser_scripts "https://github.com/sousx-lab/portfolio/blob/main/assets/js/app.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_front_controller,node_kernel,node_home_controller,node_contact_controller toneBlue
class node_contact_form,node_contact_data,node_contact_mailer,node_email_template toneAmber
class node_home_template,node_contact_template,node_base_template,node_home_styles,node_contact_styles,node_browser_scripts toneMint
class node_visitor,node_mailer_transport toneIndigo
```

## Components

### Web requests

- [HTTP entry point](https://github.com/sousx-lab/portfolio/blob/main/public/index.php): `public/index.php`
- [Symfony kernel](https://github.com/sousx-lab/portfolio/blob/main/src/Kernel.php): `src/Kernel.php`
- [Home controller](https://github.com/sousx-lab/portfolio/blob/main/src/Controller/HomeController.php): `src/Controller/HomeController.php`
- [Contact controller](https://github.com/sousx-lab/portfolio/blob/main/src/Controller/ContactController/ContactController.php): `src/Controller/ContactController/ContactController.php`

### Contact workflow

- [Contact form](https://github.com/sousx-lab/portfolio/blob/main/src/Form/ContactType.php): `src/Form/ContactType.php`
- [Contact data](https://github.com/sousx-lab/portfolio/blob/main/src/Entity/Contact/ContactData.php): `src/Entity/Contact/ContactData.php`
- [Contact mailer](https://github.com/sousx-lab/portfolio/blob/main/src/Services/Contact/ContactMailer.php): `src/Services/Contact/ContactMailer.php`
- [Email template](https://github.com/sousx-lab/portfolio/blob/main/templates/contact/email.contact.html.twig): `templates/contact/email.contact.html.twig`

### Presentation

- [Portfolio page](https://github.com/sousx-lab/portfolio/blob/main/templates/home/homepage.html.twig): `templates/home/homepage.html.twig`
- [Contact page](https://github.com/sousx-lab/portfolio/blob/main/templates/contact/contact.html.twig): `templates/contact/contact.html.twig`
- [Base layout](https://github.com/sousx-lab/portfolio/blob/main/templates/base.html.twig): `templates/base.html.twig`
- [Home styles](https://github.com/sousx-lab/portfolio/blob/main/assets/scss/HomePage/HomePage.scss): `assets/scss/HomePage/HomePage.scss`
- [Contact styles](https://github.com/sousx-lab/portfolio/blob/main/assets/scss/ContactPage/ContactPage.scss): `assets/scss/ContactPage/ContactPage.scss`
- [Browser scripts](https://github.com/sousx-lab/portfolio/blob/main/assets/js/app.js): `assets/js/app.js`

### Other components

- **Visitor**
- **Mail transport**

## Connections

- Visitor → HTTP entry point: HTTP request
- HTTP entry point → Symfony kernel: creates kernel
- Symfony kernel → Home controller: routes home
- Symfony kernel → Contact controller: routes contact
- Home controller → Portfolio page: renders page
- Contact controller → Contact form: creates form
- Contact form → Contact data: binds data
- Contact controller → Contact page: renders form
- Contact controller → Contact mailer: sends valid submission
- Contact mailer → Contact data: reads fields
- Contact mailer → Email template: renders email
- Contact mailer → Mail transport: sends message
- Portfolio page → Base layout: extends layout
- Contact page → Base layout: extends layout
