# aghyadallogie/briefintable architecture

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

- Interactive diagram: https://gitdiagram.com/aghyadallogie/briefintable
- Repository: https://github.com/aghyadallogie/briefintable

## Overview

Briefintable is a Laravel/Statamic app for reading published briefings and letting authorized users create and manage their own drafts. Public requests enter through the web routes: the landing and paginated-list controllers query the shared Briefings rules and use versioned caching; Statamic serves individual briefing pages. Authenticated users can browse, inspect, edit, and delete their own drafts, while a Livewire form creates or updates entries. Statamic supplies the entries and control panel; event hooks refresh public caches when published content changes. The tree omits the documented Antlers briefing templates and blueprint, so those are not modeled as repository nodes.

Main entry points: [`routes/web.php`](https://github.com/aghyadallogie/briefintable/blob/main/routes/web.php) (Web routes), [`app/Livewire/BriefingForm.php`](https://github.com/aghyadallogie/briefintable/blob/main/app/Livewire/BriefingForm.php) (Briefing form), [`app/Http/Controllers/HomeController.php`](https://github.com/aghyadallogie/briefintable/blob/main/app/Http/Controllers/HomeController.php) (Landing handler), [`app/Http/Controllers/DeleteDraftController.php`](https://github.com/aghyadallogie/briefintable/blob/main/app/Http/Controllers/DeleteDraftController.php) (Draft deletion)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entrypoints["Web entrypoints"]
  node_routes["Web routes<br/>[web.php]"]
end

subgraph group_reading["Public reading"]
  node_home["Landing handler<br/>[HomeController.php]"]
  node_listing["Briefing list handler"]
  node_single["Single briefing page<br/>[routes.php]"]
  node_landingview["Landing page<br/>[landing.blade.php]"]
end

subgraph group_writing["Draft workflows"]
  node_draftlist["My drafts handler"]
  node_draftview["Draft detail handler"]
  node_delete["Draft deletion"]
  node_form["Briefing form<br/>[BriefingForm.php]"]
  node_draftlistview["Draft list view<br/>[index.blade.php]"]
end

subgraph group_domain["Briefing rules"]
  node_briefings["Briefing queries<br/>[Briefings.php]"]
  node_slugs["Slug rules<br/>[BriefingSlugs.php]"]
  node_ownership["Draft ownership<br/>[OwnDrafts.php]"]
  node_draftstate["Draft state<br/>[DraftState.php]"]
  node_cache["Versioned cache<br/>[BriefingsCache.php]"]
end

subgraph group_platform["Statamic platform"]
  node_hooks["Entry event hooks"]
  node_login["Login redirect"]
  node_statamic[("Statamic entries and CP")]
  node_cache_store[("Laravel cache store")]
end

node_reader(("Reader"))
node_writer(("Signed-in writer"))

node_reader -->|"requests pages"| node_routes
node_writer -->|"requests drafts"| node_routes
node_routes -->|"dispatches"| node_home
node_routes -->|"dispatches"| node_listing
node_routes -->|"dispatches"| node_draftlist
node_routes -->|"dispatches"| node_draftview
node_routes -->|"dispatches"| node_delete
node_routes -->|"dispatches"| node_form
node_home -->|"queries"| node_briefings
node_home -->|"reads cache"| node_cache
node_home -->|"renders"| node_landingview
node_listing -->|"queries"| node_briefings
node_listing -->|"reads cache"| node_cache
node_single -.->|"renders entry"| node_statamic
node_draftlist -->|"queries drafts"| node_briefings
node_draftlist -.->|"renders"| node_draftlistview
node_draftview -->|"checks owner"| node_ownership
node_draftview -->|"checks status"| node_draftstate
node_delete -->|"locks and checks"| node_ownership
node_delete -->|"checks status"| node_draftstate
node_delete -->|"deletes entry"| node_statamic
node_form -->|"checks permissions"| node_briefings
node_form -->|"chooses slug"| node_slugs
node_form -->|"checks edits"| node_ownership
node_form -->|"checks status"| node_draftstate
node_form -->|"saves entries"| node_statamic
node_statamic -.->|"emits entry events"| node_hooks
node_hooks -->|"bumps version"| node_cache
node_cache -.->|"reads and writes"| node_cache_store
node_hooks -->|"binds controller"| node_login
node_login -.->|"redirects after login"| node_routes

click node_routes "https://github.com/aghyadallogie/briefintable/blob/main/routes/web.php"
click node_home "https://github.com/aghyadallogie/briefintable/blob/main/app/Http/Controllers/HomeController.php"
click node_listing "https://github.com/aghyadallogie/briefintable/blob/main/app/Http/Controllers/BriefingController.php"
click node_single "https://github.com/aghyadallogie/briefintable/blob/main/config/statamic/routes.php"
click node_landingview "https://github.com/aghyadallogie/briefintable/blob/main/resources/views/landing.blade.php"
click node_draftlist "https://github.com/aghyadallogie/briefintable/blob/main/app/Http/Controllers/MyDraftsController.php"
click node_draftview "https://github.com/aghyadallogie/briefintable/blob/main/app/Http/Controllers/ShowDraftController.php"
click node_delete "https://github.com/aghyadallogie/briefintable/blob/main/app/Http/Controllers/DeleteDraftController.php"
click node_form "https://github.com/aghyadallogie/briefintable/blob/main/app/Livewire/BriefingForm.php"
click node_draftlistview "https://github.com/aghyadallogie/briefintable/blob/main/resources/views/drafts/index.blade.php"
click node_briefings "https://github.com/aghyadallogie/briefintable/blob/main/app/Support/Briefings.php"
click node_slugs "https://github.com/aghyadallogie/briefintable/blob/main/app/Support/BriefingSlugs.php"
click node_ownership "https://github.com/aghyadallogie/briefintable/blob/main/app/Support/OwnDrafts.php"
click node_draftstate "https://github.com/aghyadallogie/briefintable/blob/main/app/Support/DraftState.php"
click node_cache "https://github.com/aghyadallogie/briefintable/blob/main/app/Support/BriefingsCache.php"
click node_hooks "https://github.com/aghyadallogie/briefintable/blob/main/app/Providers/AppServiceProvider.php"
click node_login "https://github.com/aghyadallogie/briefintable/blob/main/app/Http/Controllers/Auth/LoginController.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 toneBlue
class node_home,node_listing,node_single,node_landingview toneAmber
class node_draftlist,node_draftview,node_delete,node_form,node_draftlistview toneMint
class node_briefings,node_slugs,node_ownership,node_draftstate,node_cache toneRose
class node_hooks,node_login,node_statamic,node_cache_store,node_reader,node_writer toneIndigo
```

## Components

### Web entrypoints

- [Web routes](https://github.com/aghyadallogie/briefintable/blob/main/routes/web.php): `routes/web.php`

### Public reading

- [Landing handler](https://github.com/aghyadallogie/briefintable/blob/main/app/Http/Controllers/HomeController.php): `app/Http/Controllers/HomeController.php`
- [Briefing list handler](https://github.com/aghyadallogie/briefintable/blob/main/app/Http/Controllers/BriefingController.php): `app/Http/Controllers/BriefingController.php`
- [Single briefing page](https://github.com/aghyadallogie/briefintable/blob/main/config/statamic/routes.php): `config/statamic/routes.php`
- [Landing page](https://github.com/aghyadallogie/briefintable/blob/main/resources/views/landing.blade.php): `resources/views/landing.blade.php`

### Draft workflows

- [My drafts handler](https://github.com/aghyadallogie/briefintable/blob/main/app/Http/Controllers/MyDraftsController.php): `app/Http/Controllers/MyDraftsController.php`
- [Draft detail handler](https://github.com/aghyadallogie/briefintable/blob/main/app/Http/Controllers/ShowDraftController.php): `app/Http/Controllers/ShowDraftController.php`
- [Draft deletion](https://github.com/aghyadallogie/briefintable/blob/main/app/Http/Controllers/DeleteDraftController.php): `app/Http/Controllers/DeleteDraftController.php`
- [Briefing form](https://github.com/aghyadallogie/briefintable/blob/main/app/Livewire/BriefingForm.php): `app/Livewire/BriefingForm.php`
- [Draft list view](https://github.com/aghyadallogie/briefintable/blob/main/resources/views/drafts/index.blade.php): `resources/views/drafts/index.blade.php`

### Briefing rules

- [Briefing queries](https://github.com/aghyadallogie/briefintable/blob/main/app/Support/Briefings.php): `app/Support/Briefings.php`
- [Slug rules](https://github.com/aghyadallogie/briefintable/blob/main/app/Support/BriefingSlugs.php): `app/Support/BriefingSlugs.php`
- [Draft ownership](https://github.com/aghyadallogie/briefintable/blob/main/app/Support/OwnDrafts.php): `app/Support/OwnDrafts.php`
- [Draft state](https://github.com/aghyadallogie/briefintable/blob/main/app/Support/DraftState.php): `app/Support/DraftState.php`
- [Versioned cache](https://github.com/aghyadallogie/briefintable/blob/main/app/Support/BriefingsCache.php): `app/Support/BriefingsCache.php`

### Statamic platform

- [Entry event hooks](https://github.com/aghyadallogie/briefintable/blob/main/app/Providers/AppServiceProvider.php): `app/Providers/AppServiceProvider.php`
- [Login redirect](https://github.com/aghyadallogie/briefintable/blob/main/app/Http/Controllers/Auth/LoginController.php): `app/Http/Controllers/Auth/LoginController.php`
- **Statamic entries and CP**
- **Laravel cache store**

### Other components

- **Reader**
- **Signed-in writer**

## Connections

- Reader → Web routes: requests pages (evidence: `routes/web.php`)
- Signed-in writer → Web routes: requests drafts (evidence: `routes/web.php`)
- Web routes → Landing handler: dispatches (evidence: `routes/web.php`)
- Web routes → Briefing list handler: dispatches (evidence: `routes/web.php`)
- Web routes → My drafts handler: dispatches (evidence: `routes/web.php`)
- Web routes → Draft detail handler: dispatches (evidence: `routes/web.php`)
- Web routes → Draft deletion: dispatches (evidence: `routes/web.php`)
- Web routes → Briefing form: dispatches (evidence: `routes/web.php`)
- Landing handler → Briefing queries: queries (evidence: `app/Http/Controllers/HomeController.php`)
- Landing handler → Versioned cache: reads cache (evidence: `app/Http/Controllers/HomeController.php`)
- Landing handler → Landing page: renders (evidence: `app/Http/Controllers/HomeController.php`)
- Briefing list handler → Briefing queries: queries (evidence: `app/Http/Controllers/BriefingController.php`)
- Briefing list handler → Versioned cache: reads cache (evidence: `app/Http/Controllers/BriefingController.php`)
- Single briefing page → Statamic entries and CP: renders entry (evidence: `README.md`)
- My drafts handler → Briefing queries: queries drafts (evidence: `app/Http/Controllers/MyDraftsController.php`)
- My drafts handler → Draft list view: renders (evidence: `README.md`)
- Draft detail handler → Draft ownership: checks owner (evidence: `app/Http/Controllers/ShowDraftController.php`)
- Draft detail handler → Draft state: checks status (evidence: `app/Http/Controllers/ShowDraftController.php`)
- Draft deletion → Draft ownership: locks and checks (evidence: `app/Http/Controllers/DeleteDraftController.php`)
- Draft deletion → Draft state: checks status (evidence: `app/Http/Controllers/DeleteDraftController.php`)
- Draft deletion → Statamic entries and CP: deletes entry (evidence: `app/Http/Controllers/DeleteDraftController.php`)
- Briefing form → Briefing queries: checks permissions (evidence: `app/Livewire/BriefingForm.php`)
- Briefing form → Slug rules: chooses slug (evidence: `app/Livewire/BriefingForm.php`)
- Briefing form → Draft ownership: checks edits (evidence: `app/Livewire/BriefingForm.php`)
- Briefing form → Draft state: checks status (evidence: `app/Livewire/BriefingForm.php`)
- Briefing form → Statamic entries and CP: saves entries (evidence: `app/Livewire/BriefingForm.php`)
- Statamic entries and CP → Entry event hooks: emits entry events (evidence: `README.md`)
- Entry event hooks → Versioned cache: bumps version (evidence: `app/Providers/AppServiceProvider.php`)
- Versioned cache → Laravel cache store: reads and writes (evidence: `README.md`)
- Entry event hooks → Login redirect: binds controller (evidence: `app/Providers/AppServiceProvider.php`)
- Login redirect → Web routes: redirects after login (evidence: `README.md`)
