# thristandeluna/salitaquestbackend architecture

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

- Interactive diagram: https://gitdiagram.com/thristandeluna/salitaquestbackend
- Repository: https://github.com/thristandeluna/salitaquestbackend

## Overview

LavaLust is a lightweight PHP MVC framework. An HTTP request enters through the public front controller, initializes the framework, is matched against configured routes, and invokes a controller action that can render a view or use models and libraries. The graph also preserves documented API, session, validation, and helper capabilities. Several relationships are supported by README descriptions or the SOURCE INDEX rather than sampled implementation; those evidence limits are reflected in the cited paths.

Main entry points: [`app/controllers/Welcome.php`](https://github.com/thristandeluna/salitaquestbackend/blob/main/app/controllers/Welcome.php) (Welcome controller), [`scheme/kernel/Router.php`](https://github.com/thristandeluna/salitaquestbackend/blob/main/scheme/kernel/Router.php) (Route dispatch), [`scheme/kernel/Controller.php`](https://github.com/thristandeluna/salitaquestbackend/blob/main/scheme/kernel/Controller.php) (Controller base), [`scheme/kernel/LavaLust.php`](https://github.com/thristandeluna/salitaquestbackend/blob/main/scheme/kernel/LavaLust.php) (Framework bootstrap)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Request lifecycle"]
  node_front["Front controller<br/>[index.php]"]
  node_bootstrap["Framework bootstrap<br/>[LavaLust.php]"]
  node_routing["Route dispatch<br/>[Router.php]"]
  node_routes["Route definitions<br/>[routes.php]"]
  node_request["Request handling<br/>[Request.php]"]
  node_middleware["Middleware<br/>[Middleware.php]"]
end

subgraph group_mvc["MVC application"]
  node_controller["Controller base<br/>[Controller.php]"]
  node_welcome["Welcome controller<br/>[Welcome.php]"]
  node_views["View templates<br/>[welcome_page.php]"]
end

subgraph group_data["Data access"]
  node_model["ORM-like models<br/>[Model.php]"]
  node_database[("Database and query builder<br/>[Database.php]")]
  node_dbconfig["Database configuration<br/>[database.php]"]
end

subgraph group_services["Framework services"]
  node_api["REST API library<br/>[Api.php]"]
  node_session["Session management<br/>[Session.php]"]
  node_dbsession["Database session handler"]
  node_validation["Form validation"]
  node_helpers["Helpers and libraries"]
end

node_user(("HTTP client"))

node_user -->|"sends request"| node_front
node_front -->|"loads framework"| node_bootstrap
node_bootstrap -->|"initializes router"| node_routing
node_bootstrap -->|"loads routes"| node_routes
node_routes -->|"maps route"| node_welcome
node_routing -->|"dispatches action"| node_welcome
node_routing -->|"uses request data"| node_request
node_routing -->|"applies middleware"| node_middleware
node_welcome -->|"extends"| node_controller
node_welcome -->|"renders view"| node_views
node_controller -->|"loads models"| node_model
node_model -->|"queries database"| node_database
node_dbconfig -->|"configures connection"| node_database
node_welcome -.->|"can return JSON"| node_api
node_session -.->|"uses optional handler"| node_dbsession
node_dbsession -->|"reads and writes"| node_database
node_controller -.->|"uses validation"| node_validation
node_controller -.->|"uses utilities"| node_helpers

click node_front "https://github.com/thristandeluna/salitaquestbackend/blob/main/public/index.php"
click node_bootstrap "https://github.com/thristandeluna/salitaquestbackend/blob/main/scheme/kernel/LavaLust.php"
click node_routing "https://github.com/thristandeluna/salitaquestbackend/blob/main/scheme/kernel/Router.php"
click node_routes "https://github.com/thristandeluna/salitaquestbackend/blob/main/app/config/routes.php"
click node_request "https://github.com/thristandeluna/salitaquestbackend/blob/main/scheme/kernel/Request.php"
click node_middleware "https://github.com/thristandeluna/salitaquestbackend/blob/main/scheme/kernel/Middleware.php"
click node_controller "https://github.com/thristandeluna/salitaquestbackend/blob/main/scheme/kernel/Controller.php"
click node_welcome "https://github.com/thristandeluna/salitaquestbackend/blob/main/app/controllers/Welcome.php"
click node_views "https://github.com/thristandeluna/salitaquestbackend/blob/main/app/views/welcome_page.php"
click node_model "https://github.com/thristandeluna/salitaquestbackend/blob/main/scheme/kernel/Model.php"
click node_database "https://github.com/thristandeluna/salitaquestbackend/blob/main/scheme/database/Database.php"
click node_dbconfig "https://github.com/thristandeluna/salitaquestbackend/blob/main/app/config/database.php"
click node_api "https://github.com/thristandeluna/salitaquestbackend/blob/main/scheme/libraries/Api.php"
click node_session "https://github.com/thristandeluna/salitaquestbackend/blob/main/scheme/libraries/Session.php"
click node_dbsession "https://github.com/thristandeluna/salitaquestbackend/blob/main/scheme/libraries/Session/Database_session_handler.php"
click node_validation "https://github.com/thristandeluna/salitaquestbackend/blob/main/scheme/libraries/Form_validation.php"
click node_helpers "https://github.com/thristandeluna/salitaquestbackend/tree/main/scheme/helpers"

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_front,node_bootstrap,node_routing,node_routes,node_request,node_middleware,node_user toneBlue
class node_controller,node_welcome,node_views toneAmber
class node_model,node_database,node_dbconfig toneMint
class node_api,node_session,node_dbsession,node_validation,node_helpers toneRose
```

## Components

### Request lifecycle

- [Front controller](https://github.com/thristandeluna/salitaquestbackend/blob/main/public/index.php): `public/index.php`
- [Framework bootstrap](https://github.com/thristandeluna/salitaquestbackend/blob/main/scheme/kernel/LavaLust.php): `scheme/kernel/LavaLust.php`
- [Route dispatch](https://github.com/thristandeluna/salitaquestbackend/blob/main/scheme/kernel/Router.php): `scheme/kernel/Router.php`
- [Route definitions](https://github.com/thristandeluna/salitaquestbackend/blob/main/app/config/routes.php): `app/config/routes.php`
- [Request handling](https://github.com/thristandeluna/salitaquestbackend/blob/main/scheme/kernel/Request.php): `scheme/kernel/Request.php`
- [Middleware](https://github.com/thristandeluna/salitaquestbackend/blob/main/scheme/kernel/Middleware.php): `scheme/kernel/Middleware.php`

### MVC application

- [Controller base](https://github.com/thristandeluna/salitaquestbackend/blob/main/scheme/kernel/Controller.php): `scheme/kernel/Controller.php`
- [Welcome controller](https://github.com/thristandeluna/salitaquestbackend/blob/main/app/controllers/Welcome.php): `app/controllers/Welcome.php`
- [View templates](https://github.com/thristandeluna/salitaquestbackend/blob/main/app/views/welcome_page.php): `app/views/welcome_page.php`

### Data access

- [ORM-like models](https://github.com/thristandeluna/salitaquestbackend/blob/main/scheme/kernel/Model.php): `scheme/kernel/Model.php`
- [Database and query builder](https://github.com/thristandeluna/salitaquestbackend/blob/main/scheme/database/Database.php): `scheme/database/Database.php`
- [Database configuration](https://github.com/thristandeluna/salitaquestbackend/blob/main/app/config/database.php): `app/config/database.php`

### Framework services

- [REST API library](https://github.com/thristandeluna/salitaquestbackend/blob/main/scheme/libraries/Api.php): `scheme/libraries/Api.php`
- [Session management](https://github.com/thristandeluna/salitaquestbackend/blob/main/scheme/libraries/Session.php): `scheme/libraries/Session.php`
- [Database session handler](https://github.com/thristandeluna/salitaquestbackend/blob/main/scheme/libraries/Session/Database_session_handler.php): `scheme/libraries/Session/Database_session_handler.php`
- [Form validation](https://github.com/thristandeluna/salitaquestbackend/blob/main/scheme/libraries/Form_validation.php): `scheme/libraries/Form_validation.php`
- [Helpers and libraries](https://github.com/thristandeluna/salitaquestbackend/tree/main/scheme/helpers): `scheme/helpers`

### Other components

- **HTTP client**

## Connections

- HTTP client → Front controller: sends request
- Front controller → Framework bootstrap: loads framework (evidence: `public/index.php`)
- Framework bootstrap → Route dispatch: initializes router (evidence: `scheme/kernel/LavaLust.php`)
- Framework bootstrap → Route definitions: loads routes (evidence: `scheme/kernel/LavaLust.php`)
- Route definitions → Welcome controller: maps route (evidence: `app/config/routes.php`)
- Route dispatch → Welcome controller: dispatches action (evidence: `scheme/kernel/Router.php`)
- Route dispatch → Request handling: uses request data (evidence: `scheme/kernel/Router.php`)
- Route dispatch → Middleware: applies middleware (evidence: `scheme/kernel/Router.php`)
- Welcome controller → Controller base: extends (evidence: `app/controllers/Welcome.php`)
- Welcome controller → View templates: renders view (evidence: `app/controllers/Welcome.php`)
- Controller base → ORM-like models: loads models
- ORM-like models → Database and query builder: queries database
- Database configuration → Database and query builder: configures connection
- Welcome controller → REST API library: can return JSON
- Session management → Database session handler: uses optional handler (evidence: `scheme/libraries/Session/Database_session_handler.php`)
- Database session handler → Database and query builder: reads and writes (evidence: `scheme/libraries/Session/Database_session_handler.php`)
- Controller base → Form validation: uses validation
- Controller base → Helpers and libraries: uses utilities
