# samkmv/fireball_cms architecture

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

- Interactive diagram: https://gitdiagram.com/samkmv/fireball_cms
- Repository: https://github.com/samkmv/fireball_cms

## Overview

FIREBALL CMS is an extensible PHP content-management platform. A visitor request is routed to a page, post, or search controller, which produces a themed response; administrators use parallel routes to manage content and site capabilities. The repository also contains a block editor, chat, analytics, notifications, PWA support, and independently booted plugins. The graph follows documented routes and capabilities and the sampled runtime code; unsampled subsystem internals and some controller-to-model wiring are intentionally not expanded.

Main entry points: [`core/Router.php`](https://github.com/samkmv/fireball_cms/blob/main/core/Router.php) (Router), [`core/Plugins/PluginManager.php`](https://github.com/samkmv/fireball_cms/blob/main/core/Plugins/PluginManager.php) (Plugin manager), [`core/Database.php`](https://github.com/samkmv/fireball_cms/blob/main/core/Database.php) (Database), [`core/Application.php`](https://github.com/samkmv/fireball_cms/blob/main/core/Application.php) (Application)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Request and runtime"]
  node_application["Application<br/>[Application.php]"]
  node_router["Router<br/>[Router.php]"]
  node_routes["Route definitions<br/>[routes.php]"]
  node_database[("Database<br/>[Database.php]")]
end

subgraph group_content["Content and presentation"]
  node_home["Home pages<br/>[HomeController.php]"]
  node_pages["Pages"]
  node_posts["Posts"]
  node_search["Search"]
  node_content_models["Content models<br/>[Post.php]"]
  node_theme_manager["Theme system<br/>[ThemeManager.php]"]
  node_theme_views["Default theme views<br/>[index.php]"]
  node_block_editor["Block editor"]
end

subgraph group_admin["Administration"]
  node_admin["Admin workflows"]
  node_file_manager["File manager"]
  node_file_model["File operations<br/>[FileManager.php]"]
end

subgraph group_platform["Platform services"]
  node_chat["Chat<br/>[ChatController.php]"]
  node_chat_messages["Chat messages<br/>[ChatMessage.php]"]
  node_analytics["Analytics"]
  node_notifications["Notifications"]
  node_pwa["PWA and push<br/>[PwaService.php]"]
end

subgraph group_extensions["Extensions"]
  node_plugin_manager["Plugin manager<br/>[PluginManager.php]"]
  node_plugin_routes["Plugin routes<br/>[routes.php]"]
  node_subscriptions["Subscriptions plugin"]
  node_calendar["Calendar plugin<br/>[Plugin.php]"]
  node_camera["Camera manager<br/>[Plugin.php]"]
  node_rental["Toy car rental<br/>[Plugin.php]"]
  node_vpn["VPN management<br/>[Plugin.php]"]
end

node_visitor(("Visitor"))
node_admin_user(("Administrator"))

node_visitor -->|"requests"| node_application
node_admin_user -->|"requests"| node_application
node_application -->|"dispatches"| node_router
node_routes -->|"registers routes"| node_router
node_router -->|"dispatches"| node_home
node_router -->|"dispatches"| node_pages
node_router -->|"dispatches"| node_posts
node_router -->|"dispatches"| node_search
node_router -->|"dispatches"| node_admin
node_router -->|"dispatches"| node_file_manager
node_router -->|"dispatches"| node_chat
node_home -->|"renders through"| node_theme_manager
node_pages -->|"renders through"| node_theme_manager
node_posts -->|"renders through"| node_theme_manager
node_theme_manager -->|"renders templates"| node_theme_views
node_posts -->|"loads content"| node_content_models
node_pages -->|"reads content"| node_database
node_search -->|"queries index"| node_database
node_admin -->|"manages content"| node_content_models
node_admin -->|"reads and writes"| node_database
node_file_manager -->|"manages files"| node_file_model
node_block_editor -->|"persists blocks"| node_database
node_chat -->|"handles messages"| node_chat_messages
node_chat -->|"reads and writes"| node_database
node_analytics -->|"stores analytics"| node_database
node_pwa -->|"delivers push"| node_notifications
node_notifications -->|"stores notifications"| node_database
node_application -->|"boots plugins"| node_plugin_manager
node_plugin_manager -->|"registers plugin routes"| node_plugin_routes
node_plugin_routes -->|"dispatches"| node_subscriptions
node_plugin_manager -->|"boots active plugin"| node_calendar
node_plugin_manager -->|"boots active plugin"| node_camera
node_plugin_manager -->|"boots active plugin"| node_rental
node_plugin_manager -->|"boots active plugin"| node_vpn

click node_application "https://github.com/samkmv/fireball_cms/blob/main/core/Application.php"
click node_router "https://github.com/samkmv/fireball_cms/blob/main/core/Router.php"
click node_routes "https://github.com/samkmv/fireball_cms/blob/main/config/routes.php"
click node_home "https://github.com/samkmv/fireball_cms/blob/main/app/Controllers/HomeController.php"
click node_pages "https://github.com/samkmv/fireball_cms/blob/main/app/Controllers/PagesController.php"
click node_posts "https://github.com/samkmv/fireball_cms/blob/main/app/Controllers/PostsController.php"
click node_search "https://github.com/samkmv/fireball_cms/blob/main/app/Controllers/SearchController.php"
click node_content_models "https://github.com/samkmv/fireball_cms/blob/main/app/Models/Post.php"
click node_theme_manager "https://github.com/samkmv/fireball_cms/blob/main/core/ThemeManager.php"
click node_theme_views "https://github.com/samkmv/fireball_cms/blob/main/app/Views/themes/default/home/index.php"
click node_admin "https://github.com/samkmv/fireball_cms/blob/main/app/Controllers/AdminController.php"
click node_file_manager "https://github.com/samkmv/fireball_cms/blob/main/app/Controllers/FileManagerController.php"
click node_file_model "https://github.com/samkmv/fireball_cms/blob/main/app/Models/FileManager.php"
click node_block_editor "https://github.com/samkmv/fireball_cms/blob/main/app/Modules/BlockEditor/BlockEditorController.php"
click node_chat "https://github.com/samkmv/fireball_cms/blob/main/app/Controllers/ChatController.php"
click node_chat_messages "https://github.com/samkmv/fireball_cms/blob/main/app/Models/ChatMessage.php"
click node_analytics "https://github.com/samkmv/fireball_cms/blob/main/app/Services/AnalyticsService.php"
click node_notifications "https://github.com/samkmv/fireball_cms/blob/main/app/Services/NotificationService.php"
click node_pwa "https://github.com/samkmv/fireball_cms/blob/main/app/Services/PwaService.php"
click node_database "https://github.com/samkmv/fireball_cms/blob/main/core/Database.php"
click node_plugin_manager "https://github.com/samkmv/fireball_cms/blob/main/core/Plugins/PluginManager.php"
click node_plugin_routes "https://github.com/samkmv/fireball_cms/blob/main/plugins/subscriptions/routes.php"
click node_subscriptions "https://github.com/samkmv/fireball_cms/blob/main/plugins/subscriptions/src/Controllers/PublicController.php"
click node_calendar "https://github.com/samkmv/fireball_cms/blob/main/plugins/calendar/Plugin.php"
click node_camera "https://github.com/samkmv/fireball_cms/blob/main/plugins/camera-manager/Plugin.php"
click node_rental "https://github.com/samkmv/fireball_cms/blob/main/plugins/toy-car-rental/Plugin.php"
click node_vpn "https://github.com/samkmv/fireball_cms/blob/main/plugins/vpn-manager-v2/Plugin.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_application,node_router,node_routes,node_database toneBlue
class node_home,node_pages,node_posts,node_search,node_content_models,node_theme_manager,node_theme_views,node_block_editor toneAmber
class node_admin,node_file_manager,node_file_model toneMint
class node_chat,node_chat_messages,node_analytics,node_notifications,node_pwa toneRose
class node_plugin_manager,node_plugin_routes,node_subscriptions,node_calendar,node_camera,node_rental,node_vpn,node_visitor,node_admin_user toneIndigo
```

## Components

### Request and runtime

- [Application](https://github.com/samkmv/fireball_cms/blob/main/core/Application.php): `core/Application.php`
- [Router](https://github.com/samkmv/fireball_cms/blob/main/core/Router.php): `core/Router.php`
- [Route definitions](https://github.com/samkmv/fireball_cms/blob/main/config/routes.php): `config/routes.php`
- [Database](https://github.com/samkmv/fireball_cms/blob/main/core/Database.php): `core/Database.php`

### Content and presentation

- [Home pages](https://github.com/samkmv/fireball_cms/blob/main/app/Controllers/HomeController.php): `app/Controllers/HomeController.php`
- [Pages](https://github.com/samkmv/fireball_cms/blob/main/app/Controllers/PagesController.php): `app/Controllers/PagesController.php`
- [Posts](https://github.com/samkmv/fireball_cms/blob/main/app/Controllers/PostsController.php): `app/Controllers/PostsController.php`
- [Search](https://github.com/samkmv/fireball_cms/blob/main/app/Controllers/SearchController.php): `app/Controllers/SearchController.php`
- [Content models](https://github.com/samkmv/fireball_cms/blob/main/app/Models/Post.php): `app/Models/Post.php`
- [Theme system](https://github.com/samkmv/fireball_cms/blob/main/core/ThemeManager.php): `core/ThemeManager.php`
- [Default theme views](https://github.com/samkmv/fireball_cms/blob/main/app/Views/themes/default/home/index.php): `app/Views/themes/default/home/index.php`
- [Block editor](https://github.com/samkmv/fireball_cms/blob/main/app/Modules/BlockEditor/BlockEditorController.php): `app/Modules/BlockEditor/BlockEditorController.php`

### Administration

- [Admin workflows](https://github.com/samkmv/fireball_cms/blob/main/app/Controllers/AdminController.php): `app/Controllers/AdminController.php`
- [File manager](https://github.com/samkmv/fireball_cms/blob/main/app/Controllers/FileManagerController.php): `app/Controllers/FileManagerController.php`
- [File operations](https://github.com/samkmv/fireball_cms/blob/main/app/Models/FileManager.php): `app/Models/FileManager.php`

### Platform services

- [Chat](https://github.com/samkmv/fireball_cms/blob/main/app/Controllers/ChatController.php): `app/Controllers/ChatController.php`
- [Chat messages](https://github.com/samkmv/fireball_cms/blob/main/app/Models/ChatMessage.php): `app/Models/ChatMessage.php`
- [Analytics](https://github.com/samkmv/fireball_cms/blob/main/app/Services/AnalyticsService.php): `app/Services/AnalyticsService.php`
- [Notifications](https://github.com/samkmv/fireball_cms/blob/main/app/Services/NotificationService.php): `app/Services/NotificationService.php`
- [PWA and push](https://github.com/samkmv/fireball_cms/blob/main/app/Services/PwaService.php): `app/Services/PwaService.php`

### Extensions

- [Plugin manager](https://github.com/samkmv/fireball_cms/blob/main/core/Plugins/PluginManager.php): `core/Plugins/PluginManager.php`
- [Plugin routes](https://github.com/samkmv/fireball_cms/blob/main/plugins/subscriptions/routes.php): `plugins/subscriptions/routes.php`
- [Subscriptions plugin](https://github.com/samkmv/fireball_cms/blob/main/plugins/subscriptions/src/Controllers/PublicController.php): `plugins/subscriptions/src/Controllers/PublicController.php`
- [Calendar plugin](https://github.com/samkmv/fireball_cms/blob/main/plugins/calendar/Plugin.php): `plugins/calendar/Plugin.php`
- [Camera manager](https://github.com/samkmv/fireball_cms/blob/main/plugins/camera-manager/Plugin.php): `plugins/camera-manager/Plugin.php`
- [Toy car rental](https://github.com/samkmv/fireball_cms/blob/main/plugins/toy-car-rental/Plugin.php): `plugins/toy-car-rental/Plugin.php`
- [VPN management](https://github.com/samkmv/fireball_cms/blob/main/plugins/vpn-manager-v2/Plugin.php): `plugins/vpn-manager-v2/Plugin.php`

### Other components

- **Visitor**
- **Administrator**

## Connections

- Visitor → Application: requests
- Administrator → Application: requests
- Application → Router: dispatches
- Route definitions → Router: registers routes
- Router → Home pages: dispatches
- Router → Pages: dispatches
- Router → Posts: dispatches
- Router → Search: dispatches
- Router → Admin workflows: dispatches
- Router → File manager: dispatches
- Router → Chat: dispatches
- Home pages → Theme system: renders through
- Pages → Theme system: renders through
- Posts → Theme system: renders through
- Theme system → Default theme views: renders templates
- Posts → Content models: loads content
- Pages → Database: reads content
- Search → Database: queries index
- Admin workflows → Content models: manages content
- Admin workflows → Database: reads and writes
- File manager → File operations: manages files
- Block editor → Database: persists blocks
- Chat → Chat messages: handles messages
- Chat → Database: reads and writes
- Analytics → Database: stores analytics
- PWA and push → Notifications: delivers push
- Notifications → Database: stores notifications
- Application → Plugin manager: boots plugins
- Plugin manager → Plugin routes: registers plugin routes
- Plugin routes → Subscriptions plugin: dispatches
- Plugin manager → Calendar plugin: boots active plugin
- Plugin manager → Camera manager: boots active plugin
- Plugin manager → Toy car rental: boots active plugin
- Plugin manager → VPN management: boots active plugin
