# naofalinho/akatsuki architecture

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

- Interactive diagram: https://gitdiagram.com/naofalinho/akatsuki
- Repository: https://github.com/naofalinho/akatsuki

## Overview

This repository is a Laravel/Livewire storefront and administration application, with customer accounts and job-offer pages alongside product and order management. The visible registration flow configures Fortify to use a custom user-creation action, which validates profile fields and creates a user. The tree also indicates catalog, favorites, checkout, order history, job applications, and admin capabilities. Relationships are limited to those shown in excerpts or the source index; route wiring and most page implementations were not sampled.

Main entry points: [`app/Models/User.php`](https://github.com/naofalinho/akatsuki/blob/main/app/Models/User.php) (User model), [`app/Actions/Fortify/CreateNewUser.php`](https://github.com/naofalinho/akatsuki/blob/main/app/Actions/Fortify/CreateNewUser.php) (User registration), [`app/Providers/FortifyServiceProvider.php`](https://github.com/naofalinho/akatsuki/blob/main/app/Providers/FortifyServiceProvider.php) (Fortify configuration), [`app/Models/Order.php`](https://github.com/naofalinho/akatsuki/blob/main/app/Models/Order.php) (Order model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_accounts["Accounts and access"]
  node_fortify["Fortify configuration"]
  node_registration["User registration<br/>[CreateNewUser.php]"]
  node_profile_rules["Profile validation"]
  node_account_pages["Account and settings"]
end

subgraph group_store["Storefront and orders"]
  node_catalog["Product catalog"]
  node_product_pages["Product pages"]
  node_cart_checkout["Cart and checkout"]
  node_order_pages["Order pages"]
  node_favorites["Favorites<br/>[⚡favoris.blade.php]"]
end

subgraph group_jobs["Job offers"]
  node_job_pages["Job listings and applications"]
end

subgraph group_admin["Administration"]
  node_admin_pages["Admin product and stock"]
  node_client_list["Client management<br/>[⚡clients.blade.php]"]
  node_client_detail["Client details"]
  node_notifications["Admin notifications<br/>[Notifications.php]"]
  node_admin_guard["Admin middleware"]
end

subgraph group_domain["Domain and application"]
  node_product_model["Product model<br/>[Product.php]"]
  node_order_model["Order model<br/>[Order.php]"]
  node_order_item["Order items<br/>[OrderItem.php]"]
  node_user_model["User model<br/>[User.php]"]
  node_job_offer["Job offer model<br/>[JobOffer.php]"]
  node_job_application["Job application model<br/>[JobApplication.php]"]
  node_app_defaults["Application defaults"]
end

node_customer(("Customer"))

node_fortify -->|"configures creation"| node_registration
node_registration -->|"uses validation"| node_profile_rules
node_registration -->|"creates user"| node_user_model
node_customer -.->|"registers"| node_fortify
node_client_list -->|"queries clients"| node_user_model
node_client_detail -->|"loads client"| node_user_model
node_user_model -->|"has many orders"| node_order_model
node_order_model -->|"has many items"| node_order_item
node_notifications -->|"reads notifications"| node_user_model
node_admin_guard -.->|"checks admin role"| node_user_model

click node_fortify "https://github.com/naofalinho/akatsuki/blob/main/app/Providers/FortifyServiceProvider.php"
click node_registration "https://github.com/naofalinho/akatsuki/blob/main/app/Actions/Fortify/CreateNewUser.php"
click node_profile_rules "https://github.com/naofalinho/akatsuki/blob/main/app/Concerns/ProfileValidationRules.php"
click node_account_pages "https://github.com/naofalinho/akatsuki/tree/main/resources/views/pages/settings"
click node_catalog "https://github.com/naofalinho/akatsuki/blob/main/resources/views/pages/%E2%9A%A1catalogue.blade.php"
click node_product_pages "https://github.com/naofalinho/akatsuki/tree/main/resources/views/pages"
click node_cart_checkout "https://github.com/naofalinho/akatsuki/blob/main/resources/views/pages/%E2%9A%A1commande.blade.php"
click node_order_pages "https://github.com/naofalinho/akatsuki/blob/main/resources/views/pages/%E2%9A%A1mes-commandes.blade.php"
click node_favorites "https://github.com/naofalinho/akatsuki/blob/main/resources/views/pages/%E2%9A%A1favoris.blade.php"
click node_product_model "https://github.com/naofalinho/akatsuki/blob/main/app/Models/Product.php"
click node_order_model "https://github.com/naofalinho/akatsuki/blob/main/app/Models/Order.php"
click node_order_item "https://github.com/naofalinho/akatsuki/blob/main/app/Models/OrderItem.php"
click node_user_model "https://github.com/naofalinho/akatsuki/blob/main/app/Models/User.php"
click node_job_pages "https://github.com/naofalinho/akatsuki/blob/main/resources/views/pages/%E2%9A%A1offres-emploi.blade.php"
click node_job_offer "https://github.com/naofalinho/akatsuki/blob/main/app/Models/JobOffer.php"
click node_job_application "https://github.com/naofalinho/akatsuki/blob/main/app/Models/JobApplication.php"
click node_admin_pages "https://github.com/naofalinho/akatsuki/tree/main/resources/views/pages/admin"
click node_client_list "https://github.com/naofalinho/akatsuki/blob/main/resources/views/pages/admin/%E2%9A%A1clients.blade.php"
click node_client_detail "https://github.com/naofalinho/akatsuki/blob/main/resources/views/pages/admin/%E2%9A%A1voir-client.blade.php"
click node_notifications "https://github.com/naofalinho/akatsuki/blob/main/app/Livewire/Admin/Notifications.php"
click node_app_defaults "https://github.com/naofalinho/akatsuki/blob/main/app/Providers/AppServiceProvider.php"
click node_admin_guard "https://github.com/naofalinho/akatsuki/blob/main/app/Http/Middleware/AdminMiddleware.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_fortify,node_registration,node_profile_rules,node_account_pages toneBlue
class node_catalog,node_product_pages,node_cart_checkout,node_order_pages,node_favorites toneAmber
class node_job_pages toneMint
class node_admin_pages,node_client_list,node_client_detail,node_notifications,node_admin_guard toneRose
class node_product_model,node_order_model,node_order_item,node_user_model,node_job_offer,node_job_application,node_app_defaults,node_customer toneIndigo
```

## Components

### Accounts and access

- [Fortify configuration](https://github.com/naofalinho/akatsuki/blob/main/app/Providers/FortifyServiceProvider.php): `app/Providers/FortifyServiceProvider.php`
- [User registration](https://github.com/naofalinho/akatsuki/blob/main/app/Actions/Fortify/CreateNewUser.php): `app/Actions/Fortify/CreateNewUser.php`
- [Profile validation](https://github.com/naofalinho/akatsuki/blob/main/app/Concerns/ProfileValidationRules.php): `app/Concerns/ProfileValidationRules.php`
- [Account and settings](https://github.com/naofalinho/akatsuki/tree/main/resources/views/pages/settings): `resources/views/pages/settings`

### Storefront and orders

- [Product catalog](https://github.com/naofalinho/akatsuki/blob/main/resources/views/pages/%E2%9A%A1catalogue.blade.php): `resources/views/pages/⚡catalogue.blade.php`
- [Product pages](https://github.com/naofalinho/akatsuki/tree/main/resources/views/pages): `resources/views/pages`
- [Cart and checkout](https://github.com/naofalinho/akatsuki/blob/main/resources/views/pages/%E2%9A%A1commande.blade.php): `resources/views/pages/⚡commande.blade.php`
- [Order pages](https://github.com/naofalinho/akatsuki/blob/main/resources/views/pages/%E2%9A%A1mes-commandes.blade.php): `resources/views/pages/⚡mes-commandes.blade.php`
- [Favorites](https://github.com/naofalinho/akatsuki/blob/main/resources/views/pages/%E2%9A%A1favoris.blade.php): `resources/views/pages/⚡favoris.blade.php`

### Job offers

- [Job listings and applications](https://github.com/naofalinho/akatsuki/blob/main/resources/views/pages/%E2%9A%A1offres-emploi.blade.php): `resources/views/pages/⚡offres-emploi.blade.php`

### Administration

- [Admin product and stock](https://github.com/naofalinho/akatsuki/tree/main/resources/views/pages/admin): `resources/views/pages/admin`
- [Client management](https://github.com/naofalinho/akatsuki/blob/main/resources/views/pages/admin/%E2%9A%A1clients.blade.php): `resources/views/pages/admin/⚡clients.blade.php`
- [Client details](https://github.com/naofalinho/akatsuki/blob/main/resources/views/pages/admin/%E2%9A%A1voir-client.blade.php): `resources/views/pages/admin/⚡voir-client.blade.php`
- [Admin notifications](https://github.com/naofalinho/akatsuki/blob/main/app/Livewire/Admin/Notifications.php): `app/Livewire/Admin/Notifications.php`
- [Admin middleware](https://github.com/naofalinho/akatsuki/blob/main/app/Http/Middleware/AdminMiddleware.php): `app/Http/Middleware/AdminMiddleware.php`

### Domain and application

- [Product model](https://github.com/naofalinho/akatsuki/blob/main/app/Models/Product.php): `app/Models/Product.php`
- [Order model](https://github.com/naofalinho/akatsuki/blob/main/app/Models/Order.php): `app/Models/Order.php`
- [Order items](https://github.com/naofalinho/akatsuki/blob/main/app/Models/OrderItem.php): `app/Models/OrderItem.php`
- [User model](https://github.com/naofalinho/akatsuki/blob/main/app/Models/User.php): `app/Models/User.php`
- [Job offer model](https://github.com/naofalinho/akatsuki/blob/main/app/Models/JobOffer.php): `app/Models/JobOffer.php`
- [Job application model](https://github.com/naofalinho/akatsuki/blob/main/app/Models/JobApplication.php): `app/Models/JobApplication.php`
- [Application defaults](https://github.com/naofalinho/akatsuki/blob/main/app/Providers/AppServiceProvider.php): `app/Providers/AppServiceProvider.php`

### Other components

- **Customer**

## Connections

- Fortify configuration → User registration: configures creation (evidence: `app/Providers/FortifyServiceProvider.php`)
- User registration → Profile validation: uses validation (evidence: `app/Actions/Fortify/CreateNewUser.php`)
- User registration → User model: creates user (evidence: `app/Actions/Fortify/CreateNewUser.php`)
- Customer → Fortify configuration: registers
- Client management → User model: queries clients (evidence: `resources/views/pages/admin/⚡clients.blade.php`)
- Client details → User model: loads client (evidence: `resources/views/pages/admin/⚡voir-client.blade.php`)
- User model → Order model: has many orders (evidence: `app/Models/User.php`)
- Order model → Order items: has many items (evidence: `app/Models/Order.php`)
- Admin notifications → User model: reads notifications (evidence: `app/Livewire/Admin/Notifications.php`)
- Admin middleware → User model: checks admin role
