Backend Service
URL Shortener API
A backend-focused URL shortening service with clean REST endpoints, redirect handling, analytics, rate limiting, and cache-aware design.
Overview
Built to show the decisions behind the interface.
The URL shortener is intentionally backend-heavy. It uses a small product surface to explore API shape, redirect performance, data modeling, analytics, and the operational concerns behind public endpoints.
Problem
The engineering problem
A URL shortener looks simple until it needs to be fast, measurable, abuse-resistant, and easy to operate. The core challenge is balancing a tiny user-facing action with robust backend behavior.
Approach
Technical approach
- Design REST endpoints around predictable creation, lookup, redirect, and analytics flows.
- Use caching where it improves redirect latency without hiding persistence as the source of truth.
- Treat rate limiting and basic abuse protection as core service behavior rather than optional polish.
Architecture
System shape
- ASP.NET Core handles API requests, redirect logic, validation, and service boundaries.
- PostgreSQL stores link records, ownership metadata, and analytics-ready events.
- Redis can support hot-path lookups and rate-limit counters where low latency matters most.
Delivery
Delivery notes
- Docker keeps the API, database, and cache setup reproducible.
- Service boundaries are kept narrow so behavior can be tested and reasoned about independently.
- The implementation is shaped for extension into public dashboards, API keys, or tenant-aware usage.
Outcome
What this demonstrates
- A focused backend service demonstrating performance and operational tradeoffs.
- A reusable reference for public API endpoints, redirect behavior, and event-style analytics.
- A compact project that communicates backend depth without needing a large UI.
Next
Next steps
- Add API key support and per-user quotas.
- Create an analytics dashboard for click trends, referrers, and geographic summaries.
- Add expiration policies, custom aliases, and bulk link management.