# faiaz1997/todo-app architecture

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

- Interactive diagram: https://gitdiagram.com/faiaz1997/todo-app
- Repository: https://github.com/faiaz1997/todo-app

## Overview

1. This repository is a single Laravel monolith, not a multi-service system. The main runtime path is the standard Laravel request lifecycle: `public/index.php` bootstraps `bootstrap/app.php`, then HTTP traffic is handled by the Laravel kernel, middleware stack, routes, controllers, models, and Blade views.

2. The application is centered on two functional areas:
   - Laravel Jetstream/Fortify-powered account management
   - a custom Todo feature backed by its own model, controller, and database table
   The rest of the codebase is largely framework scaffolding around those two concerns.

3. Authentication and user lifecycle are handled by Jetstream and Fortify rather than custom auth code. The `app/Actions/Fortify` and `app/Actions/Jetstream` classes implement user creation, password updates/resets, profile updates, and account deletion. Related configuration lives in `config/fortify.php` and `config/jetstream.php`, and the auth-related views are under `resources/views/auth`, `resources/views/profile`, and `resources/views/api`.

4. The Todo feature is the main custom domain. Its core pieces are:
   - `app/Models/todo.php` for persistence
   - `app/Http/Controllers/TodoController.php` for request handling
   - `database/migrations/2023_08_19_223256_create_todos_table.php` for schema
   - `resources/views/frontEnd/tasks/edit-task.blade.php` and other `frontEnd` views for presentation
   This suggests a classic MVC flow: route → controller → Eloquent model → Blade view.

5. Data storage is relational database–backed through Eloquent and migrations. The repository includes migrations for users, password reset tokens, two-factor auth columns, sessions, failed jobs, personal access tokens, and todos. That means the app persists both identity/session state and application data in the database, with session storage also explicitly modeled in `config/session.php`.

6. The user/account subsystem is broader than simple login/logout. It includes:
   - registration, login, password reset, email verification, and password confirmation
   - two-factor authentication
   - browser session management
   - profile editing and account deletion
   - API token management through Sanctum/Jetstream
   Corresponding feature tests show these flows are important application boundaries, not just incidental framework defaults.

7. The presentation layer is Blade-first, with a split between framework-provided UI and a custom frontend. Framework layouts/components live under `resources/views/layouts`, `resources/views/components`, and Jetstream-related views, while custom pages live under `resources/views/frontEnd`. The app also uses dedicated Blade components in `app/View/Components` for shared layout composition.

8. Frontend asset processing is standard Laravel + Vite + Tailwind. `resources/css`, `resources/js`, `tailwind.config.js`, `postcss.config.js`, and `vite.config.js` indicate the UI is compiled as a frontend asset bundle, but the architecture remains server-rendered Blade rather than SPA-centric.

9. The app has integration points for common Laravel infrastructure services even if they are not all fully used by the custom domain:
   - mail templates in `resources/views/emails`
   - broadcasting support in `config/broadcasting.php` and `routes/channels.php`
   - queues and failed jobs in `config/queue.php` and migrations
   - API token auth via Sanctum in `config/sanctum.php`
   These are supporting subsystems around the main web application rather than separate external services.

10. Request cross-cutting concerns are handled in the standard Laravel middleware layer under `app/Http/Middleware` and the HTTP kernel. This is where authentication, CSRF, signature validation, proxy trust, maintenance mode, and request normalization are enforced before controller logic runs.

11. The routes layer is separated by transport and concern:
   - `routes/web.php` for browser pages and form-driven interactions
   - `routes/api.php` for API endpoints
   - `routes/channels.php` for broadcast channel authorization
   - `routes/console.php` for command registration
   This gives the system clear boundaries between browser UI, API exposure, and background/console operations.

12. Tests are primarily feature-level and map closely to the major application flows. The presence of tests for auth, profile changes, two-factor auth, API tokens, browser sessions, password reset, and registration indicates the architecture is organized around user journeys and framework-backed subsystems, with the Todo area likely covered indirectly by the custom controller/model code.

Main entry points: [`routes/web.php`](https://github.com/faiaz1997/todo-app/blob/main/routes/web.php) (Web routes), [`app/Http/Kernel.php`](https://github.com/faiaz1997/todo-app/blob/main/app/Http/Kernel.php) (HTTP kernel), [`app/Actions/Fortify`](https://github.com/faiaz1997/todo-app/tree/main/app/Actions/Fortify) (Fortify actions), [`app/Actions/Jetstream`](https://github.com/faiaz1997/todo-app/tree/main/app/Actions/Jetstream) (Jetstream actions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Runtime"]
  node_public_index["Front controller<br/>bootstrap entry<br/>[index.php]"]
  node_bootstrap_app["App bootstrap<br/>[app.php]"]
  node_http_kernel["HTTP kernel<br/>[Kernel.php]"]
  node_middleware_stack["Middleware<br/>cross-cutting"]
  node_route_web["Web routes<br/>[web.php]"]
  node_route_api["API routes<br/>[api.php]"]
end

subgraph group_domains["Domains"]
  node_todo_controller["Todo controller<br/>[TodoController.php]"]
  node_todo_model["Todo model<br/>eloquent model<br/>[todo.php]"]
  node_fortify_actions["Fortify actions<br/>auth actions"]
  node_jetstream_actions["Jetstream actions<br/>account actions"]
end

subgraph group_ui["UI"]
  node_layout_views["Layouts"]
  node_component_views["Components"]
  node_auth_views["Auth views<br/>blade pages"]
  node_profile_views["Profile views<br/>blade pages"]
  node_todo_views["Todo views<br/>blade pages"]
  node_app_js["Frontend assets<br/>vite bundle<br/>[app.css]"]
end

subgraph group_infra["Infrastructure"]
  node_todo_migration["Todo schema<br/>migration"]
  node_fortify_config["Fortify config<br/>[fortify.php]"]
  node_jetstream_config["Jetstream config<br/>[jetstream.php]"]
  node_user_model["User model<br/>eloquent model<br/>[User.php]"]
  node_user_migrations["User schema<br/>migrations"]
  node_session_config["Session config<br/>[session.php]"]
  node_sanctum_config["Sanctum config<br/>[sanctum.php]"]
end

node_public_index -->|"bootstraps"| node_bootstrap_app
node_bootstrap_app -->|"resolves"| node_http_kernel
node_http_kernel -->|"runs"| node_middleware_stack
node_http_kernel -->|"dispatches"| node_route_web
node_http_kernel -->|"dispatches"| node_route_api
node_route_web -->|"invokes"| node_todo_controller
node_todo_controller -->|"reads/writes"| node_todo_model
node_todo_model -.->|"backed by"| node_todo_migration
node_todo_controller -->|"renders"| node_todo_views
node_route_web -->|"uses"| node_fortify_actions
node_route_web -->|"uses"| node_jetstream_actions
node_fortify_actions -->|"mutates"| node_user_model
node_jetstream_actions -->|"mutates"| node_user_model
node_user_model -.->|"backed by"| node_user_migrations
node_fortify_config -->|"wires"| node_fortify_actions
node_jetstream_config -->|"wires"| node_jetstream_actions
node_route_web -->|"serves"| node_auth_views
node_route_web -->|"serves"| node_profile_views
node_route_web -->|"wraps"| node_layout_views
node_layout_views -->|"composes"| node_component_views
node_todo_views -->|"extends"| node_layout_views
node_route_api -->|"auth via"| node_sanctum_config
node_profile_views -.->|"drives"| node_fortify_actions
node_profile_views -.->|"drives"| node_jetstream_actions
node_http_kernel -.->|"uses"| node_session_config
node_http_kernel -.->|"supports"| node_sanctum_config
node_app_js -.->|"bundles for"| node_layout_views

click node_public_index "https://github.com/faiaz1997/todo-app/blob/main/public/index.php"
click node_bootstrap_app "https://github.com/faiaz1997/todo-app/blob/main/bootstrap/app.php"
click node_http_kernel "https://github.com/faiaz1997/todo-app/blob/main/app/Http/Kernel.php"
click node_middleware_stack "https://github.com/faiaz1997/todo-app/tree/main/app/Http/Middleware"
click node_route_web "https://github.com/faiaz1997/todo-app/blob/main/routes/web.php"
click node_route_api "https://github.com/faiaz1997/todo-app/blob/main/routes/api.php"
click node_todo_controller "https://github.com/faiaz1997/todo-app/blob/main/app/Http/Controllers/TodoController.php"
click node_todo_model "https://github.com/faiaz1997/todo-app/blob/main/app/Models/todo.php"
click node_todo_migration "https://github.com/faiaz1997/todo-app/blob/main/database/migrations/2023_08_19_223256_create_todos_table.php"
click node_fortify_actions "https://github.com/faiaz1997/todo-app/tree/main/app/Actions/Fortify"
click node_jetstream_actions "https://github.com/faiaz1997/todo-app/tree/main/app/Actions/Jetstream"
click node_fortify_config "https://github.com/faiaz1997/todo-app/blob/main/config/fortify.php"
click node_jetstream_config "https://github.com/faiaz1997/todo-app/blob/main/config/jetstream.php"
click node_user_model "https://github.com/faiaz1997/todo-app/blob/main/app/Models/User.php"
click node_user_migrations "https://github.com/faiaz1997/todo-app/blob/main/database/migrations/2014_10_12_000000_create_users_table.php"
click node_session_config "https://github.com/faiaz1997/todo-app/blob/main/config/session.php"
click node_sanctum_config "https://github.com/faiaz1997/todo-app/blob/main/config/sanctum.php"
click node_layout_views "https://github.com/faiaz1997/todo-app/tree/main/resources/views/layouts"
click node_component_views "https://github.com/faiaz1997/todo-app/tree/main/resources/views/components"
click node_auth_views "https://github.com/faiaz1997/todo-app/tree/main/resources/views/auth"
click node_profile_views "https://github.com/faiaz1997/todo-app/tree/main/resources/views/profile"
click node_todo_views "https://github.com/faiaz1997/todo-app/tree/main/resources/views/frontEnd"
click node_app_js "https://github.com/faiaz1997/todo-app/blob/main/resources/css/app.css"

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_public_index,node_bootstrap_app,node_http_kernel,node_middleware_stack,node_route_web,node_route_api toneBlue
class node_todo_controller,node_todo_model,node_fortify_actions,node_jetstream_actions toneAmber
class node_layout_views,node_component_views,node_auth_views,node_profile_views,node_todo_views,node_app_js toneMint
class node_todo_migration,node_fortify_config,node_jetstream_config,node_user_model,node_user_migrations,node_session_config,node_sanctum_config toneRose
```

## Components

### Runtime

Laravel request lifecycle and cross-cutting HTTP layer.

- [Front controller](https://github.com/faiaz1997/todo-app/blob/main/public/index.php): bootstrap entry · Starts the Laravel HTTP lifecycle. · `public/index.php`
- [App bootstrap](https://github.com/faiaz1997/todo-app/blob/main/bootstrap/app.php): bootstrap · Creates and configures the application instance. · `bootstrap/app.php`
- [HTTP kernel](https://github.com/faiaz1997/todo-app/blob/main/app/Http/Kernel.php): kernel · Registers middleware and dispatches web requests. · `app/Http/Kernel.php`
- [Middleware](https://github.com/faiaz1997/todo-app/tree/main/app/Http/Middleware): cross-cutting · Authentication, CSRF, proxy trust, maintenance, and request normalization. · `app/Http/Middleware`
- [Web routes](https://github.com/faiaz1997/todo-app/blob/main/routes/web.php): routes · Browser-facing route definitions. · `routes/web.php`
- [API routes](https://github.com/faiaz1997/todo-app/blob/main/routes/api.php): routes · API endpoint definitions. · `routes/api.php`

### Domains

Custom application features and account management.

- [Todo controller](https://github.com/faiaz1997/todo-app/blob/main/app/Http/Controllers/TodoController.php): controller · Handles todo requests and view flow. · `app/Http/Controllers/TodoController.php`
- [Todo model](https://github.com/faiaz1997/todo-app/blob/main/app/Models/todo.php): eloquent model · Persists todo records. · `app/Models/todo.php`
- [Fortify actions](https://github.com/faiaz1997/todo-app/tree/main/app/Actions/Fortify): auth actions · User creation, password reset, update, and profile flows. · `app/Actions/Fortify`
- [Jetstream actions](https://github.com/faiaz1997/todo-app/tree/main/app/Actions/Jetstream): account actions · Account deletion and related Jetstream lifecycle logic. · `app/Actions/Jetstream`

### UI

Blade views and frontend assets.

- [Layouts](https://github.com/faiaz1997/todo-app/tree/main/resources/views/layouts): blade layouts · Shared application and guest shells. · `resources/views/layouts`
- [Components](https://github.com/faiaz1997/todo-app/tree/main/resources/views/components): blade components · Reusable Jetstream and app UI pieces. · `resources/views/components`
- [Auth views](https://github.com/faiaz1997/todo-app/tree/main/resources/views/auth): blade pages · Login, registration, reset, verification, and confirmation screens. · `resources/views/auth`
- [Profile views](https://github.com/faiaz1997/todo-app/tree/main/resources/views/profile): blade pages · Profile, password, browser session, and deletion screens. · `resources/views/profile`
- [Todo views](https://github.com/faiaz1997/todo-app/tree/main/resources/views/frontEnd): blade pages · Custom frontend pages for todo interactions. · `resources/views/frontEnd`
- [Frontend assets](https://github.com/faiaz1997/todo-app/blob/main/resources/css/app.css): vite bundle · Compiled CSS and JavaScript entrypoints. · `resources/css/app.css`

### Infrastructure

Framework services, configuration, and persistence.

- [Todo schema](https://github.com/faiaz1997/todo-app/blob/main/database/migrations/2023_08_19_223256_create_todos_table.php): migration · Creates the todos table. · `database/migrations/2023_08_19_223256_create_todos_table.php`
- [Fortify config](https://github.com/faiaz1997/todo-app/blob/main/config/fortify.php): config · Authenticates and wires account-management flows. · `config/fortify.php`
- [Jetstream config](https://github.com/faiaz1997/todo-app/blob/main/config/jetstream.php): config · Configures Jetstream features and UI integration. · `config/jetstream.php`
- [User model](https://github.com/faiaz1997/todo-app/blob/main/app/Models/User.php): eloquent model · Identity, auth, and two-factor state. · `app/Models/User.php`
- [User schema](https://github.com/faiaz1997/todo-app/blob/main/database/migrations/2014_10_12_000000_create_users_table.php): migrations · Users, password resets, sessions, two-factor, jobs, and API tokens. · `database/migrations/2014_10_12_000000_create_users_table.php`
- [Session config](https://github.com/faiaz1997/todo-app/blob/main/config/session.php): config · Controls browser session storage and lifetime. · `config/session.php`
- [Sanctum config](https://github.com/faiaz1997/todo-app/blob/main/config/sanctum.php): config · API token authentication support. · `config/sanctum.php`

## Connections

- Front controller → App bootstrap: bootstraps · The front controller creates the Laravel application.
- App bootstrap → HTTP kernel: resolves · Bootstrap hands control to the HTTP kernel.
- HTTP kernel → Middleware: runs · Requests pass through middleware before routing.
- HTTP kernel → Web routes: dispatches · Browser traffic is routed to web routes.
- HTTP kernel → API routes: dispatches · API traffic is routed to API routes.
- Web routes → Todo controller: invokes · Web routes reach the todo controller.
- Todo controller → Todo model: reads/writes · Controller uses the Todo Eloquent model.
- Todo model → Todo schema: backed by · The model persists to the todos table.
- Todo controller → Todo views: renders · Todo flows end in Blade pages.
- Web routes → Fortify actions: uses · Web auth flows are implemented by Fortify actions.
- Web routes → Jetstream actions: uses · Account lifecycle flows are implemented by Jetstream actions.
- Fortify actions → User model: mutates · Fortify actions create and update user records.
- Jetstream actions → User model: mutates · Jetstream actions delete or update account state.
- User model → User schema: backed by · User identity and auth state is stored in the database.
- Fortify config → Fortify actions: wires · Fortify config connects the framework to custom action classes.
- Jetstream config → Jetstream actions: wires · Jetstream config connects the framework to custom account actions.
- Web routes → Auth views: serves · Authentication pages are rendered from Blade views.
- Web routes → Profile views: serves · Profile management pages are rendered from Blade views.
- Web routes → Layouts: wraps · Web pages use shared application and guest layouts.
- Layouts → Components: composes · Layouts are built from reusable Blade components.
- Todo views → Layouts: extends · Custom todo pages sit inside the shared frontend shell.
- API routes → Sanctum config: auth via · API endpoints rely on Sanctum token authentication.
- Profile views → Fortify actions: drives · Profile screens trigger password and profile actions.
- Profile views → Jetstream actions: drives · Account deletion and related flows originate here.
- HTTP kernel → Session config: uses · HTTP handling depends on configured session storage.
- HTTP kernel → Sanctum config: supports · The kernel participates in API token auth support.
- Frontend assets → Layouts: bundles for · Frontend assets are loaded by Blade layouts.
