# cepiperez/baradur architecture

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

- Interactive diagram: https://gitdiagram.com/cepiperez/baradur
- Repository: https://github.com/cepiperez/baradur

## Overview

Baradur is presented as a small Laravel-based PHP framework. Its apparent web workflow is an incoming request handled by the HTTP kernel, with the route provider loading web and API route files; the home controller returns a rendered view. The tree also shows authentication screens, middleware, user-model and database configuration, and framework service providers. Route definitions and most runtime source were not sampled, so links beyond the shown route loading and controller-to-view behavior are intentionally limited.

Main entry points: [`app/providers/RouteServiceProvider.php`](https://github.com/cepiperez/baradur/blob/master/app/providers/RouteServiceProvider.php) (Route provider), [`public/index.php`](https://github.com/cepiperez/baradur/blob/master/public/index.php) (Front controller), [`app/http/Kernel.php`](https://github.com/cepiperez/baradur/blob/master/app/http/Kernel.php) (HTTP kernel), [`resources/views/index.blade.php`](https://github.com/cepiperez/baradur/blob/master/resources/views/index.blade.php) (Home view)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_http["HTTP runtime"]
  node_front["Front controller<br/>[index.php]"]
  node_httpkernel["HTTP kernel<br/>[Kernel.php]"]
  node_routeservice["Route provider"]
  node_webroutes["Web routes<br/>[web.php]"]
  node_apiroutes["API routes<br/>[api.php]"]
  node_home["Home controller<br/>[HomeController.php]"]
  node_middleware["HTTP middleware"]
  node_exceptions["Exception handling<br/>[Handler.php]"]
end

subgraph group_identity["Identity and access"]
  node_authviews["Auth screens<br/>[login.blade.php]"]
  node_authmiddleware["Auth middleware"]
  node_user["User model<br/>[User.php]"]
  node_authconfig["Auth settings<br/>[auth.php]"]
end

subgraph group_framework["Framework services"]
  node_serviceproviders["Service providers"]
  node_features["Feature flags"]
  node_casters["Custom casters"]
  node_dbconfig["Database settings<br/>[database.php]"]
end

subgraph group_presentation["Presentation"]
  node_indexview["Home view<br/>[index.blade.php]"]
  node_layout["Application layout<br/>[app.blade.php]"]
  node_commonlayout["Common layout<br/>[app.blade.php]"]
  node_locales["Translations<br/>[login.php]"]
end

node_client(("HTTP client"))
node_database[("Database")]

node_client -->|"sends request"| node_front
node_front -->|"hands off"| node_httpkernel
node_httpkernel -->|"boots routing"| node_routeservice
node_routeservice -->|"loads web routes"| node_webroutes
node_routeservice -->|"loads API routes"| node_apiroutes
node_home -->|"returns view"| node_indexview
node_indexview -->|"extends layout"| node_layout
node_layout -->|"translates labels"| node_locales
node_authviews -->|"uses layout"| node_commonlayout
node_dbconfig -.->|"configures connection"| node_database

click node_front "https://github.com/cepiperez/baradur/blob/master/public/index.php"
click node_httpkernel "https://github.com/cepiperez/baradur/blob/master/app/http/Kernel.php"
click node_routeservice "https://github.com/cepiperez/baradur/blob/master/app/providers/RouteServiceProvider.php"
click node_webroutes "https://github.com/cepiperez/baradur/blob/master/routes/web.php"
click node_apiroutes "https://github.com/cepiperez/baradur/blob/master/routes/api.php"
click node_home "https://github.com/cepiperez/baradur/blob/master/app/http/controllers/HomeController.php"
click node_middleware "https://github.com/cepiperez/baradur/blob/master/app/http/middleware/VerifyCsrfToken.php"
click node_exceptions "https://github.com/cepiperez/baradur/blob/master/app/http/exceptions/Handler.php"
click node_authviews "https://github.com/cepiperez/baradur/blob/master/resources/views/auth/login.blade.php"
click node_authmiddleware "https://github.com/cepiperez/baradur/blob/master/app/http/middleware/RedirectIfAuthenticated.php"
click node_user "https://github.com/cepiperez/baradur/blob/master/app/models/User.php"
click node_authconfig "https://github.com/cepiperez/baradur/blob/master/config/auth.php"
click node_serviceproviders "https://github.com/cepiperez/baradur/blob/master/app/providers/AppServiceProvider.php"
click node_features "https://github.com/cepiperez/baradur/blob/master/app/providers/PennantServiceProvider.php"
click node_casters "https://github.com/cepiperez/baradur/blob/master/app/providers/CustomCasterServiceProvider.php"
click node_dbconfig "https://github.com/cepiperez/baradur/blob/master/config/database.php"
click node_indexview "https://github.com/cepiperez/baradur/blob/master/resources/views/index.blade.php"
click node_layout "https://github.com/cepiperez/baradur/blob/master/resources/views/layouts/app.blade.php"
click node_commonlayout "https://github.com/cepiperez/baradur/blob/master/resources/views/common/app.blade.php"
click node_locales "https://github.com/cepiperez/baradur/blob/master/lang/es/login.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_front,node_httpkernel,node_routeservice,node_webroutes,node_apiroutes,node_home,node_middleware,node_exceptions,node_client toneBlue
class node_authviews,node_authmiddleware,node_user,node_authconfig,node_database toneAmber
class node_serviceproviders,node_features,node_casters,node_dbconfig toneMint
class node_indexview,node_layout,node_commonlayout,node_locales toneRose
```

## Components

### HTTP runtime

- [Front controller](https://github.com/cepiperez/baradur/blob/master/public/index.php): `public/index.php`
- [HTTP kernel](https://github.com/cepiperez/baradur/blob/master/app/http/Kernel.php): `app/http/Kernel.php`
- [Route provider](https://github.com/cepiperez/baradur/blob/master/app/providers/RouteServiceProvider.php): `app/providers/RouteServiceProvider.php`
- [Web routes](https://github.com/cepiperez/baradur/blob/master/routes/web.php): `routes/web.php`
- [API routes](https://github.com/cepiperez/baradur/blob/master/routes/api.php): `routes/api.php`
- [Home controller](https://github.com/cepiperez/baradur/blob/master/app/http/controllers/HomeController.php): `app/http/controllers/HomeController.php`
- [HTTP middleware](https://github.com/cepiperez/baradur/blob/master/app/http/middleware/VerifyCsrfToken.php): `app/http/middleware/VerifyCsrfToken.php`
- [Exception handling](https://github.com/cepiperez/baradur/blob/master/app/http/exceptions/Handler.php): `app/http/exceptions/Handler.php`

### Identity and access

- [Auth screens](https://github.com/cepiperez/baradur/blob/master/resources/views/auth/login.blade.php): `resources/views/auth/login.blade.php`
- [Auth middleware](https://github.com/cepiperez/baradur/blob/master/app/http/middleware/RedirectIfAuthenticated.php): `app/http/middleware/RedirectIfAuthenticated.php`
- [User model](https://github.com/cepiperez/baradur/blob/master/app/models/User.php): `app/models/User.php`
- [Auth settings](https://github.com/cepiperez/baradur/blob/master/config/auth.php): `config/auth.php`

### Framework services

- [Service providers](https://github.com/cepiperez/baradur/blob/master/app/providers/AppServiceProvider.php): `app/providers/AppServiceProvider.php`
- [Feature flags](https://github.com/cepiperez/baradur/blob/master/app/providers/PennantServiceProvider.php): `app/providers/PennantServiceProvider.php`
- [Custom casters](https://github.com/cepiperez/baradur/blob/master/app/providers/CustomCasterServiceProvider.php): `app/providers/CustomCasterServiceProvider.php`
- [Database settings](https://github.com/cepiperez/baradur/blob/master/config/database.php): `config/database.php`

### Presentation

- [Home view](https://github.com/cepiperez/baradur/blob/master/resources/views/index.blade.php): `resources/views/index.blade.php`
- [Application layout](https://github.com/cepiperez/baradur/blob/master/resources/views/layouts/app.blade.php): `resources/views/layouts/app.blade.php`
- [Common layout](https://github.com/cepiperez/baradur/blob/master/resources/views/common/app.blade.php): `resources/views/common/app.blade.php`
- [Translations](https://github.com/cepiperez/baradur/blob/master/lang/es/login.php): `lang/es/login.php`

### Other components

- **HTTP client**
- **Database**

## Connections

- HTTP client → Front controller: sends request
- Front controller → HTTP kernel: hands off
- HTTP kernel → Route provider: boots routing
- Route provider → Web routes: loads web routes
- Route provider → API routes: loads API routes
- Home controller → Home view: returns view
- Home view → Application layout: extends layout
- Application layout → Translations: translates labels
- Auth screens → Common layout: uses layout
- Database settings → Database: configures connection
