Course Overview
Compass

Master Golang: Full Course Curriculum

A complete map of the Master Golang curriculum with modules and episodes organized by the same three-part structure shown on the home page.

14 modules72 episodes13h 47m total
Morten Vistisen - Master Golang Instructor

Part 1: Foundations

Module 1

Golang Language Fundamentals

Provides the viewer with a quick walk-through of Go's syntax.

Variables, constants and functions

Strong Typing and Zero Values Go requires explicit data types for variables, function parameters, and return values.

5m

If statements and switch statements

If Statements in Go Go uses if, else if, and else to control program flow based on boolean conditions.

4m

Slices, maps and looping

Arrays and Slices in Go Arrays have a fixed size, and their length is part of their type, making arrays of different sizes distinct types.

8m

Structs and interfaces

Composition Over Inheritance in Go Go does not use classical object oriented inheritance and instead favors composition.

7m

Packages, modules and privacy

Package main and Entry Point In Go, package main defines an executable program, and func main serves as the entry point.

6m

Error handling and observability

Go’s Explicit Error Handling Model Go treats errors as values and requires developers to handle them immediately using if err != nil.

16m

Go routines and channels

Goroutines and Concurrency Goroutines are Go’s mechanism for running functions concurrently.

6m

Module 2

MVC & Application structure

Walks the viewer through the model-view-controller architecture and sets up the base of the application structure.

What's a model

Definition of a Model A model represents a core concept within a system, not merely a one to one mapping to a database table.

12m

What's a view

UI and server side rendering context The transcript explains that readers interact with an application through a UI that is typically produced by combining database data with.

15m

What's a controller

Role of the Controller The controller acts as the traffic director in an MVC architecture.

6m

Separation of concerns

Separation of Concerns Principle Separation of concerns is the core principle connecting the previously discussed components.

2m

Router and routes

Routing in MVC Architecture The router maps incoming HTTP requests (GET, POST, PUT, DELETE) to specific controller functions.

5m

Laying the foundations

Introduction to MVC Architecture The episode establishes the foundation for the application architecture using the Model View Controller (MVC) pattern.

8m

Configuration and secrets

Centralized Configuration Management The video introduces a structured approach to managing application configuration in a single location.

10m

Testable entrypoint

Application Entry Point in Go The application entry point is placed under the cmd directory, which contains executable binaries.

6m

Module 3

Postgres & database fundamentals

This module introduces PostgreSQL and database fundamentals to the viewer.

Options for installation

Postgres Setup Options Postgres is used as the primary database and can be installed directly on the system or run inside Docker.

9m

Relational database concepts

Relational Database Fundamentals A relational database stores structured data in tables and models relationships between entities.

3m

ACID and data integrity

Transactions in Relational Databases A transaction is a single unit of work that must either fully succeed or fully fail.

3m

What about nosql?

Relational vs. NoSQL Databases Relational databases use structured tables and predefined schemas, but they are not the only.

3m

A database package

Creating a Database Package The video introduces a dedicated database package in a Go application to manage PostgreSQL connectivity.

6m

Module 4

Developer Experience

Focuses on setting up a nice developer environment for building fullstack apps.

Our toolbox

Tool Directive in Go 1. 24 The video introduces the tool directive added in Go.

8m

Justfile

Problem: Verbose Tooling Commands Tools like Goose and SQLC require long, repetitive command line arguments for paths, configurations, and database settings.

7m

Part 2: Fullstack Core

Module 5

Building the home view

We build the html structure for the home view while getting a firmer handle on templ.

The first migration: articles table

Purpose of Migrations Migrations manage the structure and evolution of a database, including tables, columns, and relationships.

6m

Querying the articles table

Introduction to SQL and Declarative Programming The video transitions from database migrations to interacting with the database using SQL.

5m

The article model

Model Initialization A shared queries variable is created using the SQLC generated query struct.

10m

Home view structure

Base Layout Component A reusable base layout component is created to standardize the HTML structure across all pages.

10m

Sending data to home view

Introducing Dependency Injection in Controllers The controller is refactored into a struct that accepts dependencies, specifically a database connection.

6m

Second migration: only show published articles

Adding a Publication State to Articles A new publishedat column is introduced to distinguish between draft and published articles.

7m

Seed data & page based pagination

Seeding Initial Data The video demonstrates how to create seed data using a command directory with a dedicated main.

18m

Module 6

Building the article view

We build the html structure for the article view and starts breaking code into components.

Article view structure

Article View Implementation The module focuses on building the article view and completing the navigation flow between the home and article pages.

4m

Extracting components

Componentizing the Home View The UI is refactored into smaller components such as Hero, Socials, and Latest Articles to improve readability and structure.

9m

Slugs and human readable URLs

Purpose of Slugs Slugs replace numeric IDs in URLs to improve SEO, readability, and shareability.

10m

What's markdown and do you parse it

Introduction to Markdown Markdown is a lightweight markup language created in 2004 that uses plain text syntax to structure documents.

12m

Module 7

Making things pretty and responsive

We setup tailwind, talk about responsive design and make the blog presentable to real readers.

Overiew

Improving Application Styling and Structure The current application is functional but lacks visual appeal, responsive behavior, and proper structural design.

0m

Tailwind and responsive apps

Introduction to Tailwind CSS Tailwind CSS is a utility first CSS framework that enables building custom designs directly in HTML using pre built utility classes.

10m

Embedding assets

Serving CSS in a Go Application The video explains different ways to serve a CSS file, including hosting it on a server, using S3 with a CDN, or embedding it directly into.

2m

Making pages responsive part one

Mobile First Approach The layout is built using a mobile first strategy, starting with styles for the smallest screen and progressively enhancing for larger screens.

23m

Setting up a color theme

Introducing a Color Theme The video explains the importance of implementing a standardized color theme to improve UI presentation.

4m

Fresh coat of paint

Base Layout Styling The layout is refined by replacing default background and text colors with theme based utility classes.

14m

Module 8

Creating and managing articles

We build out a simple admin where we can manage the articles of the blog.

Admin overview

Current Blog State The blog frontend is now responsive and usable across phones, tablets, and desktops.

2m

Admin UI

Admin Page Objective The video builds an admin landing page that displays all articles in a paginated table.

24m

Creating the article form

Route and Controller Setup A new route is created for /admin/articles/new using an admin prefix to reduce repetition.

21m

Validating new articles

Route and Controller Setup A new POST route is created for article creation under an admin prefix.

30m

What you see is what you get

Integrating EasyMDE Markdown Editor The video demonstrates how to integrate the EasyMDE JavaScript Markdown editor to enable a WYSIWYG editing experience.

16m

Updating an article

Routing and Edit Page Setup The edit functionality is introduced by defining a new route that includes an article ID parameter.

30m

Module 9

Authentication and authorization

This module teaches you authentication, best practices and shows you how to roll your own auth. Completely Safe.

Intro to authentication

Need for Authentication The current application allows unrestricted access to the admin page, enabling any user to create or delete articles.

8m

Creating users

Database Migration Setup A new users table is created via migration, including fields for ID, timestamps, email (unique and not null), and password (byte type).

12m

Storing & validating passwords

Password Hashing with Salt A function is implemented to generate a cryptographically secure random salt for each password.

12m

Middleware introduction

Middleware for Route Protection Middleware is introduced as a maintainable way to protect specific routes instead of duplicating logic in controllers.

4m

Rate-limiting logins

Introduction of IP Rate Limiting The video demonstrates how to implement an IP based rate limiter in a Go web application.

8m

Barring access to admin

App Cookie Structure An application wide cookie structure is created to store authentication state and user email.

22m

Login form and csrf tokens

CSRF Protection Implementation Cross Site Request Forgery protection is added using Echo middleware.

31m

Missing steps

Extending the Authentication System The video reviews core authentication components and introduces additional features such as email verification and password reset.

11m

Module 10

Modern hypermedia

Introduces the viewer to htmx and datastar, discusses "modern" frontend frameworks and adds interactivity to the blog and admin.

Hypermedia overview

Current Application State The project already includes authentication, an admin panel, and responsive article rendering.

n/a

What's hypermedia

Definition of Hypermedia Hypermedia refers to media (text, images, video) that includes links to other media.

9m

What options exists

Overview of Web Application Approaches The video compares different approaches to building modern web applications, focusing on Single Page Applications (SPAs), traditional.

13m

Auto-removing flashes

Improving Flash/Toast Messages The video begins by addressing persistent flash messages that require a page refresh to disappear.

15m

Surgical updates

Clickable Article Cards with Datastar The video demonstrates how to make entire article cards clickable using data on with a click event.

26m

Inline validation new article

Goal: Inline Form Validation The video introduces real time validation for a new article form to provide instant feedback while typing.

26m

Inline validation edit article

Script Refactoring and Layout Optimization The ECMDE script is moved from individual create/edit pages into the base layout header to centralize JavaScript loading.

15m

Clean up and fixes

Refactoring Form Validation The editor lost focus on every keystroke due to how validation state was handled.

0m

Module 11

Preparing for production

We cover seo optimizations, caching views and static assets as well as error pages and logging strategy so we safely can go to production.

SEO optimizations

Deployment Preparation and Optimization Goals The application is nearly ready for deployment, with remaining tasks focused on SEO optimization, page caching, browser caching,.

31m

Adding page caching

Introduction to Caching Caching is a technique for temporarily storing frequently accessed or expensive to compute data to improve performance.

15m

Browser caching of static assets

Static Asset Caching Strategy The video explains how to cache CSS, JavaScript, and images to prevent unnecessary re downloads and improve load performance.

18m

Error pages & logging strategy

Custom Not Found Page (404) A dedicated not found view is created to handle unmatched routes.

27m

Part 3: Production & Scale

Module 12

Setting up a secure VPS

In this module we cover how to configure a virtual private server so that it's secure, talk DNS and how to reverse proxy using Caddy.

SSH and keys

Self Hosting Strategy The video introduces deploying an application by setting up and managing a personal VPS instead of relying on managed cloud services.

5m

Creating a server

Choosing a VPS Provider The video discusses selecting a VPS provider, noting that options like Hetzner, DigitalOcean, OVH, Hostinger, and AWS are all viable.

5m

Securing and ssh hardening

Objective: SSH Hardening and Server Security The video focuses on securing a newly provisioned server before production use.

15m

DNS and reverse proxy with caddy

Secure Server Setup The server is secured using SSH with a private key and password.

12m

Module 13

Deploying a binary

We go through how to setup a database on the VPS and then deploy the binary version of our blog.

Setting up postgres

Choosing a Self Hosted Database The speaker opts for a self hosted database on a VPS instead of a managed solution due to cost and learning benefits.

7m

Deploying part one

Database Migrations Strategy The application must apply database migrations before running in production.

10m

Deploying part two

Using systemd for Application Management The application is managed using systemd to ensure a robust and maintainable runtime environment.

13m

Module 14

Deploying a docker image

We cover how to host our application using docker instead of systemd and setting up traefik as our reverse proxy.

Episodes for this module are in final review and will be published shortly.