# arianatovaret7/proyectologin_tp3 architecture

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

- Interactive diagram: https://gitdiagram.com/arianatovaret7/proyectologin_tp3
- Repository: https://github.com/arianatovaret7/proyectologin_tp3

## Overview

Proyecto Login is a PHP/MySQL authentication web app. A browser user can register, sign in, view a protected dashboard, sign out, or request and use a temporary password-reset link. Page handlers use shared bootstrap, validation, session, template, and data-access code; the data layer uses PDO against MySQL. The README documents account lockout, access history, idle-session expiry, responsive styling, and local reset-link display. Those capabilities are represented where supported, though some handlers and the schema were not sampled in full.

Main entry points: [`includes/bootstrap.php`](https://github.com/arianatovaret7/proyectologin_tp3/blob/main/includes/bootstrap.php) (Page bootstrap), [`includes/usuarios.php`](https://github.com/arianatovaret7/proyectologin_tp3/blob/main/includes/usuarios.php) (Account and access data), [`index.php`](https://github.com/arianatovaret7/proyectologin_tp3/blob/main/index.php) (Sign in), [`recuperar.php`](https://github.com/arianatovaret7/proyectologin_tp3/blob/main/recuperar.php) (Request reset)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_flows["User workflows"]
  node_login["Sign in<br/>[index.php]"]
  node_registration["Create account<br/>[registro.php]"]
  node_recovery["Request reset<br/>[recuperar.php]"]
  node_reset["Set password<br/>[restablecer.php]"]
  node_dashboard["Protected dashboard<br/>[dashboard.php]"]
  node_logout["Sign out<br/>[logout.php]"]
end

subgraph group_shared["Shared application"]
  node_bootstrap["Page bootstrap<br/>[bootstrap.php]"]
  node_validation["Server validation<br/>[validaciones.php]"]
  node_session["Session and CSRF<br/>[sesion.php]"]
  node_config["App configuration<br/>[config.php]"]
end

subgraph group_data["Persistence"]
  node_users["Account and access data<br/>[usuarios.php]"]
  node_connection["PDO connection<br/>[conexion.php]"]
  node_schema["Database schema<br/>[proyecto_login.sql]"]
end

subgraph group_ui["Presentation"]
  node_templates["Shared page rendering<br/>[plantilla.php]"]
  node_browser_validation["Client-side validation<br/>[validaciones.js]"]
  node_styles["Responsive styles<br/>[estilos.css]"]
end

node_browser(("Browser user"))
node_mysql[("MySQL / MariaDB")]

node_browser -->|"opens"| node_login
node_browser -->|"opens"| node_registration
node_browser -->|"opens"| node_recovery
node_browser -->|"opens link"| node_reset
node_browser -->|"views"| node_dashboard
node_browser -->|"submits"| node_logout
node_login -->|"loads"| node_bootstrap
node_registration -->|"loads"| node_bootstrap
node_recovery -->|"loads"| node_bootstrap
node_reset -->|"loads"| node_bootstrap
node_dashboard -->|"loads"| node_bootstrap
node_logout -->|"loads"| node_bootstrap
node_bootstrap -->|"loads"| node_config
node_bootstrap -->|"loads and starts"| node_session
node_bootstrap -->|"loads"| node_connection
node_bootstrap -->|"loads"| node_validation
node_bootstrap -->|"loads"| node_users
node_bootstrap -->|"loads"| node_templates
node_login -->|"checks credentials"| node_validation
node_login -->|"looks up and records"| node_users
node_login -->|"creates session"| node_session
node_registration -->|"validates input"| node_validation
node_registration -->|"checks and creates account"| node_users
node_recovery -->|"checks email"| node_validation
node_recovery -->|"creates reset token"| node_users
node_recovery -->|"offers local link"| node_reset
node_reset -->|"updates password and token"| node_users
node_dashboard -->|"requires login"| node_session
node_dashboard -->|"reads access history"| node_users
node_logout -->|"ends session"| node_session
node_users -->|"executes queries via"| node_connection
node_connection -->|"uses connection settings"| node_config
node_connection -->|"connects via PDO"| node_mysql
node_schema -->|"defines tables for"| node_mysql
node_templates -->|"loads script"| node_browser_validation
node_templates -->|"loads stylesheet"| node_styles
node_browser_validation -->|"validates forms"| node_browser

click node_login "https://github.com/arianatovaret7/proyectologin_tp3/blob/main/index.php"
click node_registration "https://github.com/arianatovaret7/proyectologin_tp3/blob/main/registro.php"
click node_recovery "https://github.com/arianatovaret7/proyectologin_tp3/blob/main/recuperar.php"
click node_reset "https://github.com/arianatovaret7/proyectologin_tp3/blob/main/restablecer.php"
click node_dashboard "https://github.com/arianatovaret7/proyectologin_tp3/blob/main/dashboard.php"
click node_logout "https://github.com/arianatovaret7/proyectologin_tp3/blob/main/logout.php"
click node_bootstrap "https://github.com/arianatovaret7/proyectologin_tp3/blob/main/includes/bootstrap.php"
click node_validation "https://github.com/arianatovaret7/proyectologin_tp3/blob/main/includes/validaciones.php"
click node_session "https://github.com/arianatovaret7/proyectologin_tp3/blob/main/includes/sesion.php"
click node_config "https://github.com/arianatovaret7/proyectologin_tp3/blob/main/config/config.php"
click node_templates "https://github.com/arianatovaret7/proyectologin_tp3/blob/main/includes/plantilla.php"
click node_browser_validation "https://github.com/arianatovaret7/proyectologin_tp3/blob/main/assets/js/validaciones.js"
click node_styles "https://github.com/arianatovaret7/proyectologin_tp3/blob/main/assets/css/estilos.css"
click node_users "https://github.com/arianatovaret7/proyectologin_tp3/blob/main/includes/usuarios.php"
click node_connection "https://github.com/arianatovaret7/proyectologin_tp3/blob/main/includes/conexion.php"
click node_schema "https://github.com/arianatovaret7/proyectologin_tp3/blob/main/database/proyecto_login.sql"

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_recovery,node_reset,node_dashboard,node_logout,node_browser toneBlue
class node_bootstrap,node_validation,node_session,node_config,node_mysql toneAmber
class node_users,node_connection,node_schema toneMint
class node_templates,node_browser_validation,node_styles toneRose
```

## Components

### User workflows

- [Sign in](https://github.com/arianatovaret7/proyectologin_tp3/blob/main/index.php): `index.php`
- [Create account](https://github.com/arianatovaret7/proyectologin_tp3/blob/main/registro.php): `registro.php`
- [Request reset](https://github.com/arianatovaret7/proyectologin_tp3/blob/main/recuperar.php): `recuperar.php`
- [Set password](https://github.com/arianatovaret7/proyectologin_tp3/blob/main/restablecer.php): `restablecer.php`
- [Protected dashboard](https://github.com/arianatovaret7/proyectologin_tp3/blob/main/dashboard.php): `dashboard.php`
- [Sign out](https://github.com/arianatovaret7/proyectologin_tp3/blob/main/logout.php): `logout.php`

### Shared application

- [Page bootstrap](https://github.com/arianatovaret7/proyectologin_tp3/blob/main/includes/bootstrap.php): `includes/bootstrap.php`
- [Server validation](https://github.com/arianatovaret7/proyectologin_tp3/blob/main/includes/validaciones.php): `includes/validaciones.php`
- [Session and CSRF](https://github.com/arianatovaret7/proyectologin_tp3/blob/main/includes/sesion.php): `includes/sesion.php`
- [App configuration](https://github.com/arianatovaret7/proyectologin_tp3/blob/main/config/config.php): `config/config.php`

### Persistence

- [Account and access data](https://github.com/arianatovaret7/proyectologin_tp3/blob/main/includes/usuarios.php): `includes/usuarios.php`
- [PDO connection](https://github.com/arianatovaret7/proyectologin_tp3/blob/main/includes/conexion.php): `includes/conexion.php`
- [Database schema](https://github.com/arianatovaret7/proyectologin_tp3/blob/main/database/proyecto_login.sql): `database/proyecto_login.sql`

### Presentation

- [Shared page rendering](https://github.com/arianatovaret7/proyectologin_tp3/blob/main/includes/plantilla.php): `includes/plantilla.php`
- [Client-side validation](https://github.com/arianatovaret7/proyectologin_tp3/blob/main/assets/js/validaciones.js): `assets/js/validaciones.js`
- [Responsive styles](https://github.com/arianatovaret7/proyectologin_tp3/blob/main/assets/css/estilos.css): `assets/css/estilos.css`

### Other components

- **Browser user**
- **MySQL / MariaDB**

## Connections

- Browser user → Sign in: opens (evidence: `README.md`)
- Browser user → Create account: opens (evidence: `README.md`)
- Browser user → Request reset: opens (evidence: `README.md`)
- Browser user → Set password: opens link (evidence: `README.md`)
- Browser user → Protected dashboard: views (evidence: `README.md`)
- Browser user → Sign out: submits (evidence: `README.md`)
- Sign in → Page bootstrap: loads (evidence: `index.php`)
- Create account → Page bootstrap: loads (evidence: `registro.php`)
- Request reset → Page bootstrap: loads (evidence: `recuperar.php`)
- Set password → Page bootstrap: loads (evidence: `restablecer.php`)
- Protected dashboard → Page bootstrap: loads (evidence: `dashboard.php`)
- Sign out → Page bootstrap: loads (evidence: `logout.php`)
- Page bootstrap → App configuration: loads (evidence: `includes/bootstrap.php`)
- Page bootstrap → Session and CSRF: loads and starts (evidence: `includes/bootstrap.php`)
- Page bootstrap → PDO connection: loads (evidence: `includes/bootstrap.php`)
- Page bootstrap → Server validation: loads (evidence: `includes/bootstrap.php`)
- Page bootstrap → Account and access data: loads (evidence: `includes/bootstrap.php`)
- Page bootstrap → Shared page rendering: loads (evidence: `includes/bootstrap.php`)
- Sign in → Server validation: checks credentials (evidence: `index.php`)
- Sign in → Account and access data: looks up and records (evidence: `index.php`)
- Sign in → Session and CSRF: creates session (evidence: `index.php`)
- Create account → Server validation: validates input (evidence: `registro.php`)
- Create account → Account and access data: checks and creates account (evidence: `registro.php`)
- Request reset → Server validation: checks email (evidence: `recuperar.php`)
- Request reset → Account and access data: creates reset token (evidence: `recuperar.php`)
- Request reset → Set password: offers local link (evidence: `recuperar.php`)
- Set password → Account and access data: updates password and token (evidence: `restablecer.php`)
- Protected dashboard → Session and CSRF: requires login (evidence: `dashboard.php`)
- Protected dashboard → Account and access data: reads access history (evidence: `dashboard.php`)
- Sign out → Session and CSRF: ends session (evidence: `README.md`)
- Account and access data → PDO connection: executes queries via (evidence: `includes/usuarios.php`)
- PDO connection → App configuration: uses connection settings (evidence: `includes/conexion.php`)
- PDO connection → MySQL / MariaDB: connects via PDO (evidence: `includes/conexion.php`)
- Database schema → MySQL / MariaDB: defines tables for (evidence: `README.md`)
- Shared page rendering → Client-side validation: loads script (evidence: `includes/plantilla.php`)
- Shared page rendering → Responsive styles: loads stylesheet (evidence: `includes/plantilla.php`)
- Client-side validation → Browser user: validates forms (evidence: `README.md`)
