# emirustaoglu/novaphp architecture

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

- Interactive diagram: https://gitdiagram.com/emirustaoglu/novaphp
- Repository: https://github.com/emirustaoglu/novaphp

## Overview

NovaPhp is a PHP web framework with a small application example and a command-line interface. Its principal request path is an HTTP request entering through the public front controller, bootstrapping the application, matching a route, invoking a controller, and rendering a view. The tree also shows database access and schema/migration support, developer commands, authentication middleware, mail, logging, and language resources. Several of these subsystems are represented by paths only; their internal wiring is not established by the sampled source.

Main entry points: [`app/Console/Command.php`](https://github.com/emirustaoglu/novaphp/blob/main/app/Console/Command.php) (Command base), [`routes/web.php`](https://github.com/emirustaoglu/novaphp/blob/main/routes/web.php) (Web routes), [`core/DatabaseManager.php`](https://github.com/emirustaoglu/novaphp/blob/main/core/DatabaseManager.php) (Connection manager), [`public/index.php`](https://github.com/emirustaoglu/novaphp/blob/main/public/index.php) (Front controller)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_http["HTTP application"]
  node_front["Front controller<br/>[index.php]"]
  node_bootstrap["Application bootstrap<br/>[Bootstrap.php]"]
  node_routes["Web routes<br/>[web.php]"]
  node_middleware["Auth middleware<br/>[UserAuth.php]"]
  node_user_middleware["User middleware<br/>[UserMiddleware.php]"]
  node_home["Home controller<br/>[HomeController.php]"]
  node_controller["Controller base<br/>[Controller.php]"]
  node_view["View rendering<br/>[View.php]"]
  node_welcome["Welcome view<br/>[welcome.blade.php]"]
end

subgraph group_data["Data and schema"]
  node_db_facade["Database API<br/>[DB.php]"]
  node_db_manager["Connection manager"]
  node_query["Query builder<br/>[QueryBuilder.php]"]
  node_db_config["Database config<br/>[database.php]"]
  node_schema["Schema tools<br/>[Schema.php]"]
  node_blueprint["Schema blueprint<br/>[Blueprint.php]"]
  node_migration_manager["Migration manager"]
  node_seeds["Seed data"]
end

subgraph group_console["Console tooling"]
  node_cli["CLI entry<br/>[CLI.php]"]
  node_command["Command base<br/>[Command.php]"]
  node_make_commands["Make commands<br/>[Controller.php]"]
  node_serve_command["Serve command<br/>[Serve.php]"]
  node_migrate_command["Migration commands<br/>[Migrate.php]"]
  node_seed_command["Seed command<br/>[Seeds.php]"]
end

subgraph group_services["Framework services"]
  node_mail["Mail service<br/>[Mail.php]"]
  node_logger["Logging<br/>[Logger.php]"]
  node_logging_config["Logging config<br/>[logging.php]"]
  node_languages["Language resources<br/>[en.php]"]
  node_app_config["Application config<br/>[app.php]"]
end

node_visitor(("HTTP client"))
node_console_actor(("Developer"))
node_mailer["Mailer service"]
node_database[("SQL database")]

node_visitor -->|"requests"| node_front
node_front -->|"creates and runs"| node_bootstrap
node_front -->|"loads"| node_routes
node_routes -->|"dispatches"| node_home
node_routes -.->|"applies"| node_middleware
node_routes -.->|"applies"| node_user_middleware
node_home -->|"extends"| node_controller
node_home -->|"renders through"| node_view
node_view -->|"renders"| node_welcome
node_console_actor -->|"runs commands"| node_cli
node_cli -->|"dispatches"| node_command
node_command -->|"runs"| node_make_commands
node_command -->|"runs"| node_serve_command
node_command -->|"runs"| node_migrate_command
node_command -->|"runs"| node_seed_command
node_migrate_command -->|"runs migrations"| node_migration_manager
node_seed_command -->|"loads seeds"| node_seeds
node_migration_manager -->|"records migrations"| node_db_facade
node_db_facade -->|"uses connection"| node_db_manager
node_db_manager -->|"reads settings"| node_db_config
node_db_manager -->|"connects"| node_database
node_db_manager -->|"creates builder"| node_query
node_query -->|"queries"| node_database
node_schema -->|"defines schema"| node_blueprint
node_mail -.->|"uses"| node_mailer
node_logger -.->|"reads settings"| node_logging_config
node_bootstrap -.->|"loads settings"| node_app_config

click node_front "https://github.com/emirustaoglu/novaphp/blob/main/public/index.php"
click node_bootstrap "https://github.com/emirustaoglu/novaphp/blob/main/core/Bootstrap.php"
click node_routes "https://github.com/emirustaoglu/novaphp/blob/main/routes/web.php"
click node_middleware "https://github.com/emirustaoglu/novaphp/blob/main/app/middlewares/UserAuth.php"
click node_user_middleware "https://github.com/emirustaoglu/novaphp/blob/main/app/middlewares/UserMiddleware.php"
click node_home "https://github.com/emirustaoglu/novaphp/blob/main/app/controllers/HomeController.php"
click node_controller "https://github.com/emirustaoglu/novaphp/blob/main/core/Controller.php"
click node_view "https://github.com/emirustaoglu/novaphp/blob/main/core/View.php"
click node_welcome "https://github.com/emirustaoglu/novaphp/blob/main/resources/views/welcome.blade.php"
click node_db_facade "https://github.com/emirustaoglu/novaphp/blob/main/core/DB.php"
click node_db_manager "https://github.com/emirustaoglu/novaphp/blob/main/core/DatabaseManager.php"
click node_query "https://github.com/emirustaoglu/novaphp/blob/main/core/QueryBuilder.php"
click node_db_config "https://github.com/emirustaoglu/novaphp/blob/main/config/database.php"
click node_schema "https://github.com/emirustaoglu/novaphp/blob/main/core/Schema/Schema.php"
click node_blueprint "https://github.com/emirustaoglu/novaphp/blob/main/core/Schema/Blueprint.php"
click node_migration_manager "https://github.com/emirustaoglu/novaphp/blob/main/app/Console/DB/MigrationManager.php"
click node_seeds "https://github.com/emirustaoglu/novaphp/blob/main/database/seeds/2025_03_14_124218_exampleSeed.php"
click node_cli "https://github.com/emirustaoglu/novaphp/blob/main/app/Console/CLI.php"
click node_command "https://github.com/emirustaoglu/novaphp/blob/main/app/Console/Command.php"
click node_make_commands "https://github.com/emirustaoglu/novaphp/blob/main/app/Console/Commands/Make/Controller.php"
click node_serve_command "https://github.com/emirustaoglu/novaphp/blob/main/app/Console/Commands/Serve.php"
click node_migrate_command "https://github.com/emirustaoglu/novaphp/blob/main/app/Console/Commands/Migrate.php"
click node_seed_command "https://github.com/emirustaoglu/novaphp/blob/main/app/Console/Commands/Seeds.php"
click node_mail "https://github.com/emirustaoglu/novaphp/blob/main/core/Mail/Mail.php"
click node_logger "https://github.com/emirustaoglu/novaphp/blob/main/core/Logger.php"
click node_logging_config "https://github.com/emirustaoglu/novaphp/blob/main/config/logging.php"
click node_languages "https://github.com/emirustaoglu/novaphp/blob/main/resources/languages/en.php"
click node_app_config "https://github.com/emirustaoglu/novaphp/blob/main/config/app.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_front,node_bootstrap,node_routes,node_middleware,node_user_middleware,node_home,node_controller,node_view,node_welcome,node_visitor toneBlue
class node_db_facade,node_db_manager,node_query,node_db_config,node_schema,node_blueprint,node_migration_manager,node_seeds,node_database toneAmber
class node_cli,node_command,node_make_commands,node_serve_command,node_migrate_command,node_seed_command toneMint
class node_mail,node_logger,node_logging_config,node_languages,node_app_config toneRose
class node_console_actor,node_mailer toneIndigo
```

## Components

### HTTP application

- [Front controller](https://github.com/emirustaoglu/novaphp/blob/main/public/index.php): `public/index.php`
- [Application bootstrap](https://github.com/emirustaoglu/novaphp/blob/main/core/Bootstrap.php): `core/Bootstrap.php`
- [Web routes](https://github.com/emirustaoglu/novaphp/blob/main/routes/web.php): `routes/web.php`
- [Auth middleware](https://github.com/emirustaoglu/novaphp/blob/main/app/middlewares/UserAuth.php): `app/middlewares/UserAuth.php`
- [User middleware](https://github.com/emirustaoglu/novaphp/blob/main/app/middlewares/UserMiddleware.php): `app/middlewares/UserMiddleware.php`
- [Home controller](https://github.com/emirustaoglu/novaphp/blob/main/app/controllers/HomeController.php): `app/controllers/HomeController.php`
- [Controller base](https://github.com/emirustaoglu/novaphp/blob/main/core/Controller.php): `core/Controller.php`
- [View rendering](https://github.com/emirustaoglu/novaphp/blob/main/core/View.php): `core/View.php`
- [Welcome view](https://github.com/emirustaoglu/novaphp/blob/main/resources/views/welcome.blade.php): `resources/views/welcome.blade.php`

### Data and schema

- [Database API](https://github.com/emirustaoglu/novaphp/blob/main/core/DB.php): `core/DB.php`
- [Connection manager](https://github.com/emirustaoglu/novaphp/blob/main/core/DatabaseManager.php): `core/DatabaseManager.php`
- [Query builder](https://github.com/emirustaoglu/novaphp/blob/main/core/QueryBuilder.php): `core/QueryBuilder.php`
- [Database config](https://github.com/emirustaoglu/novaphp/blob/main/config/database.php): `config/database.php`
- [Schema tools](https://github.com/emirustaoglu/novaphp/blob/main/core/Schema/Schema.php): `core/Schema/Schema.php`
- [Schema blueprint](https://github.com/emirustaoglu/novaphp/blob/main/core/Schema/Blueprint.php): `core/Schema/Blueprint.php`
- [Migration manager](https://github.com/emirustaoglu/novaphp/blob/main/app/Console/DB/MigrationManager.php): `app/Console/DB/MigrationManager.php`
- [Seed data](https://github.com/emirustaoglu/novaphp/blob/main/database/seeds/2025_03_14_124218_exampleSeed.php): `database/seeds/2025_03_14_124218_exampleSeed.php`

### Console tooling

- [CLI entry](https://github.com/emirustaoglu/novaphp/blob/main/app/Console/CLI.php): `app/Console/CLI.php`
- [Command base](https://github.com/emirustaoglu/novaphp/blob/main/app/Console/Command.php): `app/Console/Command.php`
- [Make commands](https://github.com/emirustaoglu/novaphp/blob/main/app/Console/Commands/Make/Controller.php): `app/Console/Commands/Make/Controller.php`
- [Serve command](https://github.com/emirustaoglu/novaphp/blob/main/app/Console/Commands/Serve.php): `app/Console/Commands/Serve.php`
- [Migration commands](https://github.com/emirustaoglu/novaphp/blob/main/app/Console/Commands/Migrate.php): `app/Console/Commands/Migrate.php`
- [Seed command](https://github.com/emirustaoglu/novaphp/blob/main/app/Console/Commands/Seeds.php): `app/Console/Commands/Seeds.php`

### Framework services

- [Mail service](https://github.com/emirustaoglu/novaphp/blob/main/core/Mail/Mail.php): `core/Mail/Mail.php`
- [Logging](https://github.com/emirustaoglu/novaphp/blob/main/core/Logger.php): `core/Logger.php`
- [Logging config](https://github.com/emirustaoglu/novaphp/blob/main/config/logging.php): `config/logging.php`
- [Language resources](https://github.com/emirustaoglu/novaphp/blob/main/resources/languages/en.php): `resources/languages/en.php`
- [Application config](https://github.com/emirustaoglu/novaphp/blob/main/config/app.php): `config/app.php`

### Other components

- **HTTP client**
- **Developer**
- **Mailer service**
- **SQL database**

## Connections

- HTTP client → Front controller: requests
- Front controller → Application bootstrap: creates and runs
- Front controller → Web routes: loads
- Web routes → Home controller: dispatches
- Web routes → Auth middleware: applies
- Web routes → User middleware: applies
- Home controller → Controller base: extends
- Home controller → View rendering: renders through
- View rendering → Welcome view: renders
- Developer → CLI entry: runs commands
- CLI entry → Command base: dispatches
- Command base → Make commands: runs
- Command base → Serve command: runs
- Command base → Migration commands: runs
- Command base → Seed command: runs
- Migration commands → Migration manager: runs migrations
- Seed command → Seed data: loads seeds
- Migration manager → Database API: records migrations
- Database API → Connection manager: uses connection
- Connection manager → Database config: reads settings
- Connection manager → SQL database: connects
- Connection manager → Query builder: creates builder
- Query builder → SQL database: queries
- Schema tools → Schema blueprint: defines schema
- Mail service → Mailer service: uses
- Logging → Logging config: reads settings
- Application bootstrap → Application config: loads settings
