Skip to content

PhalconKit User Guide

Use PhalconKit as the application layer between Phalcon and your project. These guides describe the current API and use the App skeleton's paths unless an example explicitly says otherwise.

Build Your First Application

  1. Get started: install, configure, and run the skeleton.
  2. Build your first resource: create a table, generate its model, expose a controlled API, and verify requests and responses.
  3. Add authentication and permissions.
  4. Run your application behind a web server.

Already have a project? Start with Application Integration.

How PhalconKit Works

Guide What you will find
Application Structure The parts of an application, who owns each directory, and where new code belongs
How A Request Runs Bootstrap, providers, modules, dispatch listeners, and where to extend each step
Configuration Environment, app config, modules, provider overrides, listeners, and permissions
Feature Setup The tables, models, and services each built-in feature needs

REST API Handbook

Guide What you will find
REST Controllers Every built-in action, controller setup, field policies, and extension points
Requests And Responses URLs, HTTP methods, JSON/form/query inputs, response envelopes, errors, and client examples
Filtering And Pagination Filter objects, all operator families, nested AND/OR groups, search, sorting, limits, and offsets
Writes And Batches Create/update/save intent, validation, partial batch success, delete, restore, and reorder
Relationships Eager loading, client-selected graphs, related filters, nested writes, and safe exposure
Counts, Aggregates, And Exports List totals, grouped counts, distinct facets, calculations, and CSV downloads
API Scenario Checklist Request/result cases to verify for your own resource
Grow A Resource Which layer to change as a resource gains fields, children, and rules

Examples distinguish the complete HTTP envelope from a view fragment. Each resource controls its exposed fields, enabled actions, and row access, so copy the accompanying controller configuration as well as the request.

Build Your Application

Task Guide
Manage application tables Database Migrations
Generate and regenerate models Database And Scaffolding
Work with model relationships and behaviors Models And Eager Loading
Sign in, refresh tokens, and sign out Authentication
Grant actions and restrict rows Identity And Permissions
Configure keys, CORS, and sensitive fields Application Security
Write a command CLI Tasks
Call OpenAI with injectable transports and usage capture OpenAI
Find a focused implementation example Application Cookbook

Run And Operate

Task Guide
Serve HTTP and WebSockets, and run long-lived workers Web Servers And WebSockets
Check PHP and Phalcon in each runtime Runtime Requirements
Test your application's behavior Application Testing
Resolve a failure Troubleshooting

Existing Applications

Use the migration index for package/namespace changes, older REST resources, Core 4, and App layout/dependency changes. These guides share a consistent preparation, change, verification, and rollback structure.

Reference And Help

For changes to PhalconKit itself, use the contribution guide. Project maintenance and release procedures are separate from application setup.