# baptchau/mjv-web architecture

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

## Overview

MJ Vaubécourt is a Symfony website for a handball club. Visitors browse teams, news, forum discussions, match schedules, and contact information; administrators manage that content through a back office. The graph includes the sampled forum and team-service layers, plus README-documented capabilities whose controller internals were not sampled. Edges cite the README or indexed source references; unsampled controller behavior is not inferred in detail.

Main entry points: [`src/Controller/MainController.php`](https://github.com/baptchau/mjv-web/blob/master/src/Controller/MainController.php) (Site pages), [`src/Service/TeamService.php`](https://github.com/baptchau/mjv-web/blob/master/src/Service/TeamService.php) (Team service), [`src/Service/NewsService.php`](https://github.com/baptchau/mjv-web/blob/master/src/Service/NewsService.php) (News service), [`src/Controller/ForumController.php`](https://github.com/baptchau/mjv-web/blob/master/src/Controller/ForumController.php) (Forum)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Public site"]
  node_public_site["Site pages<br/>[MainController.php]"]
  node_google_auth["Google sign-in"]
  node_user_entity["User accounts<br/>[User.php]"]
  node_user_repo["User queries<br/>[UserRepository.php]"]
end

subgraph group_content["Content features"]
  node_news["News<br/>[NewsController.php]"]
  node_news_service["News service<br/>[NewsService.php]"]
  node_news_posts["News posts<br/>[NewsPost.php]"]
  node_news_comments["News comments<br/>[NewsComment.php]"]
  node_forum["Forum"]
  node_forum_service["Forum service<br/>[ForumService.php]"]
  node_forum_posts["Forum posts<br/>[ForumPost.php]"]
  node_forum_repo["Forum queries"]
  node_contact["Contact form"]
  node_contact_entity["Contact messages<br/>[Contact.php]"]
end

subgraph group_club["Club data"]
  node_teams["Team pages<br/>[TeamController.php]"]
  node_team_service["Team service<br/>[TeamService.php]"]
  node_team_entity["Teams<br/>[Team.php]"]
  node_category["Categories<br/>[CategoryEnum.php]"]
  node_calendar["Match calendar"]
  node_match_entity["Match records<br/>[TeamMatch.php]"]
  node_match_repo["Match queries"]
end

subgraph group_admin["Administration"]
  node_admin["Admin back office"]
  node_news_admin["News management"]
end

node_visitor(("Visitor"))
node_database[("PostgreSQL")]

node_visitor -->|"browses"| node_public_site
node_visitor -->|"reads"| node_news
node_visitor -->|"discusses"| node_forum
node_visitor -->|"contacts"| node_contact
node_visitor -->|"browses"| node_teams
node_visitor -->|"views"| node_calendar
node_public_site -->|"uses"| node_news_service
node_public_site -->|"uses"| node_forum_service
node_public_site -->|"uses"| node_team_service
node_forum -->|"builds views"| node_forum_service
node_forum -->|"queries posts"| node_forum_repo
node_forum_service -->|"queries posts"| node_forum_repo
node_forum_repo -->|"loads"| node_forum_posts
node_news_service -->|"queries"| node_news_posts
node_news_service -->|"queries"| node_news_comments
node_team_service -->|"loads"| node_team_entity
node_team_service -->|"resolves"| node_category
node_teams -->|"uses"| node_team_service
node_match_repo -->|"queries"| node_match_entity
node_calendar -.->|"loads matches"| node_match_repo
node_admin -->|"routes to"| node_news_admin
node_news_admin -->|"manages"| node_news_posts
node_forum_posts -.->|"persists in"| node_database
node_news_posts -.->|"persists in"| node_database
node_team_entity -.->|"persists in"| node_database
node_match_entity -.->|"persists in"| node_database
node_google_auth -->|"looks up"| node_user_repo
node_google_auth -->|"authenticates"| node_user_entity
node_user_repo -->|"loads"| node_user_entity

click node_public_site "https://github.com/baptchau/mjv-web/blob/master/src/Controller/MainController.php"
click node_news "https://github.com/baptchau/mjv-web/blob/master/src/Controller/NewsController.php"
click node_news_service "https://github.com/baptchau/mjv-web/blob/master/src/Service/NewsService.php"
click node_news_posts "https://github.com/baptchau/mjv-web/blob/master/src/Entity/NewsPost.php"
click node_news_comments "https://github.com/baptchau/mjv-web/blob/master/src/Entity/NewsComment.php"
click node_forum "https://github.com/baptchau/mjv-web/blob/master/src/Controller/ForumController.php"
click node_forum_service "https://github.com/baptchau/mjv-web/blob/master/src/Service/ForumService.php"
click node_forum_posts "https://github.com/baptchau/mjv-web/blob/master/src/Entity/ForumPost.php"
click node_forum_repo "https://github.com/baptchau/mjv-web/blob/master/src/Repository/ForumPostRepository.php"
click node_contact "https://github.com/baptchau/mjv-web/blob/master/src/Controller/ContactController.php"
click node_contact_entity "https://github.com/baptchau/mjv-web/blob/master/src/Entity/Contact.php"
click node_teams "https://github.com/baptchau/mjv-web/blob/master/src/Controller/TeamController.php"
click node_team_service "https://github.com/baptchau/mjv-web/blob/master/src/Service/TeamService.php"
click node_team_entity "https://github.com/baptchau/mjv-web/blob/master/src/Entity/Team.php"
click node_category "https://github.com/baptchau/mjv-web/blob/master/src/Enum/CategoryEnum.php"
click node_calendar "https://github.com/baptchau/mjv-web/blob/master/src/Controller/CalendarController.php"
click node_match_entity "https://github.com/baptchau/mjv-web/blob/master/src/Entity/TeamMatch.php"
click node_match_repo "https://github.com/baptchau/mjv-web/blob/master/src/Repository/TeamMatchRepository.php"
click node_admin "https://github.com/baptchau/mjv-web/blob/master/src/Controller/Admin/DashboardController.php"
click node_news_admin "https://github.com/baptchau/mjv-web/blob/master/src/Controller/Admin/NewsPostCrudController.php"
click node_google_auth "https://github.com/baptchau/mjv-web/blob/master/src/Security/GoogleAuthenticator.php"
click node_user_entity "https://github.com/baptchau/mjv-web/blob/master/src/Entity/User.php"
click node_user_repo "https://github.com/baptchau/mjv-web/blob/master/src/Repository/UserRepository.php"

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_public_site,node_google_auth,node_user_entity,node_user_repo toneBlue
class node_news,node_news_service,node_news_posts,node_news_comments,node_forum,node_forum_service,node_forum_posts,node_forum_repo,node_contact,node_contact_entity,node_database toneAmber
class node_teams,node_team_service,node_team_entity,node_category,node_calendar,node_match_entity,node_match_repo toneMint
class node_admin,node_news_admin toneRose
class node_visitor toneIndigo
```

## Components

### Public site

- [Site pages](https://github.com/baptchau/mjv-web/blob/master/src/Controller/MainController.php): `src/Controller/MainController.php`
- [Google sign-in](https://github.com/baptchau/mjv-web/blob/master/src/Security/GoogleAuthenticator.php): `src/Security/GoogleAuthenticator.php`
- [User accounts](https://github.com/baptchau/mjv-web/blob/master/src/Entity/User.php): `src/Entity/User.php`
- [User queries](https://github.com/baptchau/mjv-web/blob/master/src/Repository/UserRepository.php): `src/Repository/UserRepository.php`

### Content features

- [News](https://github.com/baptchau/mjv-web/blob/master/src/Controller/NewsController.php): `src/Controller/NewsController.php`
- [News service](https://github.com/baptchau/mjv-web/blob/master/src/Service/NewsService.php): `src/Service/NewsService.php`
- [News posts](https://github.com/baptchau/mjv-web/blob/master/src/Entity/NewsPost.php): `src/Entity/NewsPost.php`
- [News comments](https://github.com/baptchau/mjv-web/blob/master/src/Entity/NewsComment.php): `src/Entity/NewsComment.php`
- [Forum](https://github.com/baptchau/mjv-web/blob/master/src/Controller/ForumController.php): `src/Controller/ForumController.php`
- [Forum service](https://github.com/baptchau/mjv-web/blob/master/src/Service/ForumService.php): `src/Service/ForumService.php`
- [Forum posts](https://github.com/baptchau/mjv-web/blob/master/src/Entity/ForumPost.php): `src/Entity/ForumPost.php`
- [Forum queries](https://github.com/baptchau/mjv-web/blob/master/src/Repository/ForumPostRepository.php): `src/Repository/ForumPostRepository.php`
- [Contact form](https://github.com/baptchau/mjv-web/blob/master/src/Controller/ContactController.php): `src/Controller/ContactController.php`
- [Contact messages](https://github.com/baptchau/mjv-web/blob/master/src/Entity/Contact.php): `src/Entity/Contact.php`

### Club data

- [Team pages](https://github.com/baptchau/mjv-web/blob/master/src/Controller/TeamController.php): `src/Controller/TeamController.php`
- [Team service](https://github.com/baptchau/mjv-web/blob/master/src/Service/TeamService.php): `src/Service/TeamService.php`
- [Teams](https://github.com/baptchau/mjv-web/blob/master/src/Entity/Team.php): `src/Entity/Team.php`
- [Categories](https://github.com/baptchau/mjv-web/blob/master/src/Enum/CategoryEnum.php): `src/Enum/CategoryEnum.php`
- [Match calendar](https://github.com/baptchau/mjv-web/blob/master/src/Controller/CalendarController.php): `src/Controller/CalendarController.php`
- [Match records](https://github.com/baptchau/mjv-web/blob/master/src/Entity/TeamMatch.php): `src/Entity/TeamMatch.php`
- [Match queries](https://github.com/baptchau/mjv-web/blob/master/src/Repository/TeamMatchRepository.php): `src/Repository/TeamMatchRepository.php`

### Administration

- [Admin back office](https://github.com/baptchau/mjv-web/blob/master/src/Controller/Admin/DashboardController.php): `src/Controller/Admin/DashboardController.php`
- [News management](https://github.com/baptchau/mjv-web/blob/master/src/Controller/Admin/NewsPostCrudController.php): `src/Controller/Admin/NewsPostCrudController.php`

### Other components

- **Visitor**
- **PostgreSQL**

## Connections

- Visitor → Site pages: browses
- Visitor → News: reads
- Visitor → Forum: discusses
- Visitor → Contact form: contacts
- Visitor → Team pages: browses
- Visitor → Match calendar: views
- Site pages → News service: uses (evidence: `src/Controller/MainController.php`)
- Site pages → Forum service: uses (evidence: `src/Controller/MainController.php`)
- Site pages → Team service: uses (evidence: `src/Controller/MainController.php`)
- Forum → Forum service: builds views (evidence: `src/Controller/ForumController.php`)
- Forum → Forum queries: queries posts (evidence: `src/Controller/ForumController.php`)
- Forum service → Forum queries: queries posts (evidence: `src/Service/ForumService.php`)
- Forum queries → Forum posts: loads (evidence: `src/Repository/ForumPostRepository.php`)
- News service → News posts: queries (evidence: `src/Service/NewsService.php`)
- News service → News comments: queries (evidence: `src/Service/NewsService.php`)
- Team service → Teams: loads (evidence: `src/Service/TeamService.php`)
- Team service → Categories: resolves (evidence: `src/Service/TeamService.php`)
- Team pages → Team service: uses (evidence: `src/Controller/TeamController.php`)
- Match queries → Match records: queries (evidence: `src/Repository/TeamMatchRepository.php`)
- Match calendar → Match queries: loads matches
- Admin back office → News management: routes to (evidence: `src/Controller/Admin/DashboardController.php`)
- News management → News posts: manages (evidence: `src/Controller/Admin/NewsPostCrudController.php`)
- Forum posts → PostgreSQL: persists in
- News posts → PostgreSQL: persists in
- Teams → PostgreSQL: persists in
- Match records → PostgreSQL: persists in
- Google sign-in → User queries: looks up (evidence: `src/Security/GoogleAuthenticator.php`)
- Google sign-in → User accounts: authenticates (evidence: `src/Security/GoogleAuthenticator.php`)
- User queries → User accounts: loads (evidence: `src/Repository/UserRepository.php`)
