# dylandominguez/mesa-de-partes architecture

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

- Interactive diagram: https://gitdiagram.com/dylandominguez/mesa-de-partes
- Repository: https://github.com/dylandominguez/mesa-de-partes

## Overview

This repository implements an early-stage Mesa de Partes web app whose evidenced workflow is account registration, email confirmation, and account activation. Registration validates fields in the browser, submits to a PHP controller, checks for duplicate email, stores a user, and sends a confirmation link; visiting that link requests activation. A login screen exists, but its authentication behavior is not shown. The README is only a title, and the home view is empty, so document-handling capabilities or their wiring cannot be established from the sampled source.

Main entry points: [`model/Usuario.php`](https://github.com/dylandominguez/mesa-de-partes/blob/main/model/Usuario.php) (User model), [`controller/usuario.php`](https://github.com/dylandominguez/mesa-de-partes/blob/main/controller/usuario.php) (User operations), [`model/Email.php`](https://github.com/dylandominguez/mesa-de-partes/blob/main/model/Email.php) (Confirmation email), [`view/registro/index.php`](https://github.com/dylandominguez/mesa-de-partes/blob/main/view/registro/index.php) (Registration screen)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web screens"]
  node_login["Login screen<br/>[index.php]"]
  node_registration["Registration screen<br/>[index.php]"]
  node_registration_js["Registration validation<br/>[registro.js]"]
  node_confirmation["Confirmation screen<br/>[index.php]"]
  node_confirmation_js["Confirmation request<br/>[confirmar.js]"]
  node_home["Home view<br/>[index.php]"]
end

subgraph group_application["Account workflow"]
  node_user_controller["User operations<br/>[usuario.php]"]
  node_user_model["User model<br/>[Usuario.php]"]
end

subgraph group_integrations["Persistence and email"]
  node_connection["Database connection<br/>[conexion.php]"]
  node_user_store[("User records")]
  node_email_model["Confirmation email<br/>[Email.php]"]
  node_email_template["Registration email template<br/>[registrar.html]"]
end

node_visitor(("Visitor"))
node_smtp["Gmail SMTP"]

node_visitor -->|"opens"| node_login
node_visitor -->|"opens"| node_registration
node_registration -->|"loads"| node_registration_js
node_registration_js -->|"submits registration"| node_user_controller
node_user_controller -->|"checks email"| node_user_model
node_user_controller -->|"creates user"| node_user_model
node_user_model -->|"opens connection"| node_connection
node_user_model -->|"reads and writes"| node_user_store
node_user_controller -->|"requests confirmation"| node_email_model
node_email_model -->|"fetches user"| node_user_model
node_email_model -->|"reads template"| node_email_template
node_email_model -->|"sends message"| node_smtp
node_smtp -->|"delivers link"| node_visitor
node_visitor -->|"opens link"| node_confirmation
node_confirmation -->|"loads"| node_confirmation_js
node_confirmation_js -->|"requests activation"| node_user_controller
node_user_controller -->|"activates user"| node_user_model
node_user_model -->|"updates status"| node_user_store
node_visitor -.->|"opens"| node_home

click node_login "https://github.com/dylandominguez/mesa-de-partes/blob/main/index.php"
click node_registration "https://github.com/dylandominguez/mesa-de-partes/blob/main/view/registro/index.php"
click node_registration_js "https://github.com/dylandominguez/mesa-de-partes/blob/main/view/registro/registro.js"
click node_confirmation "https://github.com/dylandominguez/mesa-de-partes/blob/main/view/confirmar_correo/index.php"
click node_confirmation_js "https://github.com/dylandominguez/mesa-de-partes/blob/main/view/confirmar_correo/confirmar.js"
click node_home "https://github.com/dylandominguez/mesa-de-partes/blob/main/view/home/index.php"
click node_user_controller "https://github.com/dylandominguez/mesa-de-partes/blob/main/controller/usuario.php"
click node_user_model "https://github.com/dylandominguez/mesa-de-partes/blob/main/model/Usuario.php"
click node_connection "https://github.com/dylandominguez/mesa-de-partes/blob/main/config/conexion.php"
click node_email_model "https://github.com/dylandominguez/mesa-de-partes/blob/main/model/Email.php"
click node_email_template "https://github.com/dylandominguez/mesa-de-partes/blob/main/assets/email/registrar.html"

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_login,node_registration,node_registration_js,node_confirmation,node_confirmation_js,node_home toneBlue
class node_user_controller,node_user_model toneAmber
class node_connection,node_user_store,node_email_model,node_email_template toneMint
class node_visitor,node_smtp toneIndigo
```

## Components

### Web screens

- [Login screen](https://github.com/dylandominguez/mesa-de-partes/blob/main/index.php): `index.php`
- [Registration screen](https://github.com/dylandominguez/mesa-de-partes/blob/main/view/registro/index.php): `view/registro/index.php`
- [Registration validation](https://github.com/dylandominguez/mesa-de-partes/blob/main/view/registro/registro.js): `view/registro/registro.js`
- [Confirmation screen](https://github.com/dylandominguez/mesa-de-partes/blob/main/view/confirmar_correo/index.php): `view/confirmar_correo/index.php`
- [Confirmation request](https://github.com/dylandominguez/mesa-de-partes/blob/main/view/confirmar_correo/confirmar.js): `view/confirmar_correo/confirmar.js`
- [Home view](https://github.com/dylandominguez/mesa-de-partes/blob/main/view/home/index.php): `view/home/index.php`

### Account workflow

- [User operations](https://github.com/dylandominguez/mesa-de-partes/blob/main/controller/usuario.php): `controller/usuario.php`
- [User model](https://github.com/dylandominguez/mesa-de-partes/blob/main/model/Usuario.php): `model/Usuario.php`

### Persistence and email

- [Database connection](https://github.com/dylandominguez/mesa-de-partes/blob/main/config/conexion.php): `config/conexion.php`
- **User records**
- [Confirmation email](https://github.com/dylandominguez/mesa-de-partes/blob/main/model/Email.php): `model/Email.php`
- [Registration email template](https://github.com/dylandominguez/mesa-de-partes/blob/main/assets/email/registrar.html): `assets/email/registrar.html`

### Other components

- **Visitor**
- **Gmail SMTP**

## Connections

- Visitor → Login screen: opens
- Visitor → Registration screen: opens
- Registration screen → Registration validation: loads
- Registration validation → User operations: submits registration
- User operations → User model: checks email
- User operations → User model: creates user
- User model → Database connection: opens connection
- User model → User records: reads and writes
- User operations → Confirmation email: requests confirmation
- Confirmation email → User model: fetches user
- Confirmation email → Registration email template: reads template
- Confirmation email → Gmail SMTP: sends message
- Gmail SMTP → Visitor: delivers link
- Visitor → Confirmation screen: opens link
- Confirmation screen → Confirmation request: loads
- Confirmation request → User operations: requests activation
- User operations → User model: activates user
- User model → User records: updates status
- Visitor → Home view: opens
