Overview
Create the srv/rate-limiter/ service structure with Durable Objects implementing token bucket algorithm.
Tasks
Files to Create
srv/rate-limiter/
├── package.json
├── wrangler.toml
├── tsconfig.json
├── vitest.config.mts
├── src/
│ ├── index.ts # Hono app entry
│ ├── durable-objects/
│ │ └── rate-limiter.ts # Token bucket DO
│ ├── utils/
│ │ ├── naming.ts # DO naming + hashing
│ │ └── token-bucket.ts # Algorithm helpers
│ └── types.ts # Env, policy types
└── tests/
├── rate-limiter.test.ts
└── naming.test.ts
DO Naming Scheme
Format: {stage}:{type}:{subject}:{policy}
With SHA256 hashing for secrets (never embed raw API keys).
Estimate
4 hours
Parent Epic
#99
Overview
Create the
srv/rate-limiter/service structure with Durable Objects implementing token bucket algorithm.Tasks
srv/rate-limiter/service structureFiles to Create
DO Naming Scheme
Format:
{stage}:{type}:{subject}:{policy}With SHA256 hashing for secrets (never embed raw API keys).
Estimate
4 hours
Parent Epic
#99