Shorten My URL - a minimalist URL shortener in Python / SQLite3 https://s.sij.ai
Find a file
2025-01-29 23:20:19 +00:00
static Auto-update: Wed 29 Jan 2025 11:12:07 PM UTC 2025-01-29 23:12:07 +00:00
templates Auto-update: Wed 29 Jan 2025 11:12:07 PM UTC 2025-01-29 23:12:07 +00:00
.gitignore Add .gitignore 2025-01-29 00:48:12 +00:00
README.md Update README.md 2025-01-29 23:20:19 +00:00
smurl.py Auto-update: Wed 29 Jan 2025 04:53:27 AM UTC 2025-01-29 04:53:27 +00:00

smurl fox

Shorten My URL (SMURL)

SMURL is a lightweight, self-hosted URL shortener built with FastAPI and SQLite. It provides a simple, dark-themed interface for shortening URLs and viewing analytics.

A testbed instance is available at s.sij.ai.

Setup

Clone the repo and install dependencies:

git clone https://sij.ai/sij/smurl.git
cd smurl
pip install fastapi uvicorn

Start the FastAPI server:

python smurl.py

SMURL assumes you're using a reverse proxy for TLS termination. Caddy is recommended.

Usage

Shorten a URL

  1. Visit the URL you've reverse proxied to your SMURL instance—or, for the testbed instance, s.sij.ai.
  2. Enter a URL (with or without https://).
  3. Click SMURL to generate a short link.

Redirect

Visit a shortened URL, e.g.:

https://s.sij.ai/abc123

View Analytics

  1. Enter the shortcode (abc123) in the same input box.
  2. Click SMURL to view click statistics.