# aylenrojas/proyectologin_tp3 architecture

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

## Overview

Proyecto Login is a small PHP/MySQL account-authentication application. Users can register, sign in, reach a session-protected dashboard, and log out; browser-side JavaScript checks login and registration forms before submission. The PHP pages perform the account queries through a shared PDO connection, while the dashboard and logout page manage the authenticated session. The excerpts show these flows and the configured MySQL connection; database.sql is present in the tree, but its schema contents were not sampled.

Main entry points: [`index.php`](https://github.com/aylenrojas/proyectologin_tp3/blob/main/index.php) (Sign-in page), [`registro.php`](https://github.com/aylenrojas/proyectologin_tp3/blob/main/registro.php) (Registration page), [`dashboard.php`](https://github.com/aylenrojas/proyectologin_tp3/blob/main/dashboard.php) (Protected dashboard), [`logout.php`](https://github.com/aylenrojas/proyectologin_tp3/blob/main/logout.php) (Logout handler)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Account entry"]
  node_login["Sign-in page<br/>[index.php]"]
  node_register["Registration page<br/>[registro.php]"]
  node_validation["Form validation<br/>[validaciones.js]"]
end

subgraph group_auth["Authentication"]
  node_connection["PDO connection<br/>[conexion.php]"]
  node_accounts[("Account records<br/>[database.sql]")]
end

subgraph group_session["Session area"]
  node_dashboard["Protected dashboard<br/>[dashboard.php]"]
  node_logout["Logout handler<br/>[logout.php]"]
end

node_user(("User"))

node_user -->|"submits login"| node_login
node_user -->|"submits registration"| node_register
node_login -->|"loads checks"| node_validation
node_register -->|"loads checks"| node_validation
node_login -->|"queries via"| node_connection
node_register -->|"queries via"| node_connection
node_login -->|"reads account"| node_accounts
node_register -->|"checks and inserts"| node_accounts
node_login -->|"redirects on success"| node_dashboard
node_dashboard -->|"redirects if unauthenticated"| node_login
node_dashboard -->|"links to logout"| node_logout
node_logout -->|"redirects after clearing session"| node_login

click node_login "https://github.com/aylenrojas/proyectologin_tp3/blob/main/index.php"
click node_register "https://github.com/aylenrojas/proyectologin_tp3/blob/main/registro.php"
click node_validation "https://github.com/aylenrojas/proyectologin_tp3/blob/main/validaciones.js"
click node_connection "https://github.com/aylenrojas/proyectologin_tp3/blob/main/conexion.php"
click node_accounts "https://github.com/aylenrojas/proyectologin_tp3/blob/main/database.sql"
click node_dashboard "https://github.com/aylenrojas/proyectologin_tp3/blob/main/dashboard.php"
click node_logout "https://github.com/aylenrojas/proyectologin_tp3/blob/main/logout.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_login,node_register,node_validation,node_user toneBlue
class node_connection,node_accounts toneAmber
class node_dashboard,node_logout toneMint
```

## Components

### Account entry

- [Sign-in page](https://github.com/aylenrojas/proyectologin_tp3/blob/main/index.php): `index.php`
- [Registration page](https://github.com/aylenrojas/proyectologin_tp3/blob/main/registro.php): `registro.php`
- [Form validation](https://github.com/aylenrojas/proyectologin_tp3/blob/main/validaciones.js): `validaciones.js`

### Authentication

- [PDO connection](https://github.com/aylenrojas/proyectologin_tp3/blob/main/conexion.php): `conexion.php`
- [Account records](https://github.com/aylenrojas/proyectologin_tp3/blob/main/database.sql): `database.sql`

### Session area

- [Protected dashboard](https://github.com/aylenrojas/proyectologin_tp3/blob/main/dashboard.php): `dashboard.php`
- [Logout handler](https://github.com/aylenrojas/proyectologin_tp3/blob/main/logout.php): `logout.php`

### Other components

- **User**

## Connections

- User → Sign-in page: submits login (evidence: `index.php`)
- User → Registration page: submits registration (evidence: `registro.php`)
- Sign-in page → Form validation: loads checks (evidence: `index.php`)
- Registration page → Form validation: loads checks (evidence: `registro.php`)
- Sign-in page → PDO connection: queries via (evidence: `index.php`)
- Registration page → PDO connection: queries via (evidence: `registro.php`)
- Sign-in page → Account records: reads account (evidence: `index.php`)
- Registration page → Account records: checks and inserts (evidence: `registro.php`)
- Sign-in page → Protected dashboard: redirects on success (evidence: `index.php`)
- Protected dashboard → Sign-in page: redirects if unauthenticated (evidence: `dashboard.php`)
- Protected dashboard → Logout handler: links to logout (evidence: `dashboard.php`)
- Logout handler → Sign-in page: redirects after clearing session (evidence: `logout.php`)
