Documentation
Start with what you want to build. This documentation targets CorianderPHP 0.4.1. Existing applications should read the Upgrade Guide: 0.4.0 changed the route/view tree, and 0.4.1 renames framework metadata to $metadata while leaving $page available for application data.
Install The Framework
Download
Choose a version from the framework releases, not this documentation repository.
Extract
Put the release contents in your application folder.
Remove maintenance files
You do not need repository-only .github/, docs/, AGENTS.md, or readme.md to run an app. Keep required license notices when redistributing.
Install dependencies
Run composer install, then php coriander nodejs run install.
Configure and build
Set local environment values and build assets using the Installation guide.
Create A Page
A fixed page needs one direct GET file. You do not need an action class or a separate forwarding route.
php coriander make:view about
This creates src/Views/about/index.get.php. Put your PHP/HTML there, add optional _metadata.php for the title, and visit /about. The framework supplies inherited layouts.
- Static View Guide: complete fixed-page example and shared layout.
- Dynamic View Guide: validated path parameter, prepared data, template, and 404 behavior.
- Routing: filenames, methods, matching, and route inspection.
Create A Request Handler
A method file returns a callable that accepts the request and returns a PSR response. Small handlers can stay in the file; larger ones can delegate to ordinary app-owned action classes.
- Request Handlers: read query/form/JSON data, validate it, and return HTML, JSON, views, or redirects.
- Recommended App Architecture: responsibilities and when to extract reusable logic.
There is no controller generator or automatic controller discovery in 0.4.1.
Create An API
Follow the Shelter REST API project for SQLite persistence, GET/POST/PATCH/DELETE routes, validation, and errors. Its playground accepts demonstration writes without changing stored data.
Use Request Handlers for response helpers and parsed bodies. Use Security before exempting a stateless API from CSRF protection.
Use A Database
Schema
Create a migration with php coriander make:migration CreatePostsTable.
Apply
Run php coriander migrate after configuring SQLite or MySQL.
Read and write
Use SQLManager and bound sqlScript() parameters.
Reuse
Keep queries in repositories; follow Database Patterns.
The Forum data-model chapter and Shelter data-model chapter show complete schemas.
Add Authentication And Permissions
Authentication identifies a user. Authorization decides what that user may do.
- Authentication and sessions: complete login form, credential check, protected directory, logout, and verification steps.
- Middleware: inherited directory protection.
- Security: CSRF tokens, cookies, request limits, and headers.
- Forum guided project: shared permission rules for web pages, admin actions, and JSON endpoints.
Reference And Operational Guides
- CLI: generators, detailed help, routes:list, migrations, and updates.
- Core Concepts and Request Lifecycle: how the pieces fit together.
- View Overview and Assets And Images: templates, layouts, escaping, and public files.
- Modules: app-owned services and repositories.
- Cache: automatic route-map refresh.
- Sitemap: explicit public URLs.
- Page Scripts: colocated TypeScript, directory scripts, shared imports, and automatic loading.
- NodeJS Integration: Tailwind, builds, watchers, and deployments.
- Environment: local and production configuration.
- Production Checklist: safe hosting and deployment.
- Errors And Debugging: identify the failing layer.
- Testing An App: route, permission, repository, and download regressions.
- Upgrade Guide: migrate app-owned code without editing CorianderCore.
Framework Boundary
Keep application code under src, migrations under database, and public assets under public/assets. Do not edit CorianderCore or the coriander CLI; updates manage those files.