DeskFlow tutorial

Meet the project we are building

The docs use one example application so every curl, service name, and database table tells the same story. You are not memorizing random snippets — you are building a small product.

Northwind Studio (fictional client)

Northwind Studio is a made-up digital agency — think design, web builds, and client retainers. They are not a real company. We use them the same way Django’s tutorial uses a fake polls site: a believable setting with names and emails that stay consistent across pages.

Who they areA 12-person agency with designers, developers, and account managers
The problemTasks live in spreadsheets; nobody knows who owns what
What we buildDeskFlow — an internal JSON API (and optional React UI) for tasks, projects, and team login

DeskFlow (your API)

DeskFlow is Northwind’s internal task board backend. Clients do not call it — Northwind staff do. A project manager lists open tasks, a developer marks work done, and only logged-in members can create or assign items.

Northwind Studio (fictional agency)
   DeskFlow API  ← you build this with Pionia
        ├── task    … list, create, assign tasks
        ├── member  … login (alex@northwind.studio)
        └── project … group tasks by client work

Sample person: Alex Chen, developer — alex@northwind.studio
Your repo name: deskflow-api (any name works; we keep this in commands)
Dev URL: http://127.0.0.1:8000

You can rename characters and tables later. The tutorial teaches Pionia patterns (services, switches, Porm, auth) through this one story.

flowchart TB subgraph northwind [Northwind Studio — fictional] Alex[alex@northwind.studio] Jamie[jamie@northwind.studio] end subgraph deskflow [DeskFlow API — you build] Task[task.list / task.create] Member[member.login] Project[project.list] end Alex -->|POST JSON| Task Jamie -->|Bearer JWT| Task

Who this tutorial is for

You learn Pionia by implementing DeskFlow in 15 short steps on your laptop. Each step adds one feature to the same deskflow-api repository and links to the next.

Read Introduction first if you have not installed PHP 8.5+ or Composer yet.

Before you start
  • Introduction — install and first ping
  • PHP 8.5+ and Composer
  • ~6–8 hours for all 15 steps (Steps 1–7 ≈ 90 minutes for list + create against SQLite)

What you will have when you finish

PhaseStepsOutcome
Start1–3Project on disk, dev server, task.list
Understand4Map every folder in your repo
Data5–7SQLite tasks table, list + create
Production habits8–11Validation, login, middleware, background jobs
Ship12–13Vite UI (optional), RoadRunner deploy
Extend14–15AppProvider, contribute to PioniaCore

Tutorial steps

Complete these in order. Each page assumes the previous step’s code is in your repo.

Start Step 1

Step 1 — Create project

composer create-project and open deskflow-api.

Examples

Copy-paste curl after Step 3.

Common mistakes

  • Starting here before Introduction — install PHP and Composer first.
  • Opening Step 8 before Step 7 — validation needs a working createAction.
  • Thinking Northwind is a real vendor — it is fiction; swap names anytime.

What’s next

After Step 15: Composer packages, Porm reference, Maintainer notes.