CODESEEDSign in
Explore projects
Pythonbeginnerbackend

URL Shortener with Analytics

URL shortening service with click statistics, geographical location, and a simple dashboard.

5 steps

Project steps

  1. 01

    FastAPI endpoints

    POST /shorten → {short_url}, GET /{code} → 301 redirect.

  2. 02

    SQLite storage

    Table urls(code, original, created_at) and clicks(code, ip, country, ua, clicked_at).

  3. 03

    GeoIP lookup

    On each click, resolve the country from the IP with ip-api.com (free tier).

  4. 04

    Jinja2 Dashboard

    HTML page with daily click graph and country breakdown.

  5. 05

    Custom aliases

    Allow users to specify a custom alias instead of a random hash.

Recommended resources

Ready to build this?

Fork the repo on GitHub and start building. A mentor will review your code when you open a PR.

5 steps

Tech stack

PythonFastAPISQLitehttpxJinja2