Skip to content

meisamith/selfdestruct

Repository files navigation

SelfDestruct

Share links that vanish on your terms.

Next.js TypeScript Supabase Tailwind CSS Vercel License: MIT

Live Demo →


SelfDestruct is a privacy-first URL shortener where every link comes with a kill switch. Set a one-time view rule, a countdown timer, or a max-view cap — the moment the condition is met, the link self-destructs and is gone forever. A real-time surveillance dashboard lets you watch every click as it happens, with full IP geolocation plotted on a per-link world map. Built for people who care about what happens after they hit send.


Screenshots

Dashboard Link Builder
Link builder with destruct rule configuration Real-time surveillance dashboard
World Map Analytics
Per-link IP geolocation world map Click analytics, referrer breakdown, and device stats

Features

  • Self-destruct rules — kill a link after one view, after a set time window, or once it hits a view cap; no manual cleanup required
  • Real-time surveillance dashboard — live feed of every access event the moment it happens, no polling
  • IP geolocation world map — every visit pinned on a per-link globe so you see exactly where your traffic is coming from
  • Instant open notifications — get alerted the moment someone opens your link, before they even finish loading the page
  • Analytics — click counts, referrer breakdown, and device stats per link, all in one place
  • Security panel — flag suspicious activity, inspect raw access logs, and audit link health at a glance

Tech Stack

Layer Technology
Framework Next.js 15 (App Router)
Language TypeScript
Styling Tailwind CSS v4
Database & Realtime Supabase (Postgres + Realtime subscriptions)
Animations Framer Motion
Hosting Vercel

How It Works

  1. You create a link and attach a destruct rule — one view, a time limit, or a max-view cap.
  2. Every visit is logged: timestamp, IP, device, referrer, and geolocation resolved server-side.
  3. On each access, the rule is evaluated. If the condition is met, the link is atomically invalidated and returns a 404 from that point forward.
  4. The dashboard streams access events over a Supabase Realtime channel so you watch it happen live.

Running Locally

Prerequisites: Node.js 18+, pnpm

git clone https://github.com/your-username/selfdestruct.git
cd selfdestruct
pnpm install

Create a .env.local file in the project root and populate it with your own values:

NEXT_PUBLIC_SUPABASE_URL=
NEXT_PUBLIC_SUPABASE_ANON_KEY=

Start the dev server:

pnpm dev

Open http://localhost:3000.

You will need a Supabase project with the appropriate tables for links and access logs. Schema details can be inferred from the /lib directory.


License

MIT

About

Privacy-first URL shortener where links self-destruct after one view, a timer, or a view limit.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors