Title here
Summary here
You finished DeskFlow tutorial Step 1 and want to understand every folder in your DeskFlow repo before adding database tables and auth.
services/, switches/, environment/)storage/AppRealm, public/static/)deskflow-api with ComposerTaskService and ping curlEvery HTTP and CLI request loads the same bootstrap/application.php, which returns a singleton AppRealm. Your code lives under Application\ — mapped to services/, switches/, and sibling folders without per-directory Composer entries.
v3 app layout (from composer create-project pionia/pionia-app):
bootstrap/
application.php return AppRealm::create(__DIR__)
environment/
.env APP_NAME, PORT, DEBUG
settings.ini logging, db, cors, [app_switches], jobs, realtime
public/
index.php HTTP entry → bootHttp()
.htaccess
static/ optional user assets (favicon, SPA build output)
services/ *Action business logic (TaskService, MemberService)
switches/ registerServices() → service aliases
middlewares/ request/response middleware
authentications/ auth backends (JWT for alex@northwind.studio)
commands/ custom CLI commands
storage/
cache/
logs/
bootstrap/ generated by `php pionia optimize` (route cache, providers, preload — gitignored)
metrics/ request metrics + optional opcache-snapshot.json
worker.php RoadRunner worker (HTTP + jobs)
.rr.yaml RoadRunner config
pionia CLI entry → bootConsole()
composer.json| Path | Role |
|---|---|
bootstrap/ | AppRealm::create() — single realm instance for HTTP, CLI, and workers |
environment/ | .env + settings.ini ([app_switches], database, cache, logging, maintenance) |
public/ | Web root only — never expose project root |
services/ | Classes extending Service; methods named {action}Action |
switches/ | Map service alias → class (task → TaskService) |
middlewares/ | Global or route middleware chains |
authentications/ | Pluggable auth strategies |
commands/ | Custom pionia commands |
storage/ | Cache, logs, metrics, and generated bootstrap caches |
worker.php | Persistent workers via RoadRunner |
| Folder / file | DeskFlow usage |
|---|---|
services/TaskService.php | task.list, task.create |
services/MemberService.php | member.login for alex@northwind.studio |
services/ProjectService.php | project.list (often generic CRUD) |
switches/MainSwitch.php | Registers task, member, project on /api/v1/ |
environment/settings.ini | [app_switches], [db], [cache] |
storage/logs/ | Errors when DEBUG=true |
| v2 | v3 |
|---|---|
PioniaApplication + wireTo() | AppRealm + [app_switches] in settings.ini |
static/ at repo root | public/static/ or framework welcome assets |
handleRequest() on app | bootHttp() from public/index.php |
PHP 8.1, core ^2.0 | PHP 8.5+, core ^3.0 |
Autoload namespace: Application\ mapped to the project root (composer.json).
environment/.env — keep secrets gitignored; share .env.example instead.public/ only.storage/ entirely — wipe storage/cache/ or run cache:clear; logs and metrics need the folder.bootstrap/routes.php — v3 registers switches from settings.ini, not a routes file.Continue DeskFlow tutorial.
SQLite tasks table for DeskFlow.
Services, actions, validation.