# helengarradogarcia/proyectologin_tp3 architecture

> Architecture diagram of the GitHub repository helengarradogarcia/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/helengarradogarcia/proyectologin_tp3
- Repository: https://github.com/helengarradogarcia/proyectologin_tp3

## Overview

Proyecto Login is a PHP/MySQL account system. Users can register, sign in, recover a password, view their role and recent access history, and log out; browser JavaScript also validates forms and provides a persistent light/dark theme. The sampled PHP shows form handlers calling shared session/database utilities and querying or updating MySQL. The README documents the database tables and product features. Some pages and the SQL schema were not sampled, so their internal behavior is represented only where the README or excerpts support it.

Main entry points: [`public/dashboard.php`](https://github.com/helengarradogarcia/proyectologin_tp3/blob/main/public/dashboard.php) (Dashboard), [`src/config.php`](https://github.com/helengarradogarcia/proyectologin_tp3/blob/main/src/config.php) (Session and database utilities), [`public/index.php`](https://github.com/helengarradogarcia/proyectologin_tp3/blob/main/public/index.php) (Login screen), [`src/procesar_login.php`](https://github.com/helengarradogarcia/proyectologin_tp3/blob/main/src/procesar_login.php) (Login processing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_screens["Browser screens"]
  node_login_screen["Login screen<br/>[index.php]"]
  node_registration_screen["Registration screen<br/>[registro.php]"]
  node_recovery_screen["Recovery screen<br/>[recuperar.php]"]
  node_dashboard["Dashboard<br/>[dashboard.php]"]
  node_browser_behavior["Form and theme behavior<br/>[script.js]"]
  node_styles["Responsive styling<br/>[style.css]"]
end

subgraph group_handlers["Account workflows"]
  node_login_handler["Login processing<br/>[procesar_login.php]"]
  node_registration_handler["Registration processing"]
  node_recovery_handler["Recovery processing"]
  node_logout["Session logout<br/>[logout.php]"]
end

subgraph group_shared["Shared services"]
  node_shared_config["Session and database utilities<br/>[config.php]"]
end

subgraph group_data["Persistence"]
  node_schema["Database schema<br/>[database.sql]"]
  node_mysql[("MySQL database")]
end

node_user(("User"))

node_user -->|"opens"| node_login_screen
node_user -->|"opens"| node_registration_screen
node_user -->|"opens"| node_recovery_screen
node_user -->|"views"| node_dashboard
node_login_screen -->|"posts credentials"| node_login_handler
node_registration_screen -->|"posts registration"| node_registration_handler
node_recovery_screen -->|"posts email"| node_recovery_handler
node_login_screen -->|"loads"| node_browser_behavior
node_dashboard -->|"loads"| node_browser_behavior
node_login_screen -->|"loads"| node_styles
node_registration_screen -->|"loads"| node_styles
node_recovery_screen -->|"loads"| node_styles
node_dashboard -->|"loads"| node_styles
node_login_handler -->|"uses session and connection"| node_shared_config
node_registration_handler -->|"uses session and connection"| node_shared_config
node_recovery_handler -->|"uses session and connection"| node_shared_config
node_dashboard -->|"uses session and connection"| node_shared_config
node_logout -->|"starts session"| node_shared_config
node_login_handler -->|"reads account and role"| node_mysql
node_login_handler -->|"records access attempts"| node_mysql
node_registration_handler -->|"reads role and inserts user"| node_mysql
node_recovery_handler -->|"reads and updates password"| node_mysql
node_dashboard -->|"reads access history"| node_mysql
node_shared_config -->|"opens PDO connection"| node_mysql
node_schema -->|"defines tables for"| node_mysql
node_dashboard -->|"links to"| node_logout

click node_login_screen "https://github.com/helengarradogarcia/proyectologin_tp3/blob/main/public/index.php"
click node_registration_screen "https://github.com/helengarradogarcia/proyectologin_tp3/blob/main/public/registro.php"
click node_recovery_screen "https://github.com/helengarradogarcia/proyectologin_tp3/blob/main/public/recuperar.php"
click node_dashboard "https://github.com/helengarradogarcia/proyectologin_tp3/blob/main/public/dashboard.php"
click node_browser_behavior "https://github.com/helengarradogarcia/proyectologin_tp3/blob/main/public/js/script.js"
click node_styles "https://github.com/helengarradogarcia/proyectologin_tp3/blob/main/public/css/style.css"
click node_login_handler "https://github.com/helengarradogarcia/proyectologin_tp3/blob/main/src/procesar_login.php"
click node_registration_handler "https://github.com/helengarradogarcia/proyectologin_tp3/blob/main/src/procesar_registro.php"
click node_recovery_handler "https://github.com/helengarradogarcia/proyectologin_tp3/blob/main/src/procesar_recuperar.php"
click node_logout "https://github.com/helengarradogarcia/proyectologin_tp3/blob/main/src/logout.php"
click node_shared_config "https://github.com/helengarradogarcia/proyectologin_tp3/blob/main/src/config.php"
click node_schema "https://github.com/helengarradogarcia/proyectologin_tp3/blob/main/database/database.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_screen,node_registration_screen,node_recovery_screen,node_dashboard,node_browser_behavior,node_styles,node_user toneBlue
class node_login_handler,node_registration_handler,node_recovery_handler,node_logout toneAmber
class node_shared_config toneMint
class node_schema,node_mysql toneRose
```

## Components

### Browser screens

- [Login screen](https://github.com/helengarradogarcia/proyectologin_tp3/blob/main/public/index.php): `public/index.php`
- [Registration screen](https://github.com/helengarradogarcia/proyectologin_tp3/blob/main/public/registro.php): `public/registro.php`
- [Recovery screen](https://github.com/helengarradogarcia/proyectologin_tp3/blob/main/public/recuperar.php): `public/recuperar.php`
- [Dashboard](https://github.com/helengarradogarcia/proyectologin_tp3/blob/main/public/dashboard.php): `public/dashboard.php`
- [Form and theme behavior](https://github.com/helengarradogarcia/proyectologin_tp3/blob/main/public/js/script.js): `public/js/script.js`
- [Responsive styling](https://github.com/helengarradogarcia/proyectologin_tp3/blob/main/public/css/style.css): `public/css/style.css`

### Account workflows

- [Login processing](https://github.com/helengarradogarcia/proyectologin_tp3/blob/main/src/procesar_login.php): `src/procesar_login.php`
- [Registration processing](https://github.com/helengarradogarcia/proyectologin_tp3/blob/main/src/procesar_registro.php): `src/procesar_registro.php`
- [Recovery processing](https://github.com/helengarradogarcia/proyectologin_tp3/blob/main/src/procesar_recuperar.php): `src/procesar_recuperar.php`
- [Session logout](https://github.com/helengarradogarcia/proyectologin_tp3/blob/main/src/logout.php): `src/logout.php`

### Shared services

- [Session and database utilities](https://github.com/helengarradogarcia/proyectologin_tp3/blob/main/src/config.php): `src/config.php`

### Persistence

- [Database schema](https://github.com/helengarradogarcia/proyectologin_tp3/blob/main/database/database.sql): `database/database.sql`
- **MySQL database**

### Other components

- **User**

## Connections

- User → Login screen: opens (evidence: `README.md`)
- User → Registration screen: opens (evidence: `README.md`)
- User → Recovery screen: opens (evidence: `README.md`)
- User → Dashboard: views (evidence: `README.md`)
- Login screen → Login processing: posts credentials (evidence: `public/index.php`)
- Registration screen → Registration processing: posts registration (evidence: `public/registro.php`)
- Recovery screen → Recovery processing: posts email (evidence: `public/recuperar.php`)
- Login screen → Form and theme behavior: loads (evidence: `public/index.php`)
- Dashboard → Form and theme behavior: loads (evidence: `public/dashboard.php`)
- Login screen → Responsive styling: loads (evidence: `public/index.php`)
- Registration screen → Responsive styling: loads (evidence: `public/registro.php`)
- Recovery screen → Responsive styling: loads (evidence: `public/recuperar.php`)
- Dashboard → Responsive styling: loads (evidence: `public/dashboard.php`)
- Login processing → Session and database utilities: uses session and connection (evidence: `src/procesar_login.php`)
- Registration processing → Session and database utilities: uses session and connection (evidence: `src/procesar_registro.php`)
- Recovery processing → Session and database utilities: uses session and connection (evidence: `src/procesar_recuperar.php`)
- Dashboard → Session and database utilities: uses session and connection (evidence: `public/dashboard.php`)
- Session logout → Session and database utilities: starts session (evidence: `src/logout.php`)
- Login processing → MySQL database: reads account and role (evidence: `src/procesar_login.php`)
- Login processing → MySQL database: records access attempts (evidence: `src/procesar_login.php`)
- Registration processing → MySQL database: reads role and inserts user (evidence: `src/procesar_registro.php`)
- Recovery processing → MySQL database: reads and updates password (evidence: `src/procesar_recuperar.php`)
- Dashboard → MySQL database: reads access history (evidence: `public/dashboard.php`)
- Session and database utilities → MySQL database: opens PDO connection (evidence: `src/config.php`)
- Database schema → MySQL database: defines tables for (evidence: `README.md`)
- Dashboard → Session logout: links to (evidence: `public/dashboard.php`)
