C#intermediatebackendAI generated

URL Shortener API with Minimal APIs

A lightweight URL-shortening service built with ASP.NET Core Minimal APIs and EF Core, generating short codes, tracking click counts, and redirecting short URLs to their original targets. Learners practice minimal API routing, EF Core, and basic rate limiting middleware.

Estimate
~8.5h
Steps
5
Completed by
0
Proposed by
codeseed.app

ASP.NET Core Minimal APIs · Entity Framework Core · SQLite

Project roadmap

  1. 01

    Set up the Minimal API project and data model

    ~1.5h

    Create the project and define a ShortUrl entity with code, original URL, and click count.

  2. 02

    Implement the shorten endpoint

    ~2h

    Build a POST endpoint that generates a unique short code and stores the mapping.

  3. 03

    Implement the redirect endpoint

    ~1.5h

    Build a GET endpoint on the short code that increments the click count and issues a 302 redirect to the original URL.

  4. 04

    Add click analytics endpoint

    ~1.5h

    Add an endpoint returning click count and creation date for a given short code.

  5. 05

    Add basic rate limiting

    ~2h

    Use ASP.NET Core's built-in rate limiting middleware to throttle shorten requests per IP.

Resources

Ready to build this?

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

~8.5h · 5 steps

Tech stack

ASP.NET Core Minimal APIsEntity Framework CoreSQLite