# ivanrubert/symfony-contactos architecture

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

- Interactive diagram: https://gitdiagram.com/ivanrubert/symfony-contactos
- Repository: https://github.com/ivanrubert/symfony-contactos

## Overview

This is a Symfony contact-management web application with account registration and login. Its main workflow lets an authenticated user list contacts, view one, create or edit it, and delete it; contact forms also capture a province. Registration validates user details, hashes the password, and persists the account. The graph includes the principal controllers, forms, entities, and repositories. The README is empty, and the sampled sources do not show database configuration or the login controller’s behavior, so those details are kept limited.

Main entry points: [`src/Entity/Contacto.php`](https://github.com/ivanrubert/symfony-contactos/blob/master/src/Entity/Contacto.php) (Contact record), [`src/Controller/ContactoController.php`](https://github.com/ivanrubert/symfony-contactos/blob/master/src/Controller/ContactoController.php) (Contact pages), [`src/Controller/RegistrationController.php`](https://github.com/ivanrubert/symfony-contactos/blob/master/src/Controller/RegistrationController.php) (Registration), [`src/Entity/Provincia.php`](https://github.com/ivanrubert/symfony-contactos/blob/master/src/Entity/Provincia.php) (Province)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web workflows"]
  node_contacts["Contact pages"]
  node_home["Contact listing<br/>[PageController.php]"]
  node_registration["Registration"]
  node_login["Login controller"]
  node_contact_form["Contact form"]
  node_registration_form["Registration form"]
  node_contact_views["Contact views"]
  node_registration_view["Registration view<br/>[register.html.twig]"]
  node_login_view["Login view<br/>[login.html.twig]"]
end

subgraph group_domain["Domain data"]
  node_contact["Contact record<br/>[Contacto.php]"]
  node_province["Province<br/>[Provincia.php]"]
  node_user_entity["User account<br/>[User.php]"]
end

subgraph group_persistence["Persistence"]
  node_contact_repo["Contact repository"]
  node_province_repo["Province repository"]
  node_user_repo["User repository<br/>[UserRepository.php]"]
  node_database[("Doctrine database<br/>[doctrine.yaml]")]
end

node_visitor(("User"))

node_visitor -->|"manages contacts"| node_contacts
node_visitor -->|"views list"| node_home
node_visitor -->|"registers"| node_registration
node_visitor -.->|"authenticates"| node_login
node_contacts -->|"builds form"| node_contact_form
node_contacts -->|"loads and saves"| node_contact
node_contacts -->|"renders"| node_contact_views
node_home -->|"loads contacts"| node_contact
node_home -->|"renders listing"| node_contact_views
node_registration -->|"builds form"| node_registration_form
node_registration -->|"creates account"| node_user_entity
node_registration -->|"renders"| node_registration_view
node_contact_form -->|"binds data"| node_contact
node_contact_form -->|"offers choices"| node_province
node_registration_form -->|"binds data"| node_user_entity
node_contact -->|"uses repository"| node_contact_repo
node_contact -->|"references"| node_province
node_province -->|"uses repository"| node_province_repo
node_province -->|"relates contacts"| node_contact
node_user_entity -->|"uses repository"| node_user_repo
node_contacts -->|"persists changes"| node_database
node_registration -->|"persists account"| node_database
node_user_repo -->|"stores password upgrades"| node_database

click node_contacts "https://github.com/ivanrubert/symfony-contactos/blob/master/src/Controller/ContactoController.php"
click node_home "https://github.com/ivanrubert/symfony-contactos/blob/master/src/Controller/PageController.php"
click node_registration "https://github.com/ivanrubert/symfony-contactos/blob/master/src/Controller/RegistrationController.php"
click node_login "https://github.com/ivanrubert/symfony-contactos/blob/master/src/Controller/SecurityController.php"
click node_contact_form "https://github.com/ivanrubert/symfony-contactos/blob/master/src/Form/ContactoFormType.php"
click node_registration_form "https://github.com/ivanrubert/symfony-contactos/blob/master/src/Form/RegistrationFormType.php"
click node_contact_views "https://github.com/ivanrubert/symfony-contactos/tree/master/templates"
click node_registration_view "https://github.com/ivanrubert/symfony-contactos/blob/master/templates/registration/register.html.twig"
click node_login_view "https://github.com/ivanrubert/symfony-contactos/blob/master/templates/security/login.html.twig"
click node_contact "https://github.com/ivanrubert/symfony-contactos/blob/master/src/Entity/Contacto.php"
click node_province "https://github.com/ivanrubert/symfony-contactos/blob/master/src/Entity/Provincia.php"
click node_user_entity "https://github.com/ivanrubert/symfony-contactos/blob/master/src/Entity/User.php"
click node_contact_repo "https://github.com/ivanrubert/symfony-contactos/blob/master/src/Repository/ContactoRepository.php"
click node_province_repo "https://github.com/ivanrubert/symfony-contactos/blob/master/src/Repository/ProvinciaRepository.php"
click node_user_repo "https://github.com/ivanrubert/symfony-contactos/blob/master/src/Repository/UserRepository.php"
click node_database "https://github.com/ivanrubert/symfony-contactos/blob/master/config/packages/doctrine.yaml"

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_contacts,node_home,node_registration,node_login,node_contact_form,node_registration_form,node_contact_views,node_registration_view,node_login_view,node_visitor toneBlue
class node_contact,node_province,node_user_entity toneAmber
class node_contact_repo,node_province_repo,node_user_repo,node_database toneMint
```

## Components

### Web workflows

- [Contact pages](https://github.com/ivanrubert/symfony-contactos/blob/master/src/Controller/ContactoController.php): `src/Controller/ContactoController.php`
- [Contact listing](https://github.com/ivanrubert/symfony-contactos/blob/master/src/Controller/PageController.php): `src/Controller/PageController.php`
- [Registration](https://github.com/ivanrubert/symfony-contactos/blob/master/src/Controller/RegistrationController.php): `src/Controller/RegistrationController.php`
- [Login controller](https://github.com/ivanrubert/symfony-contactos/blob/master/src/Controller/SecurityController.php): `src/Controller/SecurityController.php`
- [Contact form](https://github.com/ivanrubert/symfony-contactos/blob/master/src/Form/ContactoFormType.php): `src/Form/ContactoFormType.php`
- [Registration form](https://github.com/ivanrubert/symfony-contactos/blob/master/src/Form/RegistrationFormType.php): `src/Form/RegistrationFormType.php`
- [Contact views](https://github.com/ivanrubert/symfony-contactos/tree/master/templates): `templates`
- [Registration view](https://github.com/ivanrubert/symfony-contactos/blob/master/templates/registration/register.html.twig): `templates/registration/register.html.twig`
- [Login view](https://github.com/ivanrubert/symfony-contactos/blob/master/templates/security/login.html.twig): `templates/security/login.html.twig`

### Domain data

- [Contact record](https://github.com/ivanrubert/symfony-contactos/blob/master/src/Entity/Contacto.php): `src/Entity/Contacto.php`
- [Province](https://github.com/ivanrubert/symfony-contactos/blob/master/src/Entity/Provincia.php): `src/Entity/Provincia.php`
- [User account](https://github.com/ivanrubert/symfony-contactos/blob/master/src/Entity/User.php): `src/Entity/User.php`

### Persistence

- [Contact repository](https://github.com/ivanrubert/symfony-contactos/blob/master/src/Repository/ContactoRepository.php): `src/Repository/ContactoRepository.php`
- [Province repository](https://github.com/ivanrubert/symfony-contactos/blob/master/src/Repository/ProvinciaRepository.php): `src/Repository/ProvinciaRepository.php`
- [User repository](https://github.com/ivanrubert/symfony-contactos/blob/master/src/Repository/UserRepository.php): `src/Repository/UserRepository.php`
- [Doctrine database](https://github.com/ivanrubert/symfony-contactos/blob/master/config/packages/doctrine.yaml): `config/packages/doctrine.yaml`

### Other components

- **User**

## Connections

- User → Contact pages: manages contacts (evidence: `src/Controller/ContactoController.php`)
- User → Contact listing: views list (evidence: `src/Controller/PageController.php`)
- User → Registration: registers (evidence: `src/Controller/RegistrationController.php`)
- User → Login controller: authenticates
- Contact pages → Contact form: builds form (evidence: `src/Controller/ContactoController.php`)
- Contact pages → Contact record: loads and saves (evidence: `src/Controller/ContactoController.php`)
- Contact pages → Contact views: renders (evidence: `src/Controller/ContactoController.php`)
- Contact listing → Contact record: loads contacts (evidence: `src/Controller/PageController.php`)
- Contact listing → Contact views: renders listing (evidence: `src/Controller/PageController.php`)
- Registration → Registration form: builds form (evidence: `src/Controller/RegistrationController.php`)
- Registration → User account: creates account (evidence: `src/Controller/RegistrationController.php`)
- Registration → Registration view: renders (evidence: `src/Controller/RegistrationController.php`)
- Contact form → Contact record: binds data (evidence: `src/Form/ContactoFormType.php`)
- Contact form → Province: offers choices (evidence: `src/Form/ContactoFormType.php`)
- Registration form → User account: binds data (evidence: `src/Form/RegistrationFormType.php`)
- Contact record → Contact repository: uses repository (evidence: `src/Entity/Contacto.php`)
- Contact record → Province: references (evidence: `src/Entity/Contacto.php`)
- Province → Province repository: uses repository (evidence: `src/Entity/Provincia.php`)
- Province → Contact record: relates contacts (evidence: `src/Entity/Provincia.php`)
- User account → User repository: uses repository (evidence: `src/Entity/User.php`)
- Contact pages → Doctrine database: persists changes (evidence: `src/Controller/ContactoController.php`)
- Registration → Doctrine database: persists account (evidence: `src/Controller/RegistrationController.php`)
- User repository → Doctrine database: stores password upgrades (evidence: `src/Repository/UserRepository.php`)
