MCPcopy Index your code
hub / github.com/craigsdennis/shorty-dot-dev

github.com/craigsdennis/shorty-dot-dev @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
11 symbols 25 edges 3 files 1 documented · 9%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

shrty.dev

A #BuildInPublic URL shortening service built on the Cloudflare Developer Platform.

What it uses

  • 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

  • /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

Resources

Watch shrty.dev Admin AI on YouTube

Setup your own

Prerequisites

Create a KV namespace for URL storage:

npx wrangler kv namespace create URLS

Update 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.vars

Generate types:

npm run cf-typegen

Development

npm install
npm run dev

Deployment

npm run deploy

Extension points exported contracts — how you extend this code

CloudflareBindings (Interface)
(no doc)
worker-configuration.d.ts

Core symbols most depended-on inside this repo

queryClicks
called by 3
src/index.ts
getMessages
called by 2
public/admin/script.js
setMessages
called by 2
public/admin/script.js
appendUiMessage
called by 2
public/admin/script.js
addUrl
called by 2
src/index.ts
sendMessage
called by 1
public/admin/script.js
executeToolCall
called by 1
src/index.ts
createTokenStream
called by 1
src/index.ts

Shape

Function 10
Interface 1

Languages

TypeScript100%

Modules by API surface

src/index.ts5 symbols
public/admin/script.js5 symbols
worker-configuration.d.ts1 symbols

For agents

$ claude mcp add shorty-dot-dev \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact