Find framework reference pages for controllers, routes, middleware, modules, database, views, and security.

Documentation

Start from what you want to build. Each path points to the exact framework pieces you need, without forcing you to read every reference page first.

I Want To Install The Framework

Start with a framework release, not the documentation website repository and not the framework GitHub source tree.

1

Download

Download the wanted version from the CorianderPHP releases page.

2

Extract the archive

Put the release contents in your application folder.

3

Remove repository-only files

If you copied from GitHub instead of a release archive, remove files such as .github, docs, AGENTS.md, LICENSE, and readme.md unless you intentionally need repository maintenance files.

4

Install PHP dependencies

Run composer install.

5

Install frontend dependencies

Run php coriander nodejs run install.

Read the full Installation guide for the complete folder and environment setup.

I Want To Create A Page

A normal page usually needs a route, a controller action, and a view.

If you are deciding where files should live, start with Recommended App Architecture.

1

Routing

Use Routing to understand how URLs reach your code.

2

Controller

Use Controllers to create the request handler.

4

Security

Use Security when the page contains a form.

Useful command when the page needs controller logic:

php coriander make:controller Blog

I Want To Create A Controller

Controllers should stay thin. They read the request, call app-owned modules or repositories, and return a response or render a view.

1

Controller reference

Read Controllers.

2

View rendering

Read Dynamic View Guide if the controller returns HTML.

3

Custom URL

Read Routing if you need custom URLs.

For API endpoints, generate an API controller:

php coriander make:controller Shelter --api

I Want To Create An API

An API usually needs route files, API controllers, validation, JSON responses, and database access.

1

Guided project

Start with the Shelter REST API guided project.

2

Routes

Use Routing for API route files.

3

Controllers

Use Controllers for API controller structure.

4

Database

Use Database when the API reads or writes persistent data.

The guided project includes a playground so you can test GET, POST, PATCH, and DELETE behavior without changing a real database.

I Want To Use A Database

Database work usually starts with a migration, then moves into repositories or modules that call SQLManager.

1

Connection and migrations

Use Database for connection, migrations, and SQLManager.

2

Query patterns

Use Database Patterns to decide between helpers, sqlScript(), repositories, SQLite, and MySQL.

3

Repository module

Use Modules to keep repository code out of controllers.

4

Expose data

Use Routing and Controllers to expose the data through pages or APIs.

Useful commands:

php coriander make:migration create_posts_table
php coriander migrate

For larger SQL queries, prefer sqlScript() so the query stays readable and reusable.

I Want Authentication Or Permissions

Authentication tells the app who the user is. Permissions decide what that user may do.

1

Middleware

Use Middleware to protect route groups.

2

Security

Use Security for CSRF and form safety.

3

Complete example

Follow the Forum permissions guided project for a complete web example.

The forum project shows guests, members, and admins using the same permission rules from views, controllers, middleware, write services, and API endpoints.

I Want To Organize Reusable Code

Use custom modules for app-owned logic that should not live in controllers or CorianderCore.

1
2

Modules

Read Modules.

3

Lifecycle

Use Request Lifecycle to understand where middleware, controllers, modules, and views run.

4

App code

Put app-specific services, repositories, and permission classes under src/Modules.

5

Core boundary

Keep official framework code inside CorianderCore untouched.

Recommended shape:

src/
  Modules/
    Blog/
      BlogRepository.php
      BlogService.php

For Experienced Users

Use this section when you already know the feature you need and want the reference page directly.

  • Recommended App Architecture: where controllers, modules, repositories, middleware, views, validation, and permissions belong.
  • Installation: download a framework release, prepare a project folder, install Composer dependencies, install NodeJS dependencies, and configure .env.
  • Request Lifecycle: how requests move through public/index.php, routes, middleware, controllers, modules, and responses.
  • Database Patterns: when to use migrations, SQLManager, sqlScript(), repositories, SQLite, and MySQL.
  • Production Checklist: environment, hosting, HTTPS, proxies, database, logs, assets, and final release checks.
  • Errors And Debugging: common 404, 405, asset, environment, database, CSRF, and hosting issues.
  • Testing An App: route smoke tests, module tests, repository tests, permission tests, and documentation quality checks.
  • Upgrade Guide: how to update the framework without mixing app behavior into CorianderCore.
  • CLI: scaffolding commands, maintenance commands, and framework updates.
  • Routing: route files, groups, middleware, response handling, and not-found behavior.
  • Controllers: web controllers, API controllers, rendering, and action structure.
  • Middleware: PSR-15 middleware and route-group protection.
  • View Overview: when to use static views, dynamic views, and asset handling.
  • Static View Guide: fixed pages with index.php, metadata.php, sitemap settings, and static assets.
  • Dynamic View Guide: controller-rendered pages, ViewRenderer, route parameters, prepared data, and forms.
  • Assets And Images: public assets, PUBLIC_URL_PREFIX, and ImageHandler.
  • Database: migrations, SQLite/MySQL configuration, SQLManager, and sqlScript().
  • Modules: app-owned reusable logic outside controllers.
  • Security: CSRF, headers, trusted proxies, and request safety.
  • Cache: cache behavior and invalidation.
  • Sitemap: sitemap metadata and public pages.
  • NodeJS Integration: Tailwind, TypeScript, builds, and frontend assets.

Guided Projects

  • Build a Forum with User Permissions: full web app with SQLite, authentication, permissions, admin middleware, write services, API endpoints, and public-demo protection.
  • Build a Shelter REST API: full JSON API with filtering, validation, database access, consistent errors, and a request playground.

Framework Update Rule

Do not put app or documentation behavior inside CorianderCore. Framework updates can replace that folder. Keep app-owned code in src, public/public_views, documentation, database, resources, and nodejs.