# adhanchan/e-letter architecture

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

- Interactive diagram: https://gitdiagram.com/adhanchan/e-letter
- Repository: https://github.com/adhanchan/e-letter

## Overview

This Laravel application manages user accounts and incoming/outgoing correspondence. Users enter through web routes, authenticate or register, then use dashboard workflows to browse, search, create, update, download, and delete surat records; administrators also manage user accounts. The graph preserves those domain stages and the authentication and HTTP-routing layers. Some controller excerpts are partial, so unsampled view and storage relationships are omitted rather than inferred.

Main entry points: [`routes/web.php`](https://github.com/adhanchan/e-letter/blob/main/routes/web.php) (Web routes), [`app/Models/User.php`](https://github.com/adhanchan/e-letter/blob/main/app/Models/User.php) (User model), [`app/Http/Controllers/SuratController.php`](https://github.com/adhanchan/e-letter/blob/main/app/Http/Controllers/SuratController.php) (Correspondence workflows), [`app/Http/Controllers/DashboardController.php`](https://github.com/adhanchan/e-letter/blob/main/app/Http/Controllers/DashboardController.php) (Dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_http["HTTP routing"]
  node_entry["HTTP entry<br/>[index.php]"]
  node_bootstrap["App bootstrap<br/>[app.php]"]
  node_kernel["HTTP kernel<br/>[Kernel.php]"]
  node_routeprovider["Route provider"]
  node_routes["Web routes<br/>[web.php]"]
end

subgraph group_identity["Identity and access"]
  node_authcontroller["Authentication<br/>[AuthController.php]"]
  node_register["Registration"]
  node_fortify["Fortify actions"]
  node_createuser["Create user action<br/>[CreateNewUser.php]"]
  node_profileaction["Profile update action"]
  node_user["User model<br/>[User.php]"]
end

subgraph group_records["Correspondence"]
  node_dashboard["Dashboard"]
  node_suratcontroller["Correspondence workflows"]
  node_surat["Surat model<br/>[Surat.php]"]
  node_incomingview["Incoming surat view"]
  node_outgoingview["Outgoing surat view"]
end

subgraph group_accounts["Account administration"]
  node_akun["Profile management<br/>[AkunController.php]"]
  node_users["User administration<br/>[UserController.php]"]
  node_accountviews["Account views<br/>[index.blade.php]"]
  node_profileview["Profile view<br/>[showakun.blade.php]"]
end

node_visitor(("Visitor"))

node_visitor -->|"sends request"| node_entry
node_entry -->|"loads app"| node_bootstrap
node_bootstrap -->|"binds kernel"| node_kernel
node_routeprovider -->|"loads routes"| node_routes
node_routes -->|"routes requests"| node_authcontroller
node_routes -->|"routes requests"| node_register
node_routes -->|"routes requests"| node_dashboard
node_routes -->|"routes requests"| node_suratcontroller
node_routes -->|"routes requests"| node_akun
node_routes -->|"routes requests"| node_users
node_fortify -->|"registers action"| node_createuser
node_fortify -->|"registers action"| node_profileaction
node_createuser -->|"creates"| node_user
node_profileaction -->|"updates"| node_user
node_authcontroller -->|"authenticates"| node_user
node_register -->|"creates"| node_user
node_dashboard -->|"queries"| node_user
node_dashboard -->|"queries"| node_surat
node_suratcontroller -->|"manages records"| node_surat
node_users -->|"manages accounts"| node_user
node_akun -->|"updates profile"| node_user
node_users -->|"renders list"| node_accountviews
node_akun -->|"renders profile"| node_profileview
node_suratcontroller -->|"renders results"| node_incomingview
node_suratcontroller -->|"renders results"| node_outgoingview

click node_entry "https://github.com/adhanchan/e-letter/blob/main/public/index.php"
click node_bootstrap "https://github.com/adhanchan/e-letter/blob/main/bootstrap/app.php"
click node_kernel "https://github.com/adhanchan/e-letter/blob/main/app/Http/Kernel.php"
click node_routeprovider "https://github.com/adhanchan/e-letter/blob/main/app/Providers/RouteServiceProvider.php"
click node_routes "https://github.com/adhanchan/e-letter/blob/main/routes/web.php"
click node_authcontroller "https://github.com/adhanchan/e-letter/blob/main/app/Http/Controllers/AuthController.php"
click node_register "https://github.com/adhanchan/e-letter/blob/main/app/Http/Controllers/RegisterController.php"
click node_fortify "https://github.com/adhanchan/e-letter/blob/main/app/Providers/FortifyServiceProvider.php"
click node_createuser "https://github.com/adhanchan/e-letter/blob/main/app/Actions/Fortify/CreateNewUser.php"
click node_profileaction "https://github.com/adhanchan/e-letter/blob/main/app/Actions/Fortify/UpdateUserProfileInformation.php"
click node_user "https://github.com/adhanchan/e-letter/blob/main/app/Models/User.php"
click node_dashboard "https://github.com/adhanchan/e-letter/blob/main/app/Http/Controllers/DashboardController.php"
click node_suratcontroller "https://github.com/adhanchan/e-letter/blob/main/app/Http/Controllers/SuratController.php"
click node_surat "https://github.com/adhanchan/e-letter/blob/main/app/Models/Surat.php"
click node_akun "https://github.com/adhanchan/e-letter/blob/main/app/Http/Controllers/AkunController.php"
click node_users "https://github.com/adhanchan/e-letter/blob/main/app/Http/Controllers/UserController.php"
click node_accountviews "https://github.com/adhanchan/e-letter/blob/main/resources/views/dashboard/pengguna/index.blade.php"
click node_profileview "https://github.com/adhanchan/e-letter/blob/main/resources/views/dashboard/user/showakun.blade.php"
click node_incomingview "https://github.com/adhanchan/e-letter/blob/main/resources/views/dashboard/user/suratmasuk.blade.php"
click node_outgoingview "https://github.com/adhanchan/e-letter/blob/main/resources/views/dashboard/user/suratkeluar.blade.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_entry,node_bootstrap,node_kernel,node_routeprovider,node_routes toneBlue
class node_authcontroller,node_register,node_fortify,node_createuser,node_profileaction,node_user toneAmber
class node_dashboard,node_suratcontroller,node_surat,node_incomingview,node_outgoingview toneMint
class node_akun,node_users,node_accountviews,node_profileview toneRose
class node_visitor toneIndigo
```

## Components

### HTTP routing

- [HTTP entry](https://github.com/adhanchan/e-letter/blob/main/public/index.php): `public/index.php`
- [App bootstrap](https://github.com/adhanchan/e-letter/blob/main/bootstrap/app.php): `bootstrap/app.php`
- [HTTP kernel](https://github.com/adhanchan/e-letter/blob/main/app/Http/Kernel.php): `app/Http/Kernel.php`
- [Route provider](https://github.com/adhanchan/e-letter/blob/main/app/Providers/RouteServiceProvider.php): `app/Providers/RouteServiceProvider.php`
- [Web routes](https://github.com/adhanchan/e-letter/blob/main/routes/web.php): `routes/web.php`

### Identity and access

- [Authentication](https://github.com/adhanchan/e-letter/blob/main/app/Http/Controllers/AuthController.php): `app/Http/Controllers/AuthController.php`
- [Registration](https://github.com/adhanchan/e-letter/blob/main/app/Http/Controllers/RegisterController.php): `app/Http/Controllers/RegisterController.php`
- [Fortify actions](https://github.com/adhanchan/e-letter/blob/main/app/Providers/FortifyServiceProvider.php): `app/Providers/FortifyServiceProvider.php`
- [Create user action](https://github.com/adhanchan/e-letter/blob/main/app/Actions/Fortify/CreateNewUser.php): `app/Actions/Fortify/CreateNewUser.php`
- [Profile update action](https://github.com/adhanchan/e-letter/blob/main/app/Actions/Fortify/UpdateUserProfileInformation.php): `app/Actions/Fortify/UpdateUserProfileInformation.php`
- [User model](https://github.com/adhanchan/e-letter/blob/main/app/Models/User.php): `app/Models/User.php`

### Correspondence

- [Dashboard](https://github.com/adhanchan/e-letter/blob/main/app/Http/Controllers/DashboardController.php): `app/Http/Controllers/DashboardController.php`
- [Correspondence workflows](https://github.com/adhanchan/e-letter/blob/main/app/Http/Controllers/SuratController.php): `app/Http/Controllers/SuratController.php`
- [Surat model](https://github.com/adhanchan/e-letter/blob/main/app/Models/Surat.php): `app/Models/Surat.php`
- [Incoming surat view](https://github.com/adhanchan/e-letter/blob/main/resources/views/dashboard/user/suratmasuk.blade.php): `resources/views/dashboard/user/suratmasuk.blade.php`
- [Outgoing surat view](https://github.com/adhanchan/e-letter/blob/main/resources/views/dashboard/user/suratkeluar.blade.php): `resources/views/dashboard/user/suratkeluar.blade.php`

### Account administration

- [Profile management](https://github.com/adhanchan/e-letter/blob/main/app/Http/Controllers/AkunController.php): `app/Http/Controllers/AkunController.php`
- [User administration](https://github.com/adhanchan/e-letter/blob/main/app/Http/Controllers/UserController.php): `app/Http/Controllers/UserController.php`
- [Account views](https://github.com/adhanchan/e-letter/blob/main/resources/views/dashboard/pengguna/index.blade.php): `resources/views/dashboard/pengguna/index.blade.php`
- [Profile view](https://github.com/adhanchan/e-letter/blob/main/resources/views/dashboard/user/showakun.blade.php): `resources/views/dashboard/user/showakun.blade.php`

### Other components

- **Visitor**

## Connections

- Visitor → HTTP entry: sends request (evidence: `public/index.php`)
- HTTP entry → App bootstrap: loads app (evidence: `public/index.php`)
- App bootstrap → HTTP kernel: binds kernel (evidence: `bootstrap/app.php`)
- Route provider → Web routes: loads routes (evidence: `app/Providers/RouteServiceProvider.php`)
- Web routes → Authentication: routes requests (evidence: `routes/web.php`)
- Web routes → Registration: routes requests (evidence: `routes/web.php`)
- Web routes → Dashboard: routes requests (evidence: `routes/web.php`)
- Web routes → Correspondence workflows: routes requests (evidence: `routes/web.php`)
- Web routes → Profile management: routes requests (evidence: `routes/web.php`)
- Web routes → User administration: routes requests (evidence: `routes/web.php`)
- Fortify actions → Create user action: registers action (evidence: `app/Providers/FortifyServiceProvider.php`)
- Fortify actions → Profile update action: registers action (evidence: `app/Providers/FortifyServiceProvider.php`)
- Create user action → User model: creates (evidence: `app/Actions/Fortify/CreateNewUser.php`)
- Profile update action → User model: updates (evidence: `app/Actions/Fortify/UpdateUserProfileInformation.php`)
- Authentication → User model: authenticates (evidence: `app/Http/Controllers/AuthController.php`)
- Registration → User model: creates (evidence: `app/Http/Controllers/RegisterController.php`)
- Dashboard → User model: queries (evidence: `app/Http/Controllers/DashboardController.php`)
- Dashboard → Surat model: queries (evidence: `app/Http/Controllers/DashboardController.php`)
- Correspondence workflows → Surat model: manages records (evidence: `app/Http/Controllers/SuratController.php`)
- User administration → User model: manages accounts (evidence: `app/Http/Controllers/UserController.php`)
- Profile management → User model: updates profile (evidence: `app/Http/Controllers/AkunController.php`)
- User administration → Account views: renders list (evidence: `app/Http/Controllers/UserController.php`)
- Profile management → Profile view: renders profile (evidence: `app/Http/Controllers/AkunController.php`)
- Correspondence workflows → Incoming surat view: renders results (evidence: `app/Http/Controllers/SuratController.php`)
- Correspondence workflows → Outgoing surat view: renders results (evidence: `app/Http/Controllers/SuratController.php`)
