In-Memory URL Shortener Service
A small Go HTTP service that accepts a long URL and returns a shortened code, redirecting visitors when they hit the short link, all backed by an in-memory map. Learners practice net/http handlers, routing, and basic concurrency-safe maps.
- Estimate
- ~7h
- Steps
- 5
- Completed by
- 0
- Proposed by
- codeseed.app
net/http · sync
Project roadmap
- 01
Set up HTTP handlers
~1.5hCreate an HTTP server with handlers for shortening a URL and redirecting from a short code.
- 02
Store URL mappings
~1.5hGenerate short codes and store mappings in a mutex-protected in-memory map.
- 03
Implement redirects
~1hLook up the original URL by short code and redirect using http.Redirect.
- 04
Add a submission form
~1.5hBuild a simple HTML form so users can submit URLs to shorten from a browser.
- 05
Track click stats
~1.5hAdd a click counter per short code and display it alongside the mapping.
Resources
- DocsGo Documentation
Ready to build this?
Get a GitHub repo and start building. Your AI reviewer checks each step as you go.
Tech stack