flisk-recipe-shop
Recipe for "build me a small online shop" with Flisk - a storefront website and an orders API with a database in one stack, started with `flisk up` and checked URL by URL. Use with the flisk-build ski
SKILL.md.claude/skills/flisk-recipe-shop/SKILL.md
GitHubRecipe: a small online shop
Parts: a storefront the user opens in the browser, and an orders API that stores products and orders.
Steps
flisk doctor
flisk project --yes
flisk resource storefront --type frontend --stack shop --yes
flisk resource orders-api --type backend --stack shop --feature drizzle --yes
flisk up shop --dry-run
flisk up shop --json & # wait for {"ok":true}
flisk networks --stack shop --raw
App code
services/shop/orders-api/src/schema.ts: aproductstable and anorderstable. Usesrc/db.tsfor queries.services/shop/orders-api/src/index.ts:GET /products,POST /orders,GET /orders. Keep/healthand/health/db. Create the tables as the flisk-build skill says under "Tables"; seed three products if the table is empty.services/shop/storefront/src/: a page that lists the products from the API and a button that places an order. Call the API through the generated client in.autogenerated/(theapi-clientfeature), not a hard-coded host.
Done when
Each of these answers 200 (ports come from flisk networks):
- the storefront health URL, for example
http://app.<project>.localhost:<port>/storefront/health http://api.<project>.localhost:<port>/api/orders/healthhttp://api.<project>.localhost:<port>/api/orders/health/db
Then tell the user: "Your shop is running. Open the storefront at … . The orders API is at … ; try curl …/api/orders/products. Stop it with flisk down."