# eduardodavilaz/proyecto_jesuitas-viajeros architecture

> Architecture diagram of the GitHub repository eduardodavilaz/proyecto_jesuitas-viajeros, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-03-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/eduardodavilaz/proyecto_jesuitas-viajeros
- Repository: https://github.com/eduardodavilaz/proyecto_jesuitas-viajeros

## Overview

##### Project Type and Purpose
- This is a web-based application that provides a registration and login system for “Jesuitas viajeros” (Jesuit travelers). It is oriented toward handling user logins, registrations, and visit records in two languages (Spanish and English).
- The README points out the production environment links for registration and login, and even provides a test user. The system seems to target visitors logging their or guided tour visits.

##### File Structure
- The top-level “app” directory holds all the application logic:
- The “bd” folder contains PHP files for database connectivity (conectarbd.php and configdb.php), which serve as the connection layer to the underlying database.
- The “estilo” folder holds CSS files (jesuitas.css, registro.css, visita.css) that style the user-facing pages.
- Two separate directories for multi-language support: “jesuitas_ENG” for English and “jesuitas_ES” for Spanish. Each language-specific folder includes similar functionalities:
∙ A login/portal page (jesuits.html or jesuitas.html),
∙ PHP scripts for validating users and logging visits (validarUsuario.php and visita.php),
∙ A script for saving visit data (guardarVisita.php).
- “jesuitas_registro” handles the registration part of the application, with a registration form (registro.html) and a supporting PHP script to process registrations (introducirJesuita.php).
- The “sql” folder includes a SQL script (jesuitas.sql) likely used to set up the database structure.

##### Examining the README for Additional Insights
- The README gives quick access production URLs for registration and login, confirming a clear separation of functionalities for managing user sessions in two languages.
- It provides necessary user details for testing, implying an expected complete HTTP request cycle that interacts with a database for user management and visit logging.

- “User Browser”
- “Frontend HTML/CSS (jesuitas_ES, jesuitas_ENG, jesuitas_registro)”
- “Application Logic (PHP Scripts: validarUsuario.php, guardarVisita.php, introducirJesuita.php)”
- “Database Connector (PHP scripts in app/bd)”
- “Database (jesuitas.sql schema)”
- From the User Browser to the frontend components.
- From the frontend to the application logic layers (show distinct paths for login and registration).
- From the application logic to the database connector and further to the database.
- For example, rounded rectangles for user-facing components,

## Diagram (Mermaid)

```mermaid
flowchart TD
    U["User Browser"]:::client

    subgraph "Frontend Layer"
        direction TB
        subgraph "HTML Pages"
            direction TB
            E_HTML["English Login (jesuits.html)"]:::frontend
            S_HTML["Spanish Login (jesuitas.html)"]:::frontend
            R_HTML["Registration (registro.html)"]:::frontend
        end
        subgraph "CSS Styling"
            direction TB
            CSS1["CSS (jesuitas.css)"]:::css
            CSS2["CSS (registro.css)"]:::css
            CSS3["CSS (visita.css)"]:::css
        end
    end

    subgraph "Application Logic (PHP Scripts)"
        direction TB
        subgraph "English Flow"
            direction TB
            E_vu["Login Validator (validarUsuario.php)"]:::php
            E_vis["Visit Logger (visita.php)"]:::php
            E_gv["Visit Saver (guardarVisita.php)"]:::php
        end
        subgraph "Spanish Flow"
            direction TB
            S_vu["Login Validator (validarUsuario.php)"]:::php
            S_vis["Visit Logger (visita.php)"]:::php
            S_gv["Visit Saver (guardarVisita.php)"]:::php
        end
        subgraph "Registration Flow"
            direction TB
            R_int["Registration Processor (introducirJesuita.php)"]:::php
        end
    end

    subgraph "Database Access Layer"
        direction TB
        DB_con["DB Connector (conectarbd.php)"]:::db_access
        DB_cfg["DB Config (configdb.php)"]:::db_access
    end

    DB["Database Schema (jesuitas.sql)"]:::database

    %% Interactions between layers
    U -->|"requests"| E_HTML
    U -->|"requests"| S_HTML
    U -->|"requests"| R_HTML

    %% Frontend pages styled by CSS
    E_HTML ---|"styledBy"| CSS1
    S_HTML ---|"styledBy"| CSS1
    R_HTML ---|"styledBy"| CSS2
    S_HTML ---|"styledBy"| CSS3

    %% HTML pages submit data to PHP scripts
    E_HTML -->|"submits"| E_vu
    S_HTML -->|"submits"| S_vu
    R_HTML -->|"submits"| R_int

    %% Internal PHP flow within language-specific processing
    E_vu -->|"triggers"| E_vis
    E_vis -->|"triggers"| E_gv
    S_vu -->|"triggers"| S_vis
    S_vis -->|"triggers"| S_gv

    %% PHP scripts call the Database Access Layer
    E_vu -->|"calls"| DB_con
    S_vu -->|"calls"| DB_con
    R_int -->|"calls"| DB_con

    %% Database connection chain
    DB_con -->|"configures"| DB_cfg
    DB_cfg -->|"queries"| DB

    %% Click Events for Frontend Files
    click E_HTML "https://github.com/eduardodavilaz/proyecto_jesuitas-viajeros/blob/main/app/jesuitas_ENG/jesuits.html"
    click S_HTML "https://github.com/eduardodavilaz/proyecto_jesuitas-viajeros/blob/main/app/jesuitas_ES/jesuitas.html"
    click R_HTML "https://github.com/eduardodavilaz/proyecto_jesuitas-viajeros/blob/main/app/jesuitas_registro/registro.html"
    click CSS1 "https://github.com/eduardodavilaz/proyecto_jesuitas-viajeros/blob/main/app/estilo/jesuitas.css"
    click CSS2 "https://github.com/eduardodavilaz/proyecto_jesuitas-viajeros/blob/main/app/estilo/registro.css"
    click CSS3 "https://github.com/eduardodavilaz/proyecto_jesuitas-viajeros/blob/main/app/estilo/visita.css"

    %% Click Events for Application Logic PHP Scripts (English)
    click E_vu "https://github.com/eduardodavilaz/proyecto_jesuitas-viajeros/blob/main/app/jesuitas_ENG/validarUsuario.php"
    click E_vis "https://github.com/eduardodavilaz/proyecto_jesuitas-viajeros/blob/main/app/jesuitas_ENG/visita.php"
    click E_gv "https://github.com/eduardodavilaz/proyecto_jesuitas-viajeros/blob/main/app/jesuitas_ENG/guardarVisita.php"

    %% Click Events for Application Logic PHP Scripts (Spanish)
    click S_vu "https://github.com/eduardodavilaz/proyecto_jesuitas-viajeros/blob/main/app/jesuitas_ES/validarUsuario.php"
    click S_vis "https://github.com/eduardodavilaz/proyecto_jesuitas-viajeros/blob/main/app/jesuitas_ES/visita.php"
    click S_gv "https://github.com/eduardodavilaz/proyecto_jesuitas-viajeros/blob/main/app/jesuitas_ES/guardarVisita.php"

    %% Click Event for Registration PHP Script
    click R_int "https://github.com/eduardodavilaz/proyecto_jesuitas-viajeros/blob/main/app/jesuitas_registro/introducirJesuita.php"

    %% Click Events for Database Access Layer
    click DB_con "https://github.com/eduardodavilaz/proyecto_jesuitas-viajeros/blob/main/app/bd/conectarbd.php"
    click DB_cfg "https://github.com/eduardodavilaz/proyecto_jesuitas-viajeros/blob/main/app/bd/configdb.php"

    %% Click Event for Database Schema
    click DB "https://github.com/eduardodavilaz/proyecto_jesuitas-viajeros/blob/main/app/sql/jesuitas.sql"

    %% Styles
    classDef client fill:#cce5ff,stroke:#004085,stroke-width:2px;
    classDef frontend fill:#d4edda,stroke:#155724,stroke-width:2px;
    classDef css fill:#fff3cd,stroke:#856404,stroke-width:2px;
    classDef php fill:#f8d7da,stroke:#721c24,stroke-width:2px;
    classDef db_access fill:#d1ecf1,stroke:#0c5460,stroke-width:2px;
    classDef database fill:#e2e3e5,stroke:#6c757d,stroke-width:2px;
```
