flisk-recipe-blog
Recipe for "build me a blog with an admin API" with Flisk - a public blog site and a posts API with a database and token-protected admin routes, in one stack started with `flisk up`. Use with the flis
SKILL.md.claude/skills/flisk-recipe-blog/SKILL.md
GitHubRecipe: a blog with an admin API
Parts: a public blog site, and a posts API with public read routes and admin write routes.
Steps
flisk doctor
flisk project --yes
flisk resource blog --type frontend --stack blog --yes
flisk resource posts-api --type backend --stack blog --feature drizzle --yes
flisk up blog --dry-run
flisk up blog --json & # wait for {"ok":true}
flisk networks --stack blog --raw
App code
posts-api: apoststable (title, slug, body, published). Public:GET /posts,GET /posts/:slug. Admin:POST /admin/posts,PUT /admin/posts/:id,DELETE /admin/posts/:id, accepted only withAuthorization: Bearer <token>signed withJWT_SECRETfrom the project.env. Seed one welcome post.blog: a list page and a post page that read fromposts-apithrough the generated client in.autogenerated/.
Done when
Each answers 200: the blog health URL, /api/posts/health and /api/posts/health/db on api.<project>.localhost:<port>. An admin POST without a token answers 401, and with a token it creates a post.
Tell the user the blog URL, the API URL, how to create a post (the curl with a token), and that flisk down stops everything.