English | 日本語
A TypeScript-based hit counter running on Cloudflare Workers.
Simply add the following tag to your page:
<img src="https://counter.fjtd.dev/counter" referrerpolicy="origin" />https://kauntah-generate.fjtd.moe/
| asset | version | preview |
|---|---|---|
normal-150 (default) |
Ver.0.91 | ![]() |
blue2-150 |
Ver.0.93 | ![]() |
blue2-100 |
Ver.0.93 | ![]() |
green-100 |
Ver.0.93 | ![]() |
| Parameter | Example | Description |
|---|---|---|
asset |
?asset=normal-150 |
normal-150 (default) / blue2-150 / green-100 / blue2-100 |
offset |
?offset=1000 |
Initial value added to the count (max: 1,000,000) |
padding |
?padding=4 |
Minimum display digits (1–16); pads with leading zeros |
- Automatically identifies the owner based on the hostname of the Referer header.
- Creates an independent counter for each host.
- Available for use by anyone with a site that has its own FQDN.
| Layer | Technology | Role |
|---|---|---|
| Compute | Cloudflare Workers (Node.js compatible) | Request handling |
| Framework | Hono | Routing |
| Counter | SQLite-backed Durable Objects | Atomic increment and the sole persistent count store |
| Image Cache | Workers KV | Generated SVG cache (24-hour TTL) |
| Image Processing | Native SVG rendering | Combines Base64 PNG digit assets in SVG |
| Rate Limiting | Cloudflare Rate Limiting API | Prevents count inflation (20 requests / 60 seconds per owner and IP) |
- Rate limiting: The count increases up to 20 times per 60 seconds for each owner and IP combination. Requests above the limit return the current counter image without increasing the count.
- Each successful counter request performs one persistent write to its owner's SQLite-backed Durable Object.
- Before deploying, run
npm run checkto type-check the Worker and verify that Wrangler can build its deployment bundle. - The original asset images are included in the repository for reference, but are not used directly at runtime. They are embedded as Base64-encoded strings in
src/assets/.
- Illustration: Kokage Kusaka (日下こかげ)
- Originally distributed on "KK's WS" (now closed)
- For more details, search for "Nekomimi Counter" and "Kokage Kusaka"
- Non-commercial use, modification, and redistribution are permitted by the author



