Clew: Open-Source URL Shortener Uses SQLite to Track Clicks and Timestamps
Clew is a lightweight, open-source URL shortener that exposes a JSON API for creating and managing short links. Users submit a destination URL to a dedicated endpoint and receive a short URL that issues a 302 redirect when visited. Each redirect is logged in a persistent SQLite database, which stores the total click count and the 20 most recent visit timestamps. Concurrent redirects are handled safely using SQLite's BEGIN IMMEDIATE transactions to prevent data conflicts. API key authentication is required for creating links and viewing stats, while redirects remain publicly accessible; the project supports both local and Docker-based deployment.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in