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
- 01
Set up the Minimal API project and data model
~1.5hCreate the project and define a ShortUrl entity with code, original URL, and click count.
- 02
Implement the shorten endpoint
~2hBuild a POST endpoint that generates a unique short code and stores the mapping.
- 03
Implement the redirect endpoint
~1.5hBuild a GET endpoint on the short code that increments the click count and issues a 302 redirect to the original URL.
- 04
Add click analytics endpoint
~1.5hAdd an endpoint returning click count and creation date for a given short code.
- 05
Add basic rate limiting
~2hUse ASP.NET Core's built-in rate limiting middleware to throttle shorten requests per IP.
Resources
- DocsC# Documentation
Ready to build this?
Get a GitHub repo and start building. Your AI reviewer checks each step as you go.
Tech stack