# bmadigan/dizzybank architecture

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

- Interactive diagram: https://gitdiagram.com/bmadigan/dizzybank
- Repository: https://github.com/bmadigan/dizzybank

## Overview

Dizzybank is a Laravel banking/fintech application, currently presented as a browser app with Inertia and Vue. The main workflow lets an authenticated user view accounts, create or update an account, and record account activity; payment and payee management, dashboard activity, transaction export, and profile management are separate capabilities. Account and payment aggregates represent event-sourced domain operations, with projectors and models supporting persisted views. The excerpts establish controller-to-domain calls and route mappings; projector wiring and several frontend interactions are not shown, so those links are omitted.

Main entry points: [`routes/web.php`](https://github.com/bmadigan/dizzybank/blob/master/routes/web.php) (Web routes), [`app/Domain/Users/Models/User.php`](https://github.com/bmadigan/dizzybank/blob/master/app/Domain/Users/Models/User.php) (User model), [`app/Http/Controllers/AccountsController.php`](https://github.com/bmadigan/dizzybank/blob/master/app/Http/Controllers/AccountsController.php) (Accounts handler), [`app/Http/Controllers/DashboardController.php`](https://github.com/bmadigan/dizzybank/blob/master/app/Http/Controllers/DashboardController.php) (Dashboard handler)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web entry and views"]
  node_routes["Web routes<br/>[web.php]"]
  node_account_ui["Account pages<br/>[Show.vue]"]
  node_dashboard_ui["Dashboard page<br/>[Dashboard.vue]"]
  node_payments_ui["Payment pages<br/>[Index.vue]"]
  node_profile_ui["Profile page<br/>[Edit.vue]"]
end

subgraph group_accounts["Accounts and activity"]
  node_accounts_controller["Accounts handler"]
  node_account_aggregate["Account aggregate"]
  node_account_events["Account events<br/>[AccountCreated.php]"]
  node_account_model["Account model<br/>[Account.php]"]
  node_account_projectors["Account projectors"]
  node_transactions[("Transaction records<br/>[Transaction.php]")]
  node_transaction_resource["Transaction resource"]
  node_dashboard_controller["Dashboard handler"]
  node_export_controller["Transaction export"]
end

subgraph group_payments["Payments"]
  node_payments_controller["Payments handler"]
  node_payment_aggregate["Payment aggregate"]
  node_payment_events["Payment events<br/>[PaymentMade.php]"]
  node_payment_projector["Payment projector"]
  node_payees_controller["Payee handler"]
  node_payee_model[("Payee model<br/>[Payee.php]")]
  node_payment_model[("Payment model<br/>[Payment.php]")]
end

subgraph group_identity["Users and profile"]
  node_user_model[("User model<br/>[User.php]")]
  node_auth_controller["Authentication handlers"]
  node_profile_controller["Profile handler"]
end

node_user(("Bank customer"))

node_user -->|"requests pages"| node_routes
node_routes -->|"routes to"| node_accounts_controller
node_routes -->|"routes to"| node_dashboard_controller
node_routes -->|"routes to"| node_payments_controller
node_routes -->|"routes to"| node_payees_controller
node_routes -->|"routes to"| node_export_controller
node_routes -->|"routes to"| node_profile_controller
node_accounts_controller -->|"renders"| node_account_ui
node_dashboard_controller -.->|"renders"| node_dashboard_ui
node_payments_controller -->|"renders"| node_payments_ui
node_profile_controller -->|"renders"| node_profile_ui
node_accounts_controller -->|"records operations"| node_account_aggregate
node_accounts_controller -->|"loads account"| node_account_model
node_accounts_controller -->|"formats activity"| node_transaction_resource
node_account_aggregate -->|"emits events"| node_account_events
node_account_model -->|"relates activity"| node_transactions
node_dashboard_controller -->|"loads accounts"| node_account_model
node_dashboard_controller -->|"loads activity"| node_transactions
node_dashboard_controller -->|"formats activity"| node_transaction_resource
node_export_controller -->|"exports records"| node_transactions
node_payments_controller -->|"records payment"| node_payment_aggregate
node_payment_aggregate -->|"emits event"| node_payment_events
node_payments_controller -->|"loads user data"| node_user_model
node_payees_controller -->|"manages payees"| node_payee_model
node_user_model -->|"relates accounts"| node_account_model
node_user_model -->|"relates activity"| node_transactions
node_user_model -->|"relates payees"| node_payee_model
node_user_model -->|"relates payments"| node_payment_model
node_auth_controller -.->|"authenticates"| node_user_model
node_profile_controller -->|"updates profile"| node_user_model
node_account_projectors -.->|"projects state"| node_account_model
node_payment_projector -.->|"projects state"| node_payment_model

click node_routes "https://github.com/bmadigan/dizzybank/blob/master/routes/web.php"
click node_account_ui "https://github.com/bmadigan/dizzybank/blob/master/resources/js/Pages/Accounts/Show.vue"
click node_dashboard_ui "https://github.com/bmadigan/dizzybank/blob/master/resources/js/Pages/Dashboard.vue"
click node_payments_ui "https://github.com/bmadigan/dizzybank/blob/master/resources/js/Pages/Payments/Index.vue"
click node_profile_ui "https://github.com/bmadigan/dizzybank/blob/master/resources/js/Pages/User/Edit.vue"
click node_accounts_controller "https://github.com/bmadigan/dizzybank/blob/master/app/Http/Controllers/AccountsController.php"
click node_account_aggregate "https://github.com/bmadigan/dizzybank/blob/master/app/Domain/Accounts/Aggregates/AccountAggregate.php"
click node_account_events "https://github.com/bmadigan/dizzybank/blob/master/app/Domain/Accounts/Events/AccountCreated.php"
click node_account_model "https://github.com/bmadigan/dizzybank/blob/master/app/Domain/Accounts/Models/Account.php"
click node_account_projectors "https://github.com/bmadigan/dizzybank/blob/master/app/Domain/Accounts/Projectors/AccountProjector.php"
click node_transactions "https://github.com/bmadigan/dizzybank/blob/master/app/Domain/Accounts/Models/Transaction.php"
click node_transaction_resource "https://github.com/bmadigan/dizzybank/blob/master/app/Domain/Accounts/Resources/TransactionResource.php"
click node_dashboard_controller "https://github.com/bmadigan/dizzybank/blob/master/app/Http/Controllers/DashboardController.php"
click node_export_controller "https://github.com/bmadigan/dizzybank/blob/master/app/Http/Controllers/TransactionsExportController.php"
click node_payments_controller "https://github.com/bmadigan/dizzybank/blob/master/app/Http/Controllers/PaymentsController.php"
click node_payment_aggregate "https://github.com/bmadigan/dizzybank/blob/master/app/Domain/Payments/Aggregates/PaymentAggregate.php"
click node_payment_events "https://github.com/bmadigan/dizzybank/blob/master/app/Domain/Payments/Events/PaymentMade.php"
click node_payment_projector "https://github.com/bmadigan/dizzybank/blob/master/app/Domain/Payments/Projectors/PaymentProjector.php"
click node_payees_controller "https://github.com/bmadigan/dizzybank/blob/master/app/Http/Controllers/PayeesController.php"
click node_payee_model "https://github.com/bmadigan/dizzybank/blob/master/app/Domain/Payments/Models/Payee.php"
click node_payment_model "https://github.com/bmadigan/dizzybank/blob/master/app/Domain/Payments/Models/Payment.php"
click node_user_model "https://github.com/bmadigan/dizzybank/blob/master/app/Domain/Users/Models/User.php"
click node_auth_controller "https://github.com/bmadigan/dizzybank/blob/master/app/Http/Controllers/Auth/LoginController.php"
click node_profile_controller "https://github.com/bmadigan/dizzybank/blob/master/app/Http/Controllers/UserProfileController.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_routes,node_account_ui,node_dashboard_ui,node_payments_ui,node_profile_ui toneBlue
class node_accounts_controller,node_account_aggregate,node_account_events,node_account_model,node_account_projectors,node_transactions,node_transaction_resource,node_dashboard_controller,node_export_controller toneAmber
class node_payments_controller,node_payment_aggregate,node_payment_events,node_payment_projector,node_payees_controller,node_payee_model,node_payment_model toneMint
class node_user_model,node_auth_controller,node_profile_controller toneRose
class node_user toneIndigo
```

## Components

### Web entry and views

- [Web routes](https://github.com/bmadigan/dizzybank/blob/master/routes/web.php): `routes/web.php`
- [Account pages](https://github.com/bmadigan/dizzybank/blob/master/resources/js/Pages/Accounts/Show.vue): `resources/js/Pages/Accounts/Show.vue`
- [Dashboard page](https://github.com/bmadigan/dizzybank/blob/master/resources/js/Pages/Dashboard.vue): `resources/js/Pages/Dashboard.vue`
- [Payment pages](https://github.com/bmadigan/dizzybank/blob/master/resources/js/Pages/Payments/Index.vue): `resources/js/Pages/Payments/Index.vue`
- [Profile page](https://github.com/bmadigan/dizzybank/blob/master/resources/js/Pages/User/Edit.vue): `resources/js/Pages/User/Edit.vue`

### Accounts and activity

- [Accounts handler](https://github.com/bmadigan/dizzybank/blob/master/app/Http/Controllers/AccountsController.php): `app/Http/Controllers/AccountsController.php`
- [Account aggregate](https://github.com/bmadigan/dizzybank/blob/master/app/Domain/Accounts/Aggregates/AccountAggregate.php): `app/Domain/Accounts/Aggregates/AccountAggregate.php`
- [Account events](https://github.com/bmadigan/dizzybank/blob/master/app/Domain/Accounts/Events/AccountCreated.php): `app/Domain/Accounts/Events/AccountCreated.php`
- [Account model](https://github.com/bmadigan/dizzybank/blob/master/app/Domain/Accounts/Models/Account.php): `app/Domain/Accounts/Models/Account.php`
- [Account projectors](https://github.com/bmadigan/dizzybank/blob/master/app/Domain/Accounts/Projectors/AccountProjector.php): `app/Domain/Accounts/Projectors/AccountProjector.php`
- [Transaction records](https://github.com/bmadigan/dizzybank/blob/master/app/Domain/Accounts/Models/Transaction.php): `app/Domain/Accounts/Models/Transaction.php`
- [Transaction resource](https://github.com/bmadigan/dizzybank/blob/master/app/Domain/Accounts/Resources/TransactionResource.php): `app/Domain/Accounts/Resources/TransactionResource.php`
- [Dashboard handler](https://github.com/bmadigan/dizzybank/blob/master/app/Http/Controllers/DashboardController.php): `app/Http/Controllers/DashboardController.php`
- [Transaction export](https://github.com/bmadigan/dizzybank/blob/master/app/Http/Controllers/TransactionsExportController.php): `app/Http/Controllers/TransactionsExportController.php`

### Payments

- [Payments handler](https://github.com/bmadigan/dizzybank/blob/master/app/Http/Controllers/PaymentsController.php): `app/Http/Controllers/PaymentsController.php`
- [Payment aggregate](https://github.com/bmadigan/dizzybank/blob/master/app/Domain/Payments/Aggregates/PaymentAggregate.php): `app/Domain/Payments/Aggregates/PaymentAggregate.php`
- [Payment events](https://github.com/bmadigan/dizzybank/blob/master/app/Domain/Payments/Events/PaymentMade.php): `app/Domain/Payments/Events/PaymentMade.php`
- [Payment projector](https://github.com/bmadigan/dizzybank/blob/master/app/Domain/Payments/Projectors/PaymentProjector.php): `app/Domain/Payments/Projectors/PaymentProjector.php`
- [Payee handler](https://github.com/bmadigan/dizzybank/blob/master/app/Http/Controllers/PayeesController.php): `app/Http/Controllers/PayeesController.php`
- [Payee model](https://github.com/bmadigan/dizzybank/blob/master/app/Domain/Payments/Models/Payee.php): `app/Domain/Payments/Models/Payee.php`
- [Payment model](https://github.com/bmadigan/dizzybank/blob/master/app/Domain/Payments/Models/Payment.php): `app/Domain/Payments/Models/Payment.php`

### Users and profile

- [User model](https://github.com/bmadigan/dizzybank/blob/master/app/Domain/Users/Models/User.php): `app/Domain/Users/Models/User.php`
- [Authentication handlers](https://github.com/bmadigan/dizzybank/blob/master/app/Http/Controllers/Auth/LoginController.php): `app/Http/Controllers/Auth/LoginController.php`
- [Profile handler](https://github.com/bmadigan/dizzybank/blob/master/app/Http/Controllers/UserProfileController.php): `app/Http/Controllers/UserProfileController.php`

### Other components

- **Bank customer**

## Connections

- Bank customer → Web routes: requests pages (evidence: `README.md`)
- Web routes → Accounts handler: routes to (evidence: `routes/web.php`)
- Web routes → Dashboard handler: routes to (evidence: `routes/web.php`)
- Web routes → Payments handler: routes to (evidence: `routes/web.php`)
- Web routes → Payee handler: routes to (evidence: `routes/web.php`)
- Web routes → Transaction export: routes to (evidence: `routes/web.php`)
- Web routes → Profile handler: routes to (evidence: `routes/web.php`)
- Accounts handler → Account pages: renders (evidence: `app/Http/Controllers/AccountsController.php`)
- Dashboard handler → Dashboard page: renders
- Payments handler → Payment pages: renders (evidence: `app/Http/Controllers/PaymentsController.php`)
- Profile handler → Profile page: renders (evidence: `app/Http/Controllers/UserProfileController.php`)
- Accounts handler → Account aggregate: records operations (evidence: `app/Http/Controllers/AccountsController.php`)
- Accounts handler → Account model: loads account (evidence: `app/Http/Controllers/AccountsController.php`)
- Accounts handler → Transaction resource: formats activity (evidence: `app/Http/Controllers/AccountsController.php`)
- Account aggregate → Account events: emits events (evidence: `app/Domain/Accounts/Aggregates/AccountAggregate.php`)
- Account model → Transaction records: relates activity (evidence: `app/Domain/Accounts/Models/Account.php`)
- Dashboard handler → Account model: loads accounts (evidence: `app/Http/Controllers/DashboardController.php`)
- Dashboard handler → Transaction records: loads activity (evidence: `app/Http/Controllers/DashboardController.php`)
- Dashboard handler → Transaction resource: formats activity (evidence: `app/Http/Controllers/DashboardController.php`)
- Transaction export → Transaction records: exports records (evidence: `app/Http/Controllers/TransactionsExportController.php`)
- Payments handler → Payment aggregate: records payment (evidence: `app/Http/Controllers/PaymentsController.php`)
- Payment aggregate → Payment events: emits event (evidence: `app/Domain/Payments/Aggregates/PaymentAggregate.php`)
- Payments handler → User model: loads user data (evidence: `app/Http/Controllers/PaymentsController.php`)
- Payee handler → Payee model: manages payees (evidence: `app/Http/Controllers/PayeesController.php`)
- User model → Account model: relates accounts (evidence: `app/Domain/Users/Models/User.php`)
- User model → Transaction records: relates activity (evidence: `app/Domain/Users/Models/User.php`)
- User model → Payee model: relates payees (evidence: `app/Domain/Users/Models/User.php`)
- User model → Payment model: relates payments (evidence: `app/Domain/Users/Models/User.php`)
- Authentication handlers → User model: authenticates
- Profile handler → User model: updates profile (evidence: `app/Http/Controllers/UserProfileController.php`)
- Account projectors → Account model: projects state
- Payment projector → Payment model: projects state
