# jeferson-teixeira-portela/chirper architecture

> Architecture diagram of the GitHub repository jeferson-teixeira-portela/chirper, 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/jeferson-teixeira-portela/chirper
- Repository: https://github.com/jeferson-teixeira-portela/chirper

## Overview

This is a Laravel Chirper web application: visitors register or sign in, then can publish and manage short Chirps and edit or delete their profile. Requests enter through Laravel’s HTTP bootstrap, are routed to controllers, and return Blade views. The graph also preserves the documented-by-routes authentication capabilities, including verification and password reset. Source evidence is strongest for the sampled Chirp, profile, and registration flows; some authentication handlers and view templates are represented at their exact enclosing directories because their implementations were not sampled.

Main entry points: [`routes/web.php`](https://github.com/jeferson-teixeira-portela/chirper/blob/main/routes/web.php) (Web routes), [`app/Http/Controllers/Auth`](https://github.com/jeferson-teixeira-portela/chirper/tree/main/app/Http/Controllers/Auth) (Auth workflows), [`app/Http/Controllers/ChirpController.php`](https://github.com/jeferson-teixeira-portela/chirper/blob/main/app/Http/Controllers/ChirpController.php) (Chirp actions), [`app/Models/User.php`](https://github.com/jeferson-teixeira-portela/chirper/blob/main/app/Models/User.php) (User account model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["HTTP entry"]
  node_front["HTTP front controller<br/>[index.php]"]
  node_bootstrap["App bootstrap<br/>[app.php]"]
  node_httpkernel["HTTP kernel<br/>[Kernel.php]"]
  node_routeprovider["Route registration"]
  node_webroutes["Web routes<br/>[web.php]"]
end

subgraph group_identity["Accounts"]
  node_authroutes["Auth routes<br/>[auth.php]"]
  node_authcontrollers["Auth workflows"]
  node_loginrequest["Login validation<br/>[LoginRequest.php]"]
  node_user["User account model<br/>[User.php]"]
end

subgraph group_chirps["Chirps"]
  node_chirpcontroller["Chirp actions"]
  node_chirpmodel["Chirp model<br/>[Chirp.php]"]
  node_chirppolicy["Chirp authorization<br/>[ChirpPolicy.php]"]
  node_chirpviews["Chirp screens"]
end

subgraph group_profile["Profile"]
  node_profilecontroller["Profile actions"]
  node_profilerequest["Profile validation"]
  node_profileviews["Profile screens"]
end

node_visitor(("Visitor"))

node_visitor -->|"sends request"| node_front
node_front -->|"loads app"| node_bootstrap
node_front -->|"dispatches request"| node_httpkernel
node_bootstrap -->|"binds kernel"| node_httpkernel
node_routeprovider -->|"registers routes"| node_webroutes
node_webroutes -->|"routes requests"| node_chirpcontroller
node_webroutes -->|"routes requests"| node_profilecontroller
node_webroutes -->|"includes routes"| node_authroutes
node_authroutes -->|"dispatches auth"| node_authcontrollers
node_authcontrollers -->|"uses login validation"| node_loginrequest
node_authcontrollers -->|"creates account"| node_user
node_authcontrollers -.->|"authenticates account"| node_user
node_chirpcontroller -->|"reads and writes"| node_chirpmodel
node_chirpcontroller -->|"authorizes actions"| node_chirppolicy
node_chirpcontroller -->|"renders screens"| node_chirpviews
node_chirpmodel -->|"belongs to"| node_user
node_user -->|"has many"| node_chirpmodel
node_profilecontroller -->|"validates updates"| node_profilerequest
node_profilecontroller -->|"renders screens"| node_profileviews

click node_front "https://github.com/jeferson-teixeira-portela/chirper/blob/main/public/index.php"
click node_bootstrap "https://github.com/jeferson-teixeira-portela/chirper/blob/main/bootstrap/app.php"
click node_httpkernel "https://github.com/jeferson-teixeira-portela/chirper/blob/main/app/Http/Kernel.php"
click node_routeprovider "https://github.com/jeferson-teixeira-portela/chirper/blob/main/app/Providers/RouteServiceProvider.php"
click node_webroutes "https://github.com/jeferson-teixeira-portela/chirper/blob/main/routes/web.php"
click node_authroutes "https://github.com/jeferson-teixeira-portela/chirper/blob/main/routes/auth.php"
click node_authcontrollers "https://github.com/jeferson-teixeira-portela/chirper/tree/main/app/Http/Controllers/Auth"
click node_loginrequest "https://github.com/jeferson-teixeira-portela/chirper/blob/main/app/Http/Requests/Auth/LoginRequest.php"
click node_user "https://github.com/jeferson-teixeira-portela/chirper/blob/main/app/Models/User.php"
click node_chirpcontroller "https://github.com/jeferson-teixeira-portela/chirper/blob/main/app/Http/Controllers/ChirpController.php"
click node_chirpmodel "https://github.com/jeferson-teixeira-portela/chirper/blob/main/app/Models/Chirp.php"
click node_chirppolicy "https://github.com/jeferson-teixeira-portela/chirper/blob/main/app/Policies/ChirpPolicy.php"
click node_chirpviews "https://github.com/jeferson-teixeira-portela/chirper/tree/main/resources/views/chirps"
click node_profilecontroller "https://github.com/jeferson-teixeira-portela/chirper/blob/main/app/Http/Controllers/ProfileController.php"
click node_profilerequest "https://github.com/jeferson-teixeira-portela/chirper/blob/main/app/Http/Requests/ProfileUpdateRequest.php"
click node_profileviews "https://github.com/jeferson-teixeira-portela/chirper/tree/main/resources/views/profile"

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_httpkernel,node_routeprovider,node_webroutes toneBlue
class node_authroutes,node_authcontrollers,node_loginrequest,node_user toneAmber
class node_chirpcontroller,node_chirpmodel,node_chirppolicy,node_chirpviews toneMint
class node_profilecontroller,node_profilerequest,node_profileviews toneRose
class node_visitor toneIndigo
```

## Components

### HTTP entry

- [HTTP front controller](https://github.com/jeferson-teixeira-portela/chirper/blob/main/public/index.php): `public/index.php`
- [App bootstrap](https://github.com/jeferson-teixeira-portela/chirper/blob/main/bootstrap/app.php): `bootstrap/app.php`
- [HTTP kernel](https://github.com/jeferson-teixeira-portela/chirper/blob/main/app/Http/Kernel.php): `app/Http/Kernel.php`
- [Route registration](https://github.com/jeferson-teixeira-portela/chirper/blob/main/app/Providers/RouteServiceProvider.php): `app/Providers/RouteServiceProvider.php`
- [Web routes](https://github.com/jeferson-teixeira-portela/chirper/blob/main/routes/web.php): `routes/web.php`

### Accounts

- [Auth routes](https://github.com/jeferson-teixeira-portela/chirper/blob/main/routes/auth.php): `routes/auth.php`
- [Auth workflows](https://github.com/jeferson-teixeira-portela/chirper/tree/main/app/Http/Controllers/Auth): `app/Http/Controllers/Auth`
- [Login validation](https://github.com/jeferson-teixeira-portela/chirper/blob/main/app/Http/Requests/Auth/LoginRequest.php): `app/Http/Requests/Auth/LoginRequest.php`
- [User account model](https://github.com/jeferson-teixeira-portela/chirper/blob/main/app/Models/User.php): `app/Models/User.php`

### Chirps

- [Chirp actions](https://github.com/jeferson-teixeira-portela/chirper/blob/main/app/Http/Controllers/ChirpController.php): `app/Http/Controllers/ChirpController.php`
- [Chirp model](https://github.com/jeferson-teixeira-portela/chirper/blob/main/app/Models/Chirp.php): `app/Models/Chirp.php`
- [Chirp authorization](https://github.com/jeferson-teixeira-portela/chirper/blob/main/app/Policies/ChirpPolicy.php): `app/Policies/ChirpPolicy.php`
- [Chirp screens](https://github.com/jeferson-teixeira-portela/chirper/tree/main/resources/views/chirps): `resources/views/chirps`

### Profile

- [Profile actions](https://github.com/jeferson-teixeira-portela/chirper/blob/main/app/Http/Controllers/ProfileController.php): `app/Http/Controllers/ProfileController.php`
- [Profile validation](https://github.com/jeferson-teixeira-portela/chirper/blob/main/app/Http/Requests/ProfileUpdateRequest.php): `app/Http/Requests/ProfileUpdateRequest.php`
- [Profile screens](https://github.com/jeferson-teixeira-portela/chirper/tree/main/resources/views/profile): `resources/views/profile`

### Other components

- **Visitor**

## Connections

- Visitor → HTTP front controller: sends request
- HTTP front controller → App bootstrap: loads app (evidence: `public/index.php`)
- HTTP front controller → HTTP kernel: dispatches request (evidence: `public/index.php`)
- App bootstrap → HTTP kernel: binds kernel (evidence: `bootstrap/app.php`)
- Route registration → Web routes: registers routes (evidence: `app/Providers/RouteServiceProvider.php`)
- Web routes → Chirp actions: routes requests (evidence: `routes/web.php`)
- Web routes → Profile actions: routes requests (evidence: `routes/web.php`)
- Web routes → Auth routes: includes routes (evidence: `routes/web.php`)
- Auth routes → Auth workflows: dispatches auth (evidence: `routes/auth.php`)
- Auth workflows → Login validation: uses login validation (evidence: `app/Http/Controllers/Auth/AuthenticatedSessionController.php`)
- Auth workflows → User account model: creates account (evidence: `app/Http/Controllers/Auth/RegisteredUserController.php`)
- Auth workflows → User account model: authenticates account (evidence: `app/Http/Controllers/Auth/RegisteredUserController.php`)
- Chirp actions → Chirp model: reads and writes (evidence: `app/Http/Controllers/ChirpController.php`)
- Chirp actions → Chirp authorization: authorizes actions (evidence: `app/Http/Controllers/ChirpController.php`)
- Chirp actions → Chirp screens: renders screens (evidence: `app/Http/Controllers/ChirpController.php`)
- Chirp model → User account model: belongs to (evidence: `app/Models/Chirp.php`)
- User account model → Chirp model: has many (evidence: `app/Models/User.php`)
- Profile actions → Profile validation: validates updates (evidence: `app/Http/Controllers/ProfileController.php`)
- Profile actions → Profile screens: renders screens (evidence: `app/Http/Controllers/ProfileController.php`)
