Dev Skills
Go·Section 11 of 15 · 9 lessons · about 8 h 30 min

Project 2 — Expense tracker in Go (Golang)

Built by feature: one folder per concept. Accounts, passwords and login, taught inside the project that needs them.

  1. 01Project 2 — Expense tracker: what we are building
    A money app with accounts, which is why this is where login belongs.
  2. 02Step 1 — Setup, config, and the schema
    Fail at startup rather than at 3am, and let the database enforce what it can.
  3. 03Step 2 — Register: storing a password safely
    What hashing is, why you can never read a password back, and how bcrypt works.
  4. 04Step 3 — Login and what a token is
    Check a password without unhashing it, and hand back proof for the next request.
  5. 05Step 4 — Checking the token on every request
    One middleware, at the edge, so no handler ever has to remember.
  6. 06Step 5 — Expenses, locked to their owner
    CRUD again, but now every query has to know whose data it is.
  7. 07Step 6 — Filtering, paging, and a monthly report
    Let the database do the counting, and never return an unbounded list.
  8. 08Step 7 — Refresh tokens and logout
    Make sessions endable, without a database lookup on every request.
  9. 09Step 8 — Test that the walls actually hold
    One test here matters more than the rest: the one that proves users are kept apart.