Pionia Shop tutorial

What you are building

Pionia Shop is a fictional online store named after the framework. Ada browses mugs and stickers, creates an account, places an order, and pays from her wallet. You build the JSON API behind that story — the same patterns you will use for any real commerce backend.

Ada (ada@pionia.shop)
Pionia Shop API  ← you build this
   ├── product   … catalog list / create
   ├── customer  … register / login
   ├── order     … place / list
   └── wallet    … balance / topup / pay
IdeaValue
Project folderpionia-shop
Sample customerada@pionia.shop
Dev URLhttp://127.0.0.1:8000

Clear models

Every table has one job. Learn these once — the rest of the docs reuse them.

erDiagram
  customers ||--o{ orders : places
  customers ||--o| wallets : has
  products ||--o{ order_items : includes
  orders ||--o{ order_items : contains
  wallets ||--o{ wallet_transactions : records

  customers {
    int id
    string email
    string password_hash
  }
  products {
    int id
    string name
    decimal price
    int stock
  }
  orders {
    int id
    int customer_id
    string status
    decimal total
  }
  order_items {
    int id
    int order_id
    int product_id
    int quantity
    decimal unit_price
  }
  wallets {
    int id
    int customer_id
    decimal balance
  }
  wallet_transactions {
    int id
    int wallet_id
    string type
    decimal amount
  }
TableReal-world meaning
productsWhat you sell (name, price, stock)
customersWho shops (email + password)
ordersA checkout (“paid”, “pending”)
order_itemsLines on that checkout
walletsAda’s store credit balance
wallet_transactionsTop-ups and payments
ServiceWhat Ada / the admin call
productlist, get, create
customerregister, login, me
orderplace, list, get
walletbalance, topup

Who this tutorial is for

You learn Pionia by implementing Pionia Shop in 15 short steps. Each step adds one feature to the same pionia-shop repo.

Before you start

Learning path

StepsThemeWhat you can do afterward
1–4ScaffoldPing the API and list hard-coded products
5–8Catalog in the databasePersist products and validate creates
9–11Customers & ordersLogin with JWT, place orders, defer email-like work
12–13Ship itOptional Vite UI, RoadRunner deploy
14–15ExtendProviders; contribute to core (optional)

Start here

Step 1 — Create the project

composer create-project → pionia-shop

Introduction

Install notes if you have not pinged yet