# mtnoe/labaccess architecture

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

- Interactive diagram: https://gitdiagram.com/mtnoe/labaccess
- Repository: https://github.com/mtnoe/labaccess

## Overview

LabAccess is a web application for managing laboratory-use records in an academic setting. The documented workflow is that staff maintain periods, careers, laboratories, and subjects, while a logged-in teacher records lab use using their account, career-related subjects, and an open period; administrators can also register teachers, and the system provides reports. The excerpts show session-checked navigation and portions of user and administration handling. Several domain modules and screens are unsampled, so their documented capabilities are retained, but their internal call paths are not asserted.

Main entry points: [`controller/AdmonController.php`](https://github.com/mtnoe/labaccess/blob/main/controller/AdmonController.php) (Admin handling), [`controller/RegistroLabController.php`](https://github.com/mtnoe/labaccess/blob/main/controller/RegistroLabController.php) (Lab-use screens), [`login.php`](https://github.com/mtnoe/labaccess/blob/main/login.php) (Login and signup), [`controller/usuarioController.php`](https://github.com/mtnoe/labaccess/blob/main/controller/usuarioController.php) (User handling)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_index["Session navigation<br/>[index.php]"]
  node_login["Login and signup<br/>[login.php]"]
  node_menus["Role menus<br/>[menu1.php]"]
  node_userctl["User handling"]
end

subgraph group_domain["Academic administration"]
  node_admon["Admin handling"]
  node_periods["Period management<br/>[periodos.php]"]
  node_subjects["Subject management<br/>[materias.php]"]
  node_careers["Career management<br/>[carrera.php]"]
  node_campuses["Campus management<br/>[plantel.php]"]
  node_labs["Laboratory management<br/>[aulas.php]"]
  node_teachers["Teacher records<br/>[Docente.php]"]
end

subgraph group_usage["Lab use"]
  node_labui["Lab-use screens"]
  node_general["General requests"]
  node_log["Lab-use records<br/>[bitacoraLab.php]"]
  node_reportsctl["Report handling"]
end

subgraph group_services["Persistence and reporting"]
  node_userdetails["User details<br/>[DatosUsuario.php]"]
  node_reports["Report queries<br/>[reportes.php]"]
  node_dbconfig["Database connection<br/>[ConfigBD.php]"]
  node_db[("MySQL database")]
  node_mailer["Email delivery"]
  node_pdf["PDF generation"]
  node_spreadsheet["Spreadsheet tools<br/>[Content.php]"]
end

node_visitor(("User"))

node_visitor -.->|"signs in"| node_login
node_visitor -.->|"opens system"| node_index
node_login -.->|"registers teacher"| node_userctl
node_index -->|"includes menu"| node_menus
node_userctl -->|"includes config"| node_dbconfig
node_userctl -->|"loads user details"| node_userdetails
node_admon -->|"calls period model"| node_periods
node_admon -->|"calls subject model"| node_subjects
node_dbconfig -->|"opens connection"| node_db
node_admon -.->|"manages careers"| node_careers
node_admon -.->|"relates careers"| node_campuses
node_admon -.->|"filters by campus"| node_labs
node_labui -.->|"records lab use"| node_log
node_labui -.->|"selects open period"| node_periods
node_labui -.->|"filters by career"| node_subjects
node_labui -.->|"uses teacher account"| node_teachers
node_reportsctl -.->|"runs reports"| node_reports
node_reports -.->|"formats reports"| node_pdf
node_reports -.->|"uses report data"| node_spreadsheet
node_login -.->|"emails credentials"| node_mailer

click node_index "https://github.com/mtnoe/labaccess/blob/main/index.php"
click node_login "https://github.com/mtnoe/labaccess/blob/main/login.php"
click node_menus "https://github.com/mtnoe/labaccess/blob/main/menu1.php"
click node_userctl "https://github.com/mtnoe/labaccess/blob/main/controller/usuarioController.php"
click node_userdetails "https://github.com/mtnoe/labaccess/blob/main/model/DatosUsuario.php"
click node_admon "https://github.com/mtnoe/labaccess/blob/main/controller/AdmonController.php"
click node_periods "https://github.com/mtnoe/labaccess/blob/main/model/periodos.php"
click node_subjects "https://github.com/mtnoe/labaccess/blob/main/model/materias.php"
click node_careers "https://github.com/mtnoe/labaccess/blob/main/model/carrera.php"
click node_campuses "https://github.com/mtnoe/labaccess/blob/main/model/plantel.php"
click node_labs "https://github.com/mtnoe/labaccess/blob/main/model/aulas.php"
click node_teachers "https://github.com/mtnoe/labaccess/blob/main/model/Docente.php"
click node_labui "https://github.com/mtnoe/labaccess/blob/main/controller/RegistroLabController.php"
click node_general "https://github.com/mtnoe/labaccess/blob/main/controller/GeneralController.php"
click node_log "https://github.com/mtnoe/labaccess/blob/main/model/bitacoraLab.php"
click node_reportsctl "https://github.com/mtnoe/labaccess/blob/main/controller/ReporteController.php"
click node_reports "https://github.com/mtnoe/labaccess/blob/main/model/reportes.php"
click node_dbconfig "https://github.com/mtnoe/labaccess/blob/main/config/ConfigBD.php"
click node_mailer "https://github.com/mtnoe/labaccess/blob/main/resources/PHPMailer-master/class.phpmailer.php"
click node_pdf "https://github.com/mtnoe/labaccess/tree/main/resources/mpdf"
click node_spreadsheet "https://github.com/mtnoe/labaccess/blob/main/resources/phpexcel/PHPExcel/Writer/OpenDocument/Content.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_index,node_login,node_menus,node_userctl,node_visitor toneBlue
class node_admon,node_periods,node_subjects,node_careers,node_campuses,node_labs,node_teachers toneAmber
class node_labui,node_general,node_log,node_reportsctl toneMint
class node_userdetails,node_reports,node_dbconfig,node_db,node_mailer,node_pdf,node_spreadsheet toneRose
```

## Components

### Web interface

- [Session navigation](https://github.com/mtnoe/labaccess/blob/main/index.php): `index.php`
- [Login and signup](https://github.com/mtnoe/labaccess/blob/main/login.php): `login.php`
- [Role menus](https://github.com/mtnoe/labaccess/blob/main/menu1.php): `menu1.php`
- [User handling](https://github.com/mtnoe/labaccess/blob/main/controller/usuarioController.php): `controller/usuarioController.php`

### Academic administration

- [Admin handling](https://github.com/mtnoe/labaccess/blob/main/controller/AdmonController.php): `controller/AdmonController.php`
- [Period management](https://github.com/mtnoe/labaccess/blob/main/model/periodos.php): `model/periodos.php`
- [Subject management](https://github.com/mtnoe/labaccess/blob/main/model/materias.php): `model/materias.php`
- [Career management](https://github.com/mtnoe/labaccess/blob/main/model/carrera.php): `model/carrera.php`
- [Campus management](https://github.com/mtnoe/labaccess/blob/main/model/plantel.php): `model/plantel.php`
- [Laboratory management](https://github.com/mtnoe/labaccess/blob/main/model/aulas.php): `model/aulas.php`
- [Teacher records](https://github.com/mtnoe/labaccess/blob/main/model/Docente.php): `model/Docente.php`

### Lab use

- [Lab-use screens](https://github.com/mtnoe/labaccess/blob/main/controller/RegistroLabController.php): `controller/RegistroLabController.php`
- [General requests](https://github.com/mtnoe/labaccess/blob/main/controller/GeneralController.php): `controller/GeneralController.php`
- [Lab-use records](https://github.com/mtnoe/labaccess/blob/main/model/bitacoraLab.php): `model/bitacoraLab.php`
- [Report handling](https://github.com/mtnoe/labaccess/blob/main/controller/ReporteController.php): `controller/ReporteController.php`

### Persistence and reporting

- [User details](https://github.com/mtnoe/labaccess/blob/main/model/DatosUsuario.php): `model/DatosUsuario.php`
- [Report queries](https://github.com/mtnoe/labaccess/blob/main/model/reportes.php): `model/reportes.php`
- [Database connection](https://github.com/mtnoe/labaccess/blob/main/config/ConfigBD.php): `config/ConfigBD.php`
- **MySQL database**
- [Email delivery](https://github.com/mtnoe/labaccess/blob/main/resources/PHPMailer-master/class.phpmailer.php): `resources/PHPMailer-master/class.phpmailer.php`
- [PDF generation](https://github.com/mtnoe/labaccess/tree/main/resources/mpdf): `resources/mpdf`
- [Spreadsheet tools](https://github.com/mtnoe/labaccess/blob/main/resources/phpexcel/PHPExcel/Writer/OpenDocument/Content.php): `resources/phpexcel/PHPExcel/Writer/OpenDocument/Content.php`

### Other components

- **User**

## Connections

- User → Login and signup: signs in
- User → Session navigation: opens system (evidence: `index.php`)
- Login and signup → User handling: registers teacher
- Session navigation → Role menus: includes menu (evidence: `index.php`)
- User handling → Database connection: includes config (evidence: `controller/usuarioController.php`)
- User handling → User details: loads user details (evidence: `controller/usuarioController.php`)
- Admin handling → Period management: calls period model (evidence: `controller/AdmonController.php`)
- Admin handling → Subject management: calls subject model (evidence: `controller/AdmonController.php`)
- Database connection → MySQL database: opens connection (evidence: `config/ConfigBD.php`)
- Admin handling → Career management: manages careers
- Admin handling → Campus management: relates careers
- Admin handling → Laboratory management: filters by campus
- Lab-use screens → Lab-use records: records lab use
- Lab-use screens → Period management: selects open period
- Lab-use screens → Subject management: filters by career
- Lab-use screens → Teacher records: uses teacher account
- Report handling → Report queries: runs reports
- Report queries → PDF generation: formats reports
- Report queries → Spreadsheet tools: uses report data
- Login and signup → Email delivery: emails credentials
