Trunc
Live pipeline — watch the request run

Paste a link. Watch it resolve.

Most shorteners hide the machinery. Trunc shows it to you — every layer your request passes through lights up, in order, as it happens.

No signup to startCustom aliasesClick analyticsWorks with Claude

How it works

Three steps, none of them hidden.

01

Paste any link

Long, ugly, full of UTM parameters. It goes through six validation rules before anything is written.

02

Watch it resolve

The pipeline above is not a mock. Those are the layers your request actually passes through, in the order it passes them.

03

Track every click

Each visit is recorded after the redirect has already answered — so the person clicking never waits on our analytics.

Built-in assistant

Talk to your links.

Trunc ships a chat that is a genuine MCP client — the same protocol, the same server, the same tools Claude Desktop would use. Ask it to shorten something, or how your links did this week.

And it doesn't hide the tool calls. You see exactly what it asked for and exactly what came back — because an assistant you can't check is an assistant you can't trust.

Example

Shorten github.com/subhm2004 and tell me which of my links is doing best

shorten_url142ms
get_my_links89ms

Done — it's at trunc.sh/x7Kp2mQ1. Your best performer is /neon-db with 51 clicks, about half of everything you've had this month.

Architecture

Twelve patterns. None of them decorative.

Most projects list design patterns like trophies. These are here because specific things were unsafe, slow, or impossible to change without them — and the code says which. Four of them are below; the rest are in the source, with the reasoning next to each one.

01

The database never leaks upward

Every line of SQL lives behind an interface. No service imports a driver, and none of them knows Postgres is down there at all — which is why moving this app off MongoDB rewrote one directory instead of the whole codebase.

repositorytemplate methoddecorator
02

Swap behaviour, not code

Changing how a short code is minted is one environment variable. A different algorithm, a different alphabet, a different length — and not one line of business logic moves. That is the test of whether a seam is real.

strategyfactorydependency injection
03

Nothing waits that doesn't have to

The redirect answers before the click is ever written down. Every visitor to every link used to sit and wait on our analytics, on the one code path where speed is the entire product. Now none of them do.

observersingletonnull object
04

One shape in, one shape out

Every URL runs the same six rules before anything is stored. Every response leaves in the same envelope. Every call from the browser goes through one door. Consistency you don't have to remember to keep.

chain of responsibilitybuilderfacade

Paste a link. Watch it resolve.

Free, no account needed to start. Sign up when you want to see where the clicks are coming from.

open source · MIT · self-hostable