# chizuyu/moco architecture

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

- Interactive diagram: https://gitdiagram.com/chizuyu/moco
- Repository: https://github.com/chizuyu/moco

## Overview

Moco is a Laravel news portal with a public reading experience and a Filament CMS. Readers browse the landing page, search or filter news, open stories, and view author profiles; administrators and authors manage content, with author registration creating a user and author profile. Public controller behavior is sampled; CMS capabilities and registration details are documented in the README, but their implementation wiring was not sampled.

Main entry points: [`app/Filament/Resources`](https://github.com/chizuyu/moco/tree/main/app/Filament/Resources) (Filament Admin CMS), [`app/Http/Controllers/LandingController.php`](https://github.com/chizuyu/moco/blob/main/app/Http/Controllers/LandingController.php) (Landing Controller), [`app/Models/Author.php`](https://github.com/chizuyu/moco/blob/main/app/Models/Author.php) (Author), [`routes/web.php`](https://github.com/chizuyu/moco/blob/main/routes/web.php) (Web Routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_public["Public News Portal"]
  node_web_routes["Web Routes<br/>[web.php]"]
  node_landing["Landing Controller"]
  node_news_controller["News Controller<br/>[NewsController.php]"]
  node_author_controller["Author Controller"]
  node_landing_view["Landing Page<br/>[index.blade.php]"]
  node_news_views["News Pages<br/>[index.blade.php]"]
  node_author_view["Author Profile<br/>[show.blade.php]"]
  node_app_layout["Site Layout<br/>[app.blade.php]"]
end

subgraph group_content["News Content"]
  node_news_model["News<br/>[News.php]"]
  node_category_model["News Category<br/>[NewsCategory.php]"]
  node_banner_model["Banner<br/>[Banner.php]"]
  node_database[("Application Database")]
end

subgraph group_admin["Admin CMS"]
  node_filament["Filament Admin CMS"]
  node_author_register["Author Registration<br/>[AuthorRegister.php]"]
end

subgraph group_identity["Accounts"]
  node_author_model["Author<br/>[Author.php]"]
  node_user_model["User<br/>[User.php]"]
end

node_reader(("Reader"))
node_admin_actor(("Admin / Author"))

node_reader -->|"requests pages"| node_web_routes
node_web_routes -->|"dispatches landing"| node_landing
node_web_routes -->|"dispatches news"| node_news_controller
node_web_routes -->|"dispatches profile"| node_author_controller
node_landing -->|"queries banners"| node_banner_model
node_landing -->|"queries selections"| node_news_model
node_landing -->|"counts authors"| node_author_model
node_landing -->|"renders landing"| node_landing_view
node_news_controller -->|"searches news"| node_news_model
node_news_controller -->|"filters category"| node_category_model
node_news_controller -->|"renders news"| node_news_views
node_author_controller -->|"loads profile"| node_author_model
node_author_controller -->|"renders profile"| node_author_view
node_landing_view -->|"uses layout"| node_app_layout
node_news_views -->|"uses layout"| node_app_layout
node_author_view -->|"uses layout"| node_app_layout
node_news_model -->|"reads records"| node_database
node_category_model -->|"reads records"| node_database
node_banner_model -->|"reads records"| node_database
node_author_model -->|"reads records"| node_database
node_admin_actor -->|"manages content"| node_filament
node_filament -->|"manages news"| node_news_model
node_filament -->|"manages categories"| node_category_model
node_filament -->|"manages banners"| node_banner_model
node_filament -->|"manages authors"| node_author_model
node_filament -->|"manages users"| node_user_model
node_admin_actor -->|"registers author"| node_author_register
node_author_register -->|"creates account"| node_user_model
node_author_register -->|"creates profile"| node_author_model
node_user_model -->|"reads / writes"| node_database

click node_web_routes "https://github.com/chizuyu/moco/blob/main/routes/web.php"
click node_landing "https://github.com/chizuyu/moco/blob/main/app/Http/Controllers/LandingController.php"
click node_news_controller "https://github.com/chizuyu/moco/blob/main/app/Http/Controllers/NewsController.php"
click node_author_controller "https://github.com/chizuyu/moco/blob/main/app/Http/Controllers/AuthorController.php"
click node_landing_view "https://github.com/chizuyu/moco/blob/main/resources/views/landing/index.blade.php"
click node_news_views "https://github.com/chizuyu/moco/blob/main/resources/views/news/index.blade.php"
click node_author_view "https://github.com/chizuyu/moco/blob/main/resources/views/author/show.blade.php"
click node_app_layout "https://github.com/chizuyu/moco/blob/main/resources/views/layouts/app.blade.php"
click node_news_model "https://github.com/chizuyu/moco/blob/main/app/Models/News.php"
click node_category_model "https://github.com/chizuyu/moco/blob/main/app/Models/NewsCategory.php"
click node_banner_model "https://github.com/chizuyu/moco/blob/main/app/Models/Banner.php"
click node_author_model "https://github.com/chizuyu/moco/blob/main/app/Models/Author.php"
click node_user_model "https://github.com/chizuyu/moco/blob/main/app/Models/User.php"
click node_filament "https://github.com/chizuyu/moco/tree/main/app/Filament/Resources"
click node_author_register "https://github.com/chizuyu/moco/blob/main/app/Filament/Pages/Auth/AuthorRegister.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_landing,node_news_controller,node_author_controller,node_landing_view,node_news_views,node_author_view,node_app_layout toneBlue
class node_news_model,node_category_model,node_banner_model,node_database toneAmber
class node_filament,node_author_register toneMint
class node_author_model,node_user_model toneRose
class node_reader,node_admin_actor toneIndigo
```

## Components

### Public News Portal

- [Web Routes](https://github.com/chizuyu/moco/blob/main/routes/web.php): `routes/web.php`
- [Landing Controller](https://github.com/chizuyu/moco/blob/main/app/Http/Controllers/LandingController.php): `app/Http/Controllers/LandingController.php`
- [News Controller](https://github.com/chizuyu/moco/blob/main/app/Http/Controllers/NewsController.php): `app/Http/Controllers/NewsController.php`
- [Author Controller](https://github.com/chizuyu/moco/blob/main/app/Http/Controllers/AuthorController.php): `app/Http/Controllers/AuthorController.php`
- [Landing Page](https://github.com/chizuyu/moco/blob/main/resources/views/landing/index.blade.php): `resources/views/landing/index.blade.php`
- [News Pages](https://github.com/chizuyu/moco/blob/main/resources/views/news/index.blade.php): `resources/views/news/index.blade.php`
- [Author Profile](https://github.com/chizuyu/moco/blob/main/resources/views/author/show.blade.php): `resources/views/author/show.blade.php`
- [Site Layout](https://github.com/chizuyu/moco/blob/main/resources/views/layouts/app.blade.php): `resources/views/layouts/app.blade.php`

### News Content

- [News](https://github.com/chizuyu/moco/blob/main/app/Models/News.php): `app/Models/News.php`
- [News Category](https://github.com/chizuyu/moco/blob/main/app/Models/NewsCategory.php): `app/Models/NewsCategory.php`
- [Banner](https://github.com/chizuyu/moco/blob/main/app/Models/Banner.php): `app/Models/Banner.php`
- **Application Database**

### Admin CMS

- [Filament Admin CMS](https://github.com/chizuyu/moco/tree/main/app/Filament/Resources): `app/Filament/Resources`
- [Author Registration](https://github.com/chizuyu/moco/blob/main/app/Filament/Pages/Auth/AuthorRegister.php): `app/Filament/Pages/Auth/AuthorRegister.php`

### Accounts

- [Author](https://github.com/chizuyu/moco/blob/main/app/Models/Author.php): `app/Models/Author.php`
- [User](https://github.com/chizuyu/moco/blob/main/app/Models/User.php): `app/Models/User.php`

### Other components

- **Reader**
- **Admin / Author**

## Connections

- Reader → Web Routes: requests pages
- Web Routes → Landing Controller: dispatches landing
- Web Routes → News Controller: dispatches news
- Web Routes → Author Controller: dispatches profile
- Landing Controller → Banner: queries banners
- Landing Controller → News: queries selections
- Landing Controller → Author: counts authors
- Landing Controller → Landing Page: renders landing
- News Controller → News: searches news
- News Controller → News Category: filters category
- News Controller → News Pages: renders news
- Author Controller → Author: loads profile
- Author Controller → Author Profile: renders profile
- Landing Page → Site Layout: uses layout
- News Pages → Site Layout: uses layout
- Author Profile → Site Layout: uses layout
- News → Application Database: reads records
- News Category → Application Database: reads records
- Banner → Application Database: reads records
- Author → Application Database: reads records
- Admin / Author → Filament Admin CMS: manages content
- Filament Admin CMS → News: manages news
- Filament Admin CMS → News Category: manages categories
- Filament Admin CMS → Banner: manages banners
- Filament Admin CMS → Author: manages authors
- Filament Admin CMS → User: manages users
- Admin / Author → Author Registration: registers author
- Author Registration → User: creates account
- Author Registration → Author: creates profile
- User → Application Database: reads / writes
