Stateful, tiered, overbooked link shortener. The URL is the token; the tier is the perk; the length is the currency. Length is decided at mint time from the controlling account's hourly eligibility, and once minted, an exposed URL resolves forever.
See spec/design.md for the full architecture (six length classes, three
charging models, admission-controlled offers, memoryless folder streaks,
credential-URL tripwire, and the rest).
fob/
├── cmd/fob/ # binary entrypoint
├── internal/
│ ├── mint/ # length decision + eligibility engine
│ ├── resolve/ # exact-match dispatch by fragment length
│ ├── storage/ # KV mappings + tombstones
│ ├── httphandlers/ # HTTP surface
│ └── nibcodec/ # thin wrapper over the sibling nib codec
├── spec/design.md # the design specification
└── Makefile
nib — the self-contained URL compression codec. fob uses it in two places:
- Internal storage codec for external URLs — an external target's raw nib-encoded BigInt bytes are stored in the KV as the primary form. Beats an opaque 4–8 ID in the short-target regime that dominates a shortener's inventory.
- Shutdown-proof export — every minted URL can also be handed to the user as a self-decoding nib link. If fob ever goes dark, those still work under any nib decoder.
The nib Go package sits alongside this repo; a wrapper in
internal/nibcodec/ is the one place that touches it.
fob (chosen) / den / peg — sibling codec codename: nib (jot, wad, ort were alternates).