# dwisusanto29/blog-be architecture

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

- Interactive diagram: https://gitdiagram.com/dwisusanto29/blog-be
- Repository: https://github.com/dwisusanto29/blog-be

## Overview

This is a Lumen-based PHP web application starter with custom registration, login, and a protected user endpoint. The visible authentication flow is implemented in controllers and a user model; the routes file exists, but its contents were not sampled, so routing from the entry point to specific controllers is not asserted. The README describes broader Lumen capabilities, but this tree does not establish application workflows for queues or caching.

Main entry points: [`bootstrap/app.php`](https://github.com/dwisusanto29/blog-be/blob/master/bootstrap/app.php) (App bootstrap), [`app/User.php`](https://github.com/dwisusanto29/blog-be/blob/master/app/User.php) (User model), [`public/index.php`](https://github.com/dwisusanto29/blog-be/blob/master/public/index.php) (Public entry), [`app/Http/Controllers/AuthController.php`](https://github.com/dwisusanto29/blog-be/blob/master/app/Http/Controllers/AuthController.php) (Auth controller)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["HTTP entry"]
  node_front["Public entry<br/>[index.php]"]
  node_routes["Route definitions<br/>[web.php]"]
end

subgraph group_auth["Authentication"]
  node_auth_controller["Auth controller<br/>[AuthController.php]"]
  node_auth_provider["Auth provider"]
  node_user_model["User model<br/>[User.php]"]
end

subgraph group_users["User access"]
  node_user_controller["User controller<br/>[UserController.php]"]
  node_login_middleware["Login middleware"]
end

subgraph group_runtime["Application runtime"]
  node_bootstrap["App bootstrap<br/>[app.php]"]
  node_lumen["Lumen runtime"]
end

node_client(("HTTP client"))
node_database[("Relational database")]

node_client -->|"sends request"| node_front
node_front -->|"loads app"| node_bootstrap
node_bootstrap -->|"creates runtime"| node_lumen
node_bootstrap -->|"loads routes"| node_routes
node_auth_provider -->|"looks up user"| node_user_model
node_auth_controller -->|"creates, reads, updates"| node_user_model
node_user_model -->|"persists users"| node_database

click node_front "https://github.com/dwisusanto29/blog-be/blob/master/public/index.php"
click node_bootstrap "https://github.com/dwisusanto29/blog-be/blob/master/bootstrap/app.php"
click node_routes "https://github.com/dwisusanto29/blog-be/blob/master/routes/web.php"
click node_auth_controller "https://github.com/dwisusanto29/blog-be/blob/master/app/Http/Controllers/AuthController.php"
click node_user_controller "https://github.com/dwisusanto29/blog-be/blob/master/app/Http/Controllers/UserController.php"
click node_login_middleware "https://github.com/dwisusanto29/blog-be/blob/master/app/Http/Middleware/LoginMiddleware.php"
click node_auth_provider "https://github.com/dwisusanto29/blog-be/blob/master/app/Providers/AuthServiceProvider.php"
click node_user_model "https://github.com/dwisusanto29/blog-be/blob/master/app/User.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_routes,node_client toneBlue
class node_auth_controller,node_auth_provider,node_user_model,node_database toneAmber
class node_user_controller,node_login_middleware toneMint
class node_bootstrap,node_lumen toneRose
```

## Components

### HTTP entry

- [Public entry](https://github.com/dwisusanto29/blog-be/blob/master/public/index.php): `public/index.php`
- [Route definitions](https://github.com/dwisusanto29/blog-be/blob/master/routes/web.php): `routes/web.php`

### Authentication

- [Auth controller](https://github.com/dwisusanto29/blog-be/blob/master/app/Http/Controllers/AuthController.php): `app/Http/Controllers/AuthController.php`
- [Auth provider](https://github.com/dwisusanto29/blog-be/blob/master/app/Providers/AuthServiceProvider.php): `app/Providers/AuthServiceProvider.php`
- [User model](https://github.com/dwisusanto29/blog-be/blob/master/app/User.php): `app/User.php`

### User access

- [User controller](https://github.com/dwisusanto29/blog-be/blob/master/app/Http/Controllers/UserController.php): `app/Http/Controllers/UserController.php`
- [Login middleware](https://github.com/dwisusanto29/blog-be/blob/master/app/Http/Middleware/LoginMiddleware.php): `app/Http/Middleware/LoginMiddleware.php`

### Application runtime

- [App bootstrap](https://github.com/dwisusanto29/blog-be/blob/master/bootstrap/app.php): `bootstrap/app.php`
- **Lumen runtime**

### Other components

- **HTTP client**
- **Relational database**

## Connections

- HTTP client → Public entry: sends request
- Public entry → App bootstrap: loads app
- App bootstrap → Lumen runtime: creates runtime
- App bootstrap → Route definitions: loads routes
- Auth provider → User model: looks up user
- Auth controller → User model: creates, reads, updates
- User model → Relational database: persists users
