Premium link intelligence platform

Every click is a signal. Listen to all of them.

LinkSpark is a multi-channel link intelligence platform with deep click telemetry, programmable A/B variants, branded QR delivery and real-time conversion analytics — all powered by a stateful FastAPI backend persisted in PostgreSQL.

99.97% · 30-day uptime 38ms · p95 redirect 3 regions · global edge
Total links
live
Total clicks
+24h
Unique visitors
↗ deduped
Countries reached
↗ global

Click Volume / 24h hourly

A vs B variant split, hourly resolution
Variant A Variant B

Devices

UA-parsed across all clicks
clicks

Top countries

guessed from Accept-Language

Top referrers

first-party Referer header

Live activity

last 10 redirect events

Your links

click any row to drill down · A/B variants tagged

New short link

Daily volume / last 14 days

total clicks across all links

Browsers

UA family breakdown
families

Geo reach

stylized world map · countries lit by click volume

Operating systems

Workspace

project-level configuration · persisted to PostgreSQL
A/B testing default New links will start with variant B field enabled

Health

live runtime telemetry
FastAPI router/api/linkspark/*
PostgreSQL persistence3 tables · linkspark_links, linkspark_clicks, linkspark_settings
A/B variant engineweighted random splitter
UA parserregex-based · device/browser/os
QR enginedeterministic SVG generator

Architecture at a glance

6 layers · 10 endpoints · 3 tables

FastAPI router

Ten REST endpoints under /api/linkspark covering CRUD, analytics, QR rendering and the live 302 redirect with click telemetry.

GET /api/linkspark/overview GET /api/linkspark/links POST /api/linkspark/links GET /api/linkspark/links/{'{slug}'} GET /api/linkspark/r/{'{slug}'} ← redirect

PostgreSQL persistence

Three SQLAlchemy tables with foreign keys, indexes on slug + admin_token + created_at, and cascade-delete on click history.

linkspark_links (id, slug, …, ab_split) linkspark_clicks (id, link_id, variant, country, device) linkspark_settings (singleton row)

A/B variant engine

Weighted random splitter (0-100% split per link). The redirect endpoint chooses a variant per request, persists it on the click row, and exposes A vs B in every chart.

variant, target = svc.choose_variant(link) target = svc.add_utm(target, ...) return RedirectResponse(target, 302)

Telemetry pipeline

Per-click capture: hashed IP, country guess from Accept-Language, UA-parsed device/browser/os, referrer host, and the chosen variant — all persisted for aggregate analytics.

SHA-256 hash(ip) → ip_hash parse_ua(ua) → device, browser, os guess_country(al) → country (ISO)

QR engine

Deterministic stylized QR generator using SHA-256 of the slug as a seed, rendered as inline SVG with colored finder patterns and rounded data cells.

GET /api/linkspark/links/{'{slug}'}/qr ?size=240 → image/svg+xml

Aggregations

Hourly + daily timeseries with variant split, plus group-by breakdowns over country, device, browser, OS, referrer host and A/B variant — single SQL pass each.

GET /api/linkspark/overview GET /api/linkspark/links/{'{slug}'}/timeseries GET /api/linkspark/links/{'{slug}'}/breakdown?by=country