Tutorials: Build a Mini Blog
This tutorial series takes you from an empty directory to a small but real blog application. You build it one layer at a time — schema, model, validator, controller, routes, React pages — so by the end you understand how every piece of a Guren app fits together.
Tutorials: Build a Mini Blog
This tutorial series takes you from an empty directory to a small but real blog application. You build it one layer at a time — schema, model, validator, controller, routes, React pages — so by the end you understand how every piece of a Guren app fits together.
If any term is unfamiliar along the way, check the Glossary.
What you'll build
A mini blog where visitors can:
- Browse a paginated list of posts and read each one
- Sign in with a user account
- Write posts (signed-in users only), with each post showing its author
- Leave comments on posts
The series
The parts build on each other — each one starts where the previous one ended, so work through them in order:
- Create a Blog Post App — Scaffold a fresh app and build posts CRUD by hand: a
poststable, aPostmodel, Zod validation, a controller, routes, and three React pages. Final result: you create a post through a form and see it appear in the list. - Add Authentication — Install the auth scaffold with one command, sign in as the demo user, protect post creation behind a login wall, and attach an author to every post. Final result: only signed-in users can write posts, and each post shows who wrote it.
- Relationships: Comments — Add a
commentstable related to both posts and users, declarehasMany/belongsTorelationships, and build a comment form on the post page. Final result: signed-in users can comment on any post, and comments appear with their author's name.
Prerequisites
- Bun 1.1 or later — the only hard requirement.
- That's it. The scaffold defaults to SQLite, which needs zero configuration — no Docker, no database server. (You can pick PostgreSQL or MySQL when scaffolding, but this course sticks with the SQLite default.)
Each part takes roughly 15–20 minutes.
Tip
This series focuses on building features. For a broader tour of environment setup, rendering modes, and production builds, see Getting Started and First Steps: A 10-Minute Tour of One Request.
Ready? Start with Part 1: Create a Blog Post App.