# rappasoft/laravel-boilerplate architecture

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

- Interactive diagram: https://gitdiagram.com/rappasoft/laravel-boilerplate
- Repository: https://github.com/rappasoft/laravel-boilerplate

## Overview

Laravel Boilerplate is a starter web application for account management and administration. A typical user flow enters through frontend authentication routes, reaches a controller, and then uses authentication services and models; administrators have separate user and role management routes. The README also documents two-factor authentication, searchable tables, impersonation, timezone and multilingual support. Several secondary feature implementations are unsampled, so their nodes are retained where the tree supports them, but uncertain connections are omitted.

Main entry points: [`routes/frontend/auth.php`](https://github.com/rappasoft/laravel-boilerplate/blob/master/routes/frontend/auth.php) (Frontend auth routes), [`app/Domains/Auth/Http/Controllers/Backend/User/UserController.php`](https://github.com/rappasoft/laravel-boilerplate/blob/master/app/Domains/Auth/Http/Controllers/Backend/User/UserController.php) (User administration), [`app/Domains/Auth/Services/UserService.php`](https://github.com/rappasoft/laravel-boilerplate/blob/master/app/Domains/Auth/Services/UserService.php) (User service), [`routes/backend/auth.php`](https://github.com/rappasoft/laravel-boilerplate/blob/master/routes/backend/auth.php) (Backend auth routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Web entry"]
  node_frontend_routes["Frontend auth routes<br/>[auth.php]"]
  node_backend_routes["Backend auth routes<br/>[auth.php]"]
end

subgraph group_accounts["Accounts and access"]
  node_login["Sign in"]
  node_register["Registration"]
  node_twofactor["Two-factor auth"]
  node_user_service["User service<br/>[UserService.php]"]
  node_user_model["User accounts<br/>[User.php]"]
  node_user_events["Account events<br/>[UserLoggedIn.php]"]
  node_verification["Email verification<br/>[VerifyEmail.php]"]
end

subgraph group_admin["Administration"]
  node_user_admin["User administration<br/>[UserController.php]"]
  node_role_admin["Role administration<br/>[RoleController.php]"]
  node_role_service["Role service<br/>[RoleService.php]"]
  node_role_model["Roles<br/>[Role.php]"]
  node_permission_service["Permission service"]
  node_permission_model["Permissions<br/>[Permission.php]"]
  node_search_tables["Searchable tables<br/>[UsersTable.php]"]
end

subgraph group_experience["User experience"]
  node_frontend["Frontend scaffold<br/>[app.blade.php]"]
  node_backend["Backend scaffold<br/>[app.blade.php]"]
  node_locale["Locale support"]
  node_timezone["Timezone support<br/>[TimezoneHelper.php]"]
  node_announcements["Announcements"]
end

node_visitor(("Visitor"))

node_visitor -->|"requests auth"| node_frontend_routes
node_visitor -->|"requests admin"| node_backend_routes
node_frontend_routes -->|"routes to"| node_login
node_frontend_routes -->|"routes to"| node_register
node_frontend_routes -->|"routes to"| node_twofactor
node_backend_routes -->|"routes to"| node_user_admin
node_backend_routes -->|"routes to"| node_role_admin
node_login -->|"emits login"| node_user_events
node_register -->|"registers through"| node_user_service
node_user_admin -->|"manages users"| node_user_service
node_user_admin -->|"loads roles"| node_role_service
node_user_admin -->|"loads permissions"| node_permission_service
node_role_admin -->|"manages roles"| node_role_service
node_role_admin -->|"loads permissions"| node_permission_service
node_user_service -->|"operates on"| node_user_model
node_user_service -->|"emits events"| node_user_events
node_role_service -->|"operates on"| node_role_model
node_permission_service -->|"queries"| node_permission_model
node_user_model -->|"sends verification"| node_verification
node_visitor -.->|"uses"| node_frontend
node_visitor -.->|"uses"| node_backend
node_visitor -.->|"searches records"| node_search_tables
node_visitor -.->|"uses languages"| node_locale
node_visitor -.->|"sets timezone"| node_timezone
node_visitor -.->|"views updates"| node_announcements

click node_frontend_routes "https://github.com/rappasoft/laravel-boilerplate/blob/master/routes/frontend/auth.php"
click node_backend_routes "https://github.com/rappasoft/laravel-boilerplate/blob/master/routes/backend/auth.php"
click node_login "https://github.com/rappasoft/laravel-boilerplate/blob/master/app/Domains/Auth/Http/Controllers/Frontend/Auth/LoginController.php"
click node_register "https://github.com/rappasoft/laravel-boilerplate/blob/master/app/Domains/Auth/Http/Controllers/Frontend/Auth/RegisterController.php"
click node_twofactor "https://github.com/rappasoft/laravel-boilerplate/blob/master/app/Domains/Auth/Http/Controllers/Frontend/Auth/TwoFactorAuthenticationController.php"
click node_user_service "https://github.com/rappasoft/laravel-boilerplate/blob/master/app/Domains/Auth/Services/UserService.php"
click node_user_model "https://github.com/rappasoft/laravel-boilerplate/blob/master/app/Domains/Auth/Models/User.php"
click node_user_events "https://github.com/rappasoft/laravel-boilerplate/blob/master/app/Domains/Auth/Events/User/UserLoggedIn.php"
click node_verification "https://github.com/rappasoft/laravel-boilerplate/blob/master/app/Domains/Auth/Notifications/Frontend/VerifyEmail.php"
click node_user_admin "https://github.com/rappasoft/laravel-boilerplate/blob/master/app/Domains/Auth/Http/Controllers/Backend/User/UserController.php"
click node_role_admin "https://github.com/rappasoft/laravel-boilerplate/blob/master/app/Domains/Auth/Http/Controllers/Backend/Role/RoleController.php"
click node_role_service "https://github.com/rappasoft/laravel-boilerplate/blob/master/app/Domains/Auth/Services/RoleService.php"
click node_role_model "https://github.com/rappasoft/laravel-boilerplate/blob/master/app/Domains/Auth/Models/Role.php"
click node_permission_service "https://github.com/rappasoft/laravel-boilerplate/blob/master/app/Domains/Auth/Services/PermissionService.php"
click node_permission_model "https://github.com/rappasoft/laravel-boilerplate/blob/master/app/Domains/Auth/Models/Permission.php"
click node_search_tables "https://github.com/rappasoft/laravel-boilerplate/blob/master/app/Http/Livewire/Backend/UsersTable.php"
click node_frontend "https://github.com/rappasoft/laravel-boilerplate/blob/master/resources/views/frontend/layouts/app.blade.php"
click node_backend "https://github.com/rappasoft/laravel-boilerplate/blob/master/resources/views/backend/layouts/app.blade.php"
click node_locale "https://github.com/rappasoft/laravel-boilerplate/blob/master/app/Http/Middleware/LocaleMiddleware.php"
click node_timezone "https://github.com/rappasoft/laravel-boilerplate/blob/master/app/Helpers/Global/TimezoneHelper.php"
click node_announcements "https://github.com/rappasoft/laravel-boilerplate/blob/master/app/Domains/Announcement/Services/AnnouncementService.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_frontend_routes,node_backend_routes toneBlue
class node_login,node_register,node_twofactor,node_user_service,node_user_model,node_user_events,node_verification toneAmber
class node_user_admin,node_role_admin,node_role_service,node_role_model,node_permission_service,node_permission_model,node_search_tables toneMint
class node_frontend,node_backend,node_locale,node_timezone,node_announcements toneRose
class node_visitor toneIndigo
```

## Components

### Web entry

- [Frontend auth routes](https://github.com/rappasoft/laravel-boilerplate/blob/master/routes/frontend/auth.php): `routes/frontend/auth.php`
- [Backend auth routes](https://github.com/rappasoft/laravel-boilerplate/blob/master/routes/backend/auth.php): `routes/backend/auth.php`

### Accounts and access

- [Sign in](https://github.com/rappasoft/laravel-boilerplate/blob/master/app/Domains/Auth/Http/Controllers/Frontend/Auth/LoginController.php): `app/Domains/Auth/Http/Controllers/Frontend/Auth/LoginController.php`
- [Registration](https://github.com/rappasoft/laravel-boilerplate/blob/master/app/Domains/Auth/Http/Controllers/Frontend/Auth/RegisterController.php): `app/Domains/Auth/Http/Controllers/Frontend/Auth/RegisterController.php`
- [Two-factor auth](https://github.com/rappasoft/laravel-boilerplate/blob/master/app/Domains/Auth/Http/Controllers/Frontend/Auth/TwoFactorAuthenticationController.php): `app/Domains/Auth/Http/Controllers/Frontend/Auth/TwoFactorAuthenticationController.php`
- [User service](https://github.com/rappasoft/laravel-boilerplate/blob/master/app/Domains/Auth/Services/UserService.php): `app/Domains/Auth/Services/UserService.php`
- [User accounts](https://github.com/rappasoft/laravel-boilerplate/blob/master/app/Domains/Auth/Models/User.php): `app/Domains/Auth/Models/User.php`
- [Account events](https://github.com/rappasoft/laravel-boilerplate/blob/master/app/Domains/Auth/Events/User/UserLoggedIn.php): `app/Domains/Auth/Events/User/UserLoggedIn.php`
- [Email verification](https://github.com/rappasoft/laravel-boilerplate/blob/master/app/Domains/Auth/Notifications/Frontend/VerifyEmail.php): `app/Domains/Auth/Notifications/Frontend/VerifyEmail.php`

### Administration

- [User administration](https://github.com/rappasoft/laravel-boilerplate/blob/master/app/Domains/Auth/Http/Controllers/Backend/User/UserController.php): `app/Domains/Auth/Http/Controllers/Backend/User/UserController.php`
- [Role administration](https://github.com/rappasoft/laravel-boilerplate/blob/master/app/Domains/Auth/Http/Controllers/Backend/Role/RoleController.php): `app/Domains/Auth/Http/Controllers/Backend/Role/RoleController.php`
- [Role service](https://github.com/rappasoft/laravel-boilerplate/blob/master/app/Domains/Auth/Services/RoleService.php): `app/Domains/Auth/Services/RoleService.php`
- [Roles](https://github.com/rappasoft/laravel-boilerplate/blob/master/app/Domains/Auth/Models/Role.php): `app/Domains/Auth/Models/Role.php`
- [Permission service](https://github.com/rappasoft/laravel-boilerplate/blob/master/app/Domains/Auth/Services/PermissionService.php): `app/Domains/Auth/Services/PermissionService.php`
- [Permissions](https://github.com/rappasoft/laravel-boilerplate/blob/master/app/Domains/Auth/Models/Permission.php): `app/Domains/Auth/Models/Permission.php`
- [Searchable tables](https://github.com/rappasoft/laravel-boilerplate/blob/master/app/Http/Livewire/Backend/UsersTable.php): `app/Http/Livewire/Backend/UsersTable.php`

### User experience

- [Frontend scaffold](https://github.com/rappasoft/laravel-boilerplate/blob/master/resources/views/frontend/layouts/app.blade.php): `resources/views/frontend/layouts/app.blade.php`
- [Backend scaffold](https://github.com/rappasoft/laravel-boilerplate/blob/master/resources/views/backend/layouts/app.blade.php): `resources/views/backend/layouts/app.blade.php`
- [Locale support](https://github.com/rappasoft/laravel-boilerplate/blob/master/app/Http/Middleware/LocaleMiddleware.php): `app/Http/Middleware/LocaleMiddleware.php`
- [Timezone support](https://github.com/rappasoft/laravel-boilerplate/blob/master/app/Helpers/Global/TimezoneHelper.php): `app/Helpers/Global/TimezoneHelper.php`
- [Announcements](https://github.com/rappasoft/laravel-boilerplate/blob/master/app/Domains/Announcement/Services/AnnouncementService.php): `app/Domains/Announcement/Services/AnnouncementService.php`

### Other components

- **Visitor**

## Connections

- Visitor → Frontend auth routes: requests auth (evidence: `routes/frontend/auth.php`)
- Visitor → Backend auth routes: requests admin (evidence: `routes/backend/auth.php`)
- Frontend auth routes → Sign in: routes to (evidence: `routes/frontend/auth.php`)
- Frontend auth routes → Registration: routes to (evidence: `routes/frontend/auth.php`)
- Frontend auth routes → Two-factor auth: routes to (evidence: `routes/frontend/auth.php`)
- Backend auth routes → User administration: routes to (evidence: `routes/backend/auth.php`)
- Backend auth routes → Role administration: routes to (evidence: `routes/backend/auth.php`)
- Sign in → Account events: emits login (evidence: `app/Domains/Auth/Http/Controllers/Frontend/Auth/LoginController.php`)
- Registration → User service: registers through (evidence: `app/Domains/Auth/Http/Controllers/Frontend/Auth/RegisterController.php`)
- User administration → User service: manages users (evidence: `app/Domains/Auth/Http/Controllers/Backend/User/UserController.php`)
- User administration → Role service: loads roles (evidence: `app/Domains/Auth/Http/Controllers/Backend/User/UserController.php`)
- User administration → Permission service: loads permissions (evidence: `app/Domains/Auth/Http/Controllers/Backend/User/UserController.php`)
- Role administration → Role service: manages roles (evidence: `app/Domains/Auth/Http/Controllers/Backend/Role/RoleController.php`)
- Role administration → Permission service: loads permissions (evidence: `app/Domains/Auth/Http/Controllers/Backend/Role/RoleController.php`)
- User service → User accounts: operates on (evidence: `app/Domains/Auth/Services/UserService.php`)
- User service → Account events: emits events (evidence: `app/Domains/Auth/Services/UserService.php`)
- Role service → Roles: operates on (evidence: `app/Domains/Auth/Services/RoleService.php`)
- Permission service → Permissions: queries (evidence: `app/Domains/Auth/Services/PermissionService.php`)
- User accounts → Email verification: sends verification (evidence: `app/Domains/Auth/Models/User.php`)
- Visitor → Frontend scaffold: uses
- Visitor → Backend scaffold: uses
- Visitor → Searchable tables: searches records
- Visitor → Locale support: uses languages
- Visitor → Timezone support: sets timezone
- Visitor → Announcements: views updates
