Loading repository data…
Loading repository data…
SagarBiswas-MultiHAT / repository
A clean Flask-based URL shortener that converts long links into short, shareable URLs with optional custom aliases, expiration support, and TinyURL mirroring. Uses SQLite for persistence, includes copy helpers, rate limiting, and a simple REST API. Ideal for learning backend fundamentals and deployment.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
This project lets you turn a long link into a short link.
Example:
When someone opens the short link, the website sends them to the long link.
You paste a big URL, press Generate, and you get a new short link.
You can pick the end part of the link (the “nickname”).
Example:
my-launchhttp://YOUR-COMPUTER:5000/my-launchIf you leave it empty, the app will make a random one for you.
You can choose a date and time.
If you leave it empty, the link never expires.
There is a checkbox called Also create a TinyURL mirror.
If you turn it on, the app will also ask TinyURL to create a short link that points to the same long URL.
Important: TinyURL does NOT let us choose a custom alias using this simple API.
You can press Copy to copy the link.
Note: copying works best on https:// or http://localhost. On http://<LAN-IP> some browsers block copying; the app tries a safe fallback, but a few browsers may still block it.
Run:
python -m venv .venv
.\.venv\Scripts\Activate.ps1
Run:
pip install -r requirements.txt
Run:
set FLASK_APP=app.py
flask run --host=0.0.0.0 --port=5000
Open this in your browser:
Your short links are saved in a small SQLite database file on your computer:
data/url_store.dbIf a legacy data/url_store.json exists, the app will migrate it on first run.
You can override the database location with:
$env:SHARPLINK_DB_PATH="C:\path\to\url_store.db"
You can also use a .env file. See .env.example.
This file remembers:
This app creates short links that work from your computer/server.
That means:
To make links work for everyone on the internet, you must deploy this app on a public server (hosting).
You can also call the backend directly:
POST /api/shorten
{
"url": "https://example.com",
"alias": "custom",
"expires_at": "2025-12-31T23:59",
"use_tiny": true
}
GET /ALIAS
Install dev dependencies:
pip install -r requirements-dev.txt
Run tests:
pytest
http:// and https:// URLs are accepted.-, and _.The default limiter uses in-memory storage, which is fine for local testing but not for production. Use Redis in production by setting:
$env:RATELIMIT_STORAGE_URI="redis://localhost:6379/0"
Or add the same to your .env file. See .env.example.
Developed by Sagar Biswas: https://github.com/SagarBiswas-MultiHAT