Building a URL Shortener in Go | Architecture, Storage, and Real Code Walkthrough

Опубликовано: 18 Июнь 2026
на канале: José Cruz (IT Architect)
390
15

In this video, we dive deep into building a real-world **URL Shortener service in Go**, from scratch. Using clean architecture principles, you'll see how to organize your Go project using idiomatic best practices — covering everything from in-memory storage to Base62 encoding, service layering, HTTP handlers, and more!

We break down the project hosted on GitHub and show you **real code**, explain how it works, and how you can build and run it yourself.

🔧 Get the source code:
👉https://github.com/josedacruz/archite...

---

🧠 *Topics Discussed*

What a URL shortener does and how it works
Clean Go project layout
In-memory storage & thread-safe access
Base62 encoding explained
Service layer vs storage responsibilities
HTTP handlers with URL validation
Environment configuration and default ports
Testing with `curl` or Postman
Extensibility ideas: databases, custom codes, etc.

---

00:00 - Intro
04:27 - What is a URL Shortener?
15:40 - Why Go language
17:08 - Core Functionality
18:06 - High-Level Architecture
23:20 - Algorithms: Hash & Base62 ID Generation
34:12 - Distributes ID Generators - Snowflake-Style ID
38:01 - Future Enhancements
39:27 - Code Walkthrough - Demo


#golang #urlshortener #webdevelopment #microservices #programming #goproject #softwarearchitecture