Static-first Astro site of web developer tools. All tools run client-side — including LLM tokenization, which uses lazy-loaded tokenizers in a Web Worker so initial page loads stay small.
@fontsource-variable/* (bundled into the build, no runtime CDN)No client-side framework runtime. No external fonts, analytics, or trackers.
npm install
npm run dev # astro dev — hot reload
npm run build # outputs to ./dist
npm run typecheck # astro check
npm run deploy # build + wrangler pages deploy
First-time deploy: npx wrangler login and create a Pages project named webdev-pro (matches wrangler.toml). After that, npm run deploy is one command.
The site is driven by a single registry: src/tools/index.ts.
slug, name, description, category, tags, icon (SVG path data, 24×24 viewBox, currentColor stroke). Categories: ai, formatters, testers, converters, encoders, generators.src/pages/tools/<slug>.astro and wrap content in <ToolLayout slug="<slug>">.src/lib/tools/<slug>/index.ts (or src/lib/tools/<slug>.ts for simple tools) — DOM-free, unit-testable.registerTool({...}) from ~/lib/webmcp.ts in the page's <script> to expose the tool to AI agents via the W3C WebMCP API (navigator.modelContext.registerTool). Feature-detected — no-op in browsers that don't ship it.Homepage grid, search, sitemap, JSON-LD, related-tools row, and a per-page OG image at public/og/tools/<slug>.png (regenerated on every build by scripts/build-og.ts) all flow from the registry — no manual asset work.
src/
├── layouts/BaseLayout.astro # html, head, theme bootstrap, slot
├── components/ # Header, Footer, ThemeToggle, ToolLayout, ToolCard, CopyButton
├── lib/
│ ├── theme.ts, clipboard.ts
│ └── tools/ # pure-TS tool logic (no DOM)
├── tools/index.ts # tool registry — single source of truth
├── pages/
│ ├── index.astro # searchable tool grid
│ ├── sitemap.xml.ts # generated from registry
│ └── tools/<slug>.astro
├── styles/global.css # Tailwind v4 + Stitch design tokens
└── env.d.ts
public/
├── favicon.svg
└── robots.txt
<script> blocks.<head> applies dark class before paint to avoid FOUC; toggle persists in localStorage./ to focus the global search; filters tool cards on name + tags + description + category.src/styles/global.css. Sharp 0px layout corners, 4px interactive corners, 1px outline-variant borders. Geist for UI, JetBrains Mono for code/labels.The token-counter tool at /tools/token-counter is the flagship feature.
js-tiktoken (cl100k_base / o200k_base) — exact@huggingface/transformers to load each model's official tokenizer.json from the HF Hub on demand — exactcl100k_base and label "estimate"src/data/llm-pricing.json — update the lastUpdated field when you refresh pricesBuild size note: @huggingface/transformers v3 includes its model-runtime backend (~5MB JS + 23MB ONNX wasm), code-split into separate chunks. They are only fetched when an HF-tokenizer model is first selected — initial page loads stay small. If you never want those chunks shipped at all, swap the hf branch in src/lib/tools/token-counter/worker.ts to fall back to cl100k_base (estimate) like Anthropic and Google.
Personal project. No license attached yet.
Astro
50.6%
TypeScript
31.6%
JavaScript
14.1%
CSS
3.7%
Static-first Astro site of web developer tools. All tools run client-side — including LLM tokenization, which uses lazy-loaded tokenizers in a Web Worker so initial page loads stay small.
@fontsource-variable/* (bundled into the build, no runtime CDN)No client-side framework runtime. No external fonts, analytics, or trackers.
npm install
npm run dev # astro dev — hot reload
npm run build # outputs to ./dist
npm run typecheck # astro check
npm run deploy # build + wrangler pages deploy
First-time deploy: npx wrangler login and create a Pages project named webdev-pro (matches wrangler.toml). After that, npm run deploy is one command.
The site is driven by a single registry: src/tools/index.ts.
slug, name, description, category, tags, icon (SVG path data, 24×24 viewBox, currentColor stroke). Categories: ai, formatters, testers, converters, encoders, generators.src/pages/tools/<slug>.astro and wrap content in <ToolLayout slug="<slug>">.src/lib/tools/<slug>/index.ts (or src/lib/tools/<slug>.ts for simple tools) — DOM-free, unit-testable.registerTool({...}) from ~/lib/webmcp.ts in the page's <script> to expose the tool to AI agents via the W3C WebMCP API (navigator.modelContext.registerTool). Feature-detected — no-op in browsers that don't ship it.Homepage grid, search, sitemap, JSON-LD, related-tools row, and a per-page OG image at public/og/tools/<slug>.png (regenerated on every build by scripts/build-og.ts) all flow from the registry — no manual asset work.
src/
├── layouts/BaseLayout.astro # html, head, theme bootstrap, slot
├── components/ # Header, Footer, ThemeToggle, ToolLayout, ToolCard, CopyButton
├── lib/
│ ├── theme.ts, clipboard.ts
│ └── tools/ # pure-TS tool logic (no DOM)
├── tools/index.ts # tool registry — single source of truth
├── pages/
│ ├── index.astro # searchable tool grid
│ ├── sitemap.xml.ts # generated from registry
│ └── tools/<slug>.astro
├── styles/global.css # Tailwind v4 + Stitch design tokens
└── env.d.ts
public/
├── favicon.svg
└── robots.txt
<script> blocks.<head> applies dark class before paint to avoid FOUC; toggle persists in localStorage./ to focus the global search; filters tool cards on name + tags + description + category.src/styles/global.css. Sharp 0px layout corners, 4px interactive corners, 1px outline-variant borders. Geist for UI, JetBrains Mono for code/labels.The token-counter tool at /tools/token-counter is the flagship feature.
js-tiktoken (cl100k_base / o200k_base) — exact@huggingface/transformers to load each model's official tokenizer.json from the HF Hub on demand — exactcl100k_base and label "estimate"src/data/llm-pricing.json — update the lastUpdated field when you refresh pricesBuild size note: @huggingface/transformers v3 includes its model-runtime backend (~5MB JS + 23MB ONNX wasm), code-split into separate chunks. They are only fetched when an HF-tokenizer model is first selected — initial page loads stay small. If you never want those chunks shipped at all, swap the hf branch in src/lib/tools/token-counter/worker.ts to fall back to cl100k_base (estimate) like Anthropic and Google.
Personal project. No license attached yet.
Astro
50.6%
TypeScript
31.6%
JavaScript
14.1%
CSS
3.7%