A #BuildInPublic URL shortening service built on the Cloudflare Developer Platform.
- Workers — Runtime
- Hono — Web framework
- KV — Stores slug-to-URL mappings
- Workers Analytics Engine — Tracks and reports on click events with geo metadata
- Workers AI — Powers the admin chat interface (
@cf/zai-org/glm-4.7-flash) with tool calling
/admin/— Chat interface for managing shorties via natural language (create links, query analytics)/admin/analytics.html— Dashboard showing click counts per slug over the past 3 months
Create a KV namespace for URL storage:
npx wrangler kv namespace create URLSUpdate the kv_namespaces id in wrangler.jsonc with the returned namespace ID.
Create a Workers Analytics Engine API token with read access.
Copy .dev.vars.example to .dev.vars and fill in the values:
cp .dev.vars.example .dev.varsGenerate types:
npm run cf-typegennpm install
npm run devnpm run deploy