# ndeblauw/blaug architecture

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

- Interactive diagram: https://gitdiagram.com/ndeblauw/blaug
- Repository: https://github.com/ndeblauw/blaug

## Overview

This Laravel educational starter pack includes a small publishing application. Visitors browse articles, authors, and categories; registered users authenticate and manage their own articles and profile. The graph separates public discovery, account access, authoring, and the Eloquent domain. Edges reflect the route declarations and controller/model relationships visible in the supplied excerpts or SOURCE INDEX; unsampled view and controller relationships are omitted where they cannot be verified.

Main entry points: [`app/Models/Article.php`](https://github.com/ndeblauw/blaug/blob/main/app/Models/Article.php) (Article model), [`routes/web.php`](https://github.com/ndeblauw/blaug/blob/main/routes/web.php) (Web routes), [`app/Models/User.php`](https://github.com/ndeblauw/blaug/blob/main/app/Models/User.php) (User model), [`routes/auth.php`](https://github.com/ndeblauw/blaug/blob/main/routes/auth.php) (Auth routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_public["Public publishing"]
  node_web_routes["Web routes<br/>[web.php]"]
  node_welcome["Welcome page"]
  node_articles_public["Article browsing"]
  node_authors["Author browsing"]
  node_categories_public["Category browsing"]
end

subgraph group_identity["Accounts and access"]
  node_auth_routes["Auth routes<br/>[auth.php]"]
  node_sessions["Session access"]
  node_registration["Registration"]
  node_login_request["Login validation<br/>[LoginRequest.php]"]
  node_verification["Email verification"]
  node_verification_notice["Verification notices"]
end

subgraph group_authoring["User authoring"]
  node_userzone_routes["Userzone routes<br/>[web.php]"]
  node_article_editor["Article management"]
  node_category_editor["Category management"]
  node_dashboard["User dashboard"]
  node_profile["Profile management"]
  node_profile_request["Profile validation"]
end

subgraph group_domain["Publishing domain"]
  node_article["Article model<br/>[Article.php]"]
  node_category["Category model<br/>[Category.php]"]
  node_comment["Comment model<br/>[Comment.php]"]
  node_user["User model<br/>[User.php]"]
  node_database[("Application database<br/>[database.php]")]
end

node_visitor(("Visitor"))

node_visitor -->|"requests pages"| node_web_routes
node_web_routes -->|"routes to"| node_welcome
node_web_routes -->|"routes to"| node_articles_public
node_web_routes -->|"routes to"| node_authors
node_web_routes -->|"routes to"| node_categories_public
node_web_routes -->|"registers routes"| node_userzone_routes
node_visitor -->|"requests access"| node_auth_routes
node_auth_routes -->|"routes to"| node_sessions
node_auth_routes -->|"routes to"| node_registration
node_auth_routes -->|"routes to"| node_verification
node_auth_routes -->|"routes to"| node_verification_notice
node_sessions -->|"authenticates with"| node_login_request
node_userzone_routes -.->|"routes to"| node_article_editor
node_userzone_routes -.->|"routes to"| node_category_editor
node_userzone_routes -->|"routes to"| node_dashboard
node_userzone_routes -->|"routes to"| node_profile
node_article_editor -->|"reads and writes"| node_article
node_article_editor -->|"reads and updates"| node_category
node_article_editor -->|"reads options"| node_user
node_category_editor -->|"manages"| node_category
node_category_editor -->|"checks usage"| node_article
node_profile -->|"validates with"| node_profile_request
node_profile_request -->|"validates against"| node_user
node_registration -->|"creates account"| node_user
node_authors -->|"queries authors"| node_user
node_categories_public -->|"queries categories"| node_category
node_welcome -->|"queries articles"| node_article
node_article -->|"belongs to author"| node_user
node_article -->|"relates to"| node_category
node_article -->|"has comments"| node_comment
node_user -->|"has authored articles"| node_article

click node_web_routes "https://github.com/ndeblauw/blaug/blob/main/routes/web.php"
click node_welcome "https://github.com/ndeblauw/blaug/blob/main/app/Http/Controllers/WelcomeController.php"
click node_articles_public "https://github.com/ndeblauw/blaug/blob/main/app/Http/Controllers/ArticleController.php"
click node_authors "https://github.com/ndeblauw/blaug/blob/main/app/Http/Controllers/AuthorController.php"
click node_categories_public "https://github.com/ndeblauw/blaug/blob/main/app/Http/Controllers/CategoryController.php"
click node_auth_routes "https://github.com/ndeblauw/blaug/blob/main/routes/auth.php"
click node_sessions "https://github.com/ndeblauw/blaug/blob/main/app/Http/Controllers/Auth/AuthenticatedSessionController.php"
click node_registration "https://github.com/ndeblauw/blaug/blob/main/app/Http/Controllers/Auth/RegisteredUserController.php"
click node_login_request "https://github.com/ndeblauw/blaug/blob/main/app/Http/Requests/Auth/LoginRequest.php"
click node_verification "https://github.com/ndeblauw/blaug/blob/main/app/Http/Controllers/Auth/VerifyEmailController.php"
click node_verification_notice "https://github.com/ndeblauw/blaug/blob/main/app/Http/Controllers/Auth/EmailVerificationNotificationController.php"
click node_userzone_routes "https://github.com/ndeblauw/blaug/blob/main/routes/web.php"
click node_article_editor "https://github.com/ndeblauw/blaug/blob/main/app/Http/Controllers/Userzone/ArticleController.php"
click node_category_editor "https://github.com/ndeblauw/blaug/blob/main/app/Http/Controllers/Userzone/CategoryController.php"
click node_dashboard "https://github.com/ndeblauw/blaug/blob/main/app/Http/Controllers/Userzone/DashboardController.php"
click node_profile "https://github.com/ndeblauw/blaug/blob/main/app/Http/Controllers/Userzone/ProfileController.php"
click node_profile_request "https://github.com/ndeblauw/blaug/blob/main/app/Http/Requests/ProfileUpdateRequest.php"
click node_article "https://github.com/ndeblauw/blaug/blob/main/app/Models/Article.php"
click node_category "https://github.com/ndeblauw/blaug/blob/main/app/Models/Category.php"
click node_comment "https://github.com/ndeblauw/blaug/blob/main/app/Models/Comment.php"
click node_user "https://github.com/ndeblauw/blaug/blob/main/app/Models/User.php"
click node_database "https://github.com/ndeblauw/blaug/blob/main/config/database.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_web_routes,node_welcome,node_articles_public,node_authors,node_categories_public toneBlue
class node_auth_routes,node_sessions,node_registration,node_login_request,node_verification,node_verification_notice toneAmber
class node_userzone_routes,node_article_editor,node_category_editor,node_dashboard,node_profile,node_profile_request toneMint
class node_article,node_category,node_comment,node_user,node_database toneRose
class node_visitor toneIndigo
```

## Components

### Public publishing

- [Web routes](https://github.com/ndeblauw/blaug/blob/main/routes/web.php): `routes/web.php`
- [Welcome page](https://github.com/ndeblauw/blaug/blob/main/app/Http/Controllers/WelcomeController.php): `app/Http/Controllers/WelcomeController.php`
- [Article browsing](https://github.com/ndeblauw/blaug/blob/main/app/Http/Controllers/ArticleController.php): `app/Http/Controllers/ArticleController.php`
- [Author browsing](https://github.com/ndeblauw/blaug/blob/main/app/Http/Controllers/AuthorController.php): `app/Http/Controllers/AuthorController.php`
- [Category browsing](https://github.com/ndeblauw/blaug/blob/main/app/Http/Controllers/CategoryController.php): `app/Http/Controllers/CategoryController.php`

### Accounts and access

- [Auth routes](https://github.com/ndeblauw/blaug/blob/main/routes/auth.php): `routes/auth.php`
- [Session access](https://github.com/ndeblauw/blaug/blob/main/app/Http/Controllers/Auth/AuthenticatedSessionController.php): `app/Http/Controllers/Auth/AuthenticatedSessionController.php`
- [Registration](https://github.com/ndeblauw/blaug/blob/main/app/Http/Controllers/Auth/RegisteredUserController.php): `app/Http/Controllers/Auth/RegisteredUserController.php`
- [Login validation](https://github.com/ndeblauw/blaug/blob/main/app/Http/Requests/Auth/LoginRequest.php): `app/Http/Requests/Auth/LoginRequest.php`
- [Email verification](https://github.com/ndeblauw/blaug/blob/main/app/Http/Controllers/Auth/VerifyEmailController.php): `app/Http/Controllers/Auth/VerifyEmailController.php`
- [Verification notices](https://github.com/ndeblauw/blaug/blob/main/app/Http/Controllers/Auth/EmailVerificationNotificationController.php): `app/Http/Controllers/Auth/EmailVerificationNotificationController.php`

### User authoring

- [Userzone routes](https://github.com/ndeblauw/blaug/blob/main/routes/web.php): `routes/web.php`
- [Article management](https://github.com/ndeblauw/blaug/blob/main/app/Http/Controllers/Userzone/ArticleController.php): `app/Http/Controllers/Userzone/ArticleController.php`
- [Category management](https://github.com/ndeblauw/blaug/blob/main/app/Http/Controllers/Userzone/CategoryController.php): `app/Http/Controllers/Userzone/CategoryController.php`
- [User dashboard](https://github.com/ndeblauw/blaug/blob/main/app/Http/Controllers/Userzone/DashboardController.php): `app/Http/Controllers/Userzone/DashboardController.php`
- [Profile management](https://github.com/ndeblauw/blaug/blob/main/app/Http/Controllers/Userzone/ProfileController.php): `app/Http/Controllers/Userzone/ProfileController.php`
- [Profile validation](https://github.com/ndeblauw/blaug/blob/main/app/Http/Requests/ProfileUpdateRequest.php): `app/Http/Requests/ProfileUpdateRequest.php`

### Publishing domain

- [Article model](https://github.com/ndeblauw/blaug/blob/main/app/Models/Article.php): `app/Models/Article.php`
- [Category model](https://github.com/ndeblauw/blaug/blob/main/app/Models/Category.php): `app/Models/Category.php`
- [Comment model](https://github.com/ndeblauw/blaug/blob/main/app/Models/Comment.php): `app/Models/Comment.php`
- [User model](https://github.com/ndeblauw/blaug/blob/main/app/Models/User.php): `app/Models/User.php`
- [Application database](https://github.com/ndeblauw/blaug/blob/main/config/database.php): `config/database.php`

### Other components

- **Visitor**

## Connections

- Visitor → Web routes: requests pages (evidence: `routes/web.php`)
- Web routes → Welcome page: routes to (evidence: `routes/web.php`)
- Web routes → Article browsing: routes to (evidence: `routes/web.php`)
- Web routes → Author browsing: routes to (evidence: `routes/web.php`)
- Web routes → Category browsing: routes to (evidence: `routes/web.php`)
- Web routes → Userzone routes: registers routes (evidence: `routes/web.php`)
- Visitor → Auth routes: requests access (evidence: `routes/auth.php`)
- Auth routes → Session access: routes to (evidence: `routes/auth.php`)
- Auth routes → Registration: routes to (evidence: `routes/auth.php`)
- Auth routes → Email verification: routes to (evidence: `routes/auth.php`)
- Auth routes → Verification notices: routes to (evidence: `routes/auth.php`)
- Session access → Login validation: authenticates with (evidence: `app/Http/Controllers/Auth/AuthenticatedSessionController.php`)
- Userzone routes → Article management: routes to
- Userzone routes → Category management: routes to
- Userzone routes → User dashboard: routes to (evidence: `routes/web.php`)
- Userzone routes → Profile management: routes to (evidence: `routes/web.php`)
- Article management → Article model: reads and writes (evidence: `app/Http/Controllers/Userzone/ArticleController.php`)
- Article management → Category model: reads and updates (evidence: `app/Http/Controllers/Userzone/ArticleController.php`)
- Article management → User model: reads options (evidence: `app/Http/Controllers/Userzone/ArticleController.php`)
- Category management → Category model: manages (evidence: `app/Http/Controllers/Userzone/CategoryController.php`)
- Category management → Article model: checks usage (evidence: `app/Http/Controllers/Userzone/CategoryController.php`)
- Profile management → Profile validation: validates with (evidence: `app/Http/Controllers/Userzone/ProfileController.php`)
- Profile validation → User model: validates against (evidence: `app/Http/Requests/ProfileUpdateRequest.php`)
- Registration → User model: creates account (evidence: `app/Http/Controllers/Auth/RegisteredUserController.php`)
- Author browsing → User model: queries authors (evidence: `app/Http/Controllers/AuthorController.php`)
- Category browsing → Category model: queries categories (evidence: `app/Http/Controllers/CategoryController.php`)
- Welcome page → Article model: queries articles (evidence: `app/Http/Controllers/WelcomeController.php`)
- Article model → User model: belongs to author (evidence: `app/Models/Article.php`)
- Article model → Category model: relates to (evidence: `app/Models/Article.php`)
- Article model → Comment model: has comments (evidence: `app/Models/Article.php`)
- User model → Article model: has authored articles (evidence: `app/Models/User.php`)
