Dev Skills
Go·Section 12 of 15 · 8 lessons · about 7 h 30 min

Project 3 — Small shop in Go (Golang)

Built with ports and adapters (hexagonal). Roles, file uploads, and money that must not be lost.

  1. 01Project 3 — Small shop: what we are building
    Products, images, a cart and a checkout. This is where roles, files and transactions arrive.
  2. 02Step 1 — Setup and the schema
    Every command to get from an empty folder to a running server with tables.
  3. 03Step 2 — Products and the admin role
    A second middleware, because knowing who somebody is does not tell you what they may do.
  4. 04Step 3 — Uploading a product image
    The endpoint with the most ways to go wrong, and the four defences that fix them.
  5. 05Step 4 — Serving images, and what io gives you
    Send the file back safely, and see why one-method interfaces make everything fit together.
  6. 06Step 5 — The cart
    Per-user rows again, plus one SQL trick that removes a whole branch of Go.
  7. 07Step 6 — Checkout, and what a transaction is for
    Five things must all happen, or none of them. This is what transactions exist for.
  8. 08Step 7 — Orders, and getting it ready to deploy
    The last endpoints, then logging, limits, a container and the hardening pass.