Project layout and commands
Project layout
CPalius works on the clean root principle: the project root is not cluttered with framework files, and everything has a clear place.
CPalius/
├── cp-core/ core area
│ ├── bin/ console binary (console)
│ ├── config/ core configuration (bundles, active_modules, routes)
│ ├── migrations/ core database migrations
│ ├── src/ App\ namespace (Controller, Entity, Core\...)
│ ├── templates/ AACP and Studio templates
│ ├── assets/ panel JavaScript and CSS sources
│ └── var/ cache, logs, backups (not in Git)
├── cp-includes/
│ └── vendor/ Composer dependencies
├── cp-content/ your area
│ ├── config/sync/ YAML configuration that travels with Git
│ ├── modules/ modules
│ ├── themes/ themes
│ └── translations/ global interface translations (tr, en)
├── public/ web root
│ ├── index.php front controller
│ ├── assets/ compiled panel assets
│ ├── themes/ published output of themes
│ └── uploads/ uploaded files
└── composer.json
Rule: Your own code stays inside cp-content/. cp-core/ and cp-includes/ belong to the system; a module package cannot write to or reference them (package validation rejects this).
Namespaces
| Namespace | Folder | Belongs to |
|---|---|---|
App\ |
cp-core/src/ |
The core only |
Modules\ |
cp-content/modules/ |
Modules |
DoctrineMigrations\ |
cp-core/migrations/ |
Core migrations |
A module cannot define a class in the App\ namespace; package validation rejects this.
Configuration management (config sync)
YAML files under cp-content/config/sync/ make the site portable with Git:
| File | Contents |
|---|---|
user.role.<id>.yaml |
Role and capability list |
settings.yaml |
System settings |
path_pattern.<type>.yaml |
Address pattern for a content type |
workflow/<name>.yaml |
State machine definition |
The cp:config command exports and imports settings and fields and shows the difference.
Command list
All commands run with php cp-core/bin/console <command>.
Installation and maintenance
| Command | What it does |
|---|---|
cp:user:create-admin |
Creates the first administrator user |
cp:doctor |
Checks the installation: migrations, modules, capabilities, translations, environment, security posture |
cp:security:audit |
Audits the running security configuration and gives a posture score |
cp:backup:create |
Takes a database, file or full project backup under cp-core/var/backups/ |
cp:update |
Applies pending migrations, update hooks, module upgrades and configuration, then clears the cache |
cp:patch |
Shows the pending file patch and applies it on request |
cp:debug |
Lists what the registries found: capabilities, hooks, cron jobs, entity types, fields, resources |
Modules
| Command | What it does |
|---|---|
cp:module:list |
Lists all modules under cp-content/modules and their status |
cp:module:create |
Generates a new module skeleton (manifest, installer, translations) |
cp:module:activate <Name> |
Validates the module and adds it to the active_modules.php file |
cp:module:deactivate <Name> [--purge] |
Deactivates the module; with --purge it runs the uninstall hook and deletes its data |
Before admitting a module, activation runs build and YAML checks in an isolated process; if it fails, the module is not activated.
Scheduling and queue
| Command | What it does |
|---|---|
cp:cron:run |
Runs all due cron jobs (database + code-based) |
cp:cron:run-virtual <name> |
Runs a code-based (attribute or file) virtual cron job by name |
cp:queue:work |
Processes due asynchronous jobs in isolation |
Data
| Command | What it does |
|---|---|
cp:migrate |
Lists data imports, does dry runs, applies and rolls them back |
cp:config |
Exports settings and fields, shows differences, imports |
cp:seo:rebuild-sitemap |
Adds missing SEO defaults and clears the sitemap cache |
Module commands
Some modules bring their own commands; for example cp:docs:import and cp:docs:export from the Docs module, and cp:blog:seed-demo-content from the Blog module.
A useful trio during development
php cp-core/bin/console cp:debug # what did the system find?
php cp-core/bin/console cp:doctor # is the system healthy?
php cp-core/bin/console cache:clear # clear the cache
In the development environment (APP_ENV=dev), if a request runs the same query many times, the N+1 guard throws an exception; this is deliberate and tells you that you need to write a fetch join.