Link shortener and QR code SaaS with analytics
Short links on the customer's own domains: QR codes, per‑country destinations, password protection, click analytics, and subscriptions. Redirects in Go, analytics in ClickHouse.
- of core development across six services
- ~6 weeks
- of core development across six services
- events per batch when writing clicks to ClickHouse
- 500
- events per batch when writing clicks to ClickHouse
- of click history retained
- 24 mo
- of click history retained
A service for marketers and businesses: short links on their own domains, static and dynamic QR codes, and click analytics. A link can have UTM tags, different destinations per country, a password, an expiry date, a click limit, and a warning page before the redirect. Users sign in with email or Google, and plans range from free to Business, paid through Stripe. Each plan limits the number of links and QR codes, how long analytics are kept, and how many custom domains can be connected.
One of our engineers built the whole product with AI agents: the API, the customer dashboard, the staff admin panel, the redirect service, and the analytics pipeline.
Redirects
A dedicated Go service handles link visits. Links are held in an in‑memory cache keyed by domain and short code and refreshed from MySQL every 20 seconds, so the request path never touches the database. The service checks the link’s status, moderation, expiry, and click limit, determines the visitor’s country and picks the matching destination, and shows a password or warning page when needed. Writing the click to Kafka and updating the counter in MySQL happen in the background with strict timeouts, so visitors never wait for analytics.
Analytics
A Go consumer reads clicks from Kafka. It parses events across eight workers, groups them into batches of 500 events or 200 ms, and writes them to ClickHouse. The Kafka offset is committed only after a successful write, so clicks are not lost on failure, and failed writes are retried with increasing backoff. In ClickHouse, clicks are partitioned by month and kept for 24 months, and a buffer table absorbs small inserts. The dashboard and admin panel build reports directly from ClickHouse.
Abuse protection
Short links are a common phishing tool, so destination URLs are checked on creation: only http and https, no internal or local addresses, and a domain blocklist. Links carry a risk score and a report counter, and domains are checked regularly against an external reputation service. The redirect verifies that a link is opened on the domain it belongs to. Staff handle reports and manage users in a separate admin panel with roles and permissions.