Build a Gin Blog

Build Mossbank Post with Gin, Bootstrap 5, PostgreSQL, cookie sessions, owned post CRUD, search, password recovery, and Fly.io deploy notes.

  • Difficulty Intermediate
  • Parts 12
  • Stack Go, Gin, html/template, Bootstrap 5, PostgreSQL, cookie sessions, bcrypt

How this project works

Mossbank Post is an original teaching blog in twelve complete snapshots. Clone once and run any numbered folder without rebuilding earlier stages.

The path starts with Gin and routing, adds Bootstrap layouts, then introduces isolated Postgres databases. Later parts add sessions, media, ownership, pagination, search, reset tokens, and deploy notes.

Snapshots 4–12 seed ada@example.com and grace@example.com with password123.

Local Postgres runs through Docker Compose on host port 5446 with databases mossbank_01mossbank_12.

Open GitHub repo →

Parts in order

Work through the parts in sequence. Each lesson explains the ideas, then points you to a runnable GitHub snapshot.