Title here
Summary here
All business logic in a Pionia app lives in services — PHP classes with one method per action. DeskFlow clients POST JSON to http://127.0.0.1:8000/api/v1/:
{ "service": "task", "action": "list" }You finished DeskFlow tutorial Step 1 and want to design DeskFlow’s Moonlight API — services, actions, validation, and optional generic CRUD for task, member, and project.
{ "service", "action" } maps to PHP classes and *Action methods/docs| Topic | Page |
|---|---|
| Architecture overview | Moonlight overview |
| Your first service | Services |
| Action methods | Actions |
| Input rules | Validation |
| CRUD without boilerplate | Generic services |
In the DeskFlow tutorial you build:
| Service | Purpose |
|---|---|
task | List, create, and assign tasks |
member | Login and team profiles |
project | Group tasks by client project |
/api/v2/@moonlight-* and OpenAPIEvery response uses the same envelope: returnCode, returnMessage, returnData. See Requests & responses.
service and action.TaskService is not enough; add 'task' => TaskService::class in MainSwitch::registerServices().TaskService manual when assignee logic grows; use ProjectService as generic CRUD first.PORT in environment/.env), not 3000 or 8003.Register task, member, and project.
Continue DeskFlow tutorial hands-on.
422 errors when title is missing.