GobeginnerbackendAI generated

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

  1. 01

    Set up HTTP handlers

    ~1.5h

    Create an HTTP server with handlers for shortening a URL and redirecting from a short code.

  2. 02

    Store URL mappings

    ~1.5h

    Generate short codes and store mappings in a mutex-protected in-memory map.

  3. 03

    Implement redirects

    ~1h

    Look up the original URL by short code and redirect using http.Redirect.

  4. 04

    Add a submission form

    ~1.5h

    Build a simple HTML form so users can submit URLs to shorten from a browser.

  5. 05

    Track click stats

    ~1.5h

    Add a click counter per short code and display it alongside the mapping.

Resources

Ready to build this?

Get a GitHub repo and start building. Your AI reviewer checks each step as you go.

~7h · 5 steps

Tech stack

net/httpsync