How does a URL shortener work?
A URL shortener stores a mapping from a compact path to a longer destination and redirects visitors who open the short link. This service supports generated seven-character slugs, validated custom slugs, optional expiry, and visit counts for links that need to be easier to share or manage.
Mappings are stored in Supabase and generated slugs use nanoid; collisions return an explicit conflict instead of silently changing the requested name. A short URL hides the destination from casual view but is not encryption or anonymity. Recipients should trust the shortening domain, and sensitive tokens should not be embedded in either URL.