Add per-IP rate limiting to the /api/login route. 5 attempts per 15 minutes. No new dependencies if possible.
No dependencies needed for a single-process API — an in-memory sliding window keyed by IP is enough. I’ll add a small middleware and note the multi-instance caveat.
Sessions live in KV (key = session id, value = JSON {userId, expires}). Move them to D1 so I can list a user’s sessions and revoke them. Requirements…
Plan first, code after. Approach: dual-read, single-write, then cut over. Add a sessions table in D1. New sessions are written to D1 only. Reads check D1 first, then fall back to KV; on a K…
Rename the package @acme/utils-legacy to @acme/core everywhere in this monorepo. Update package names, imports, tsconfig paths, and the changeset. Do…
73 references in 38 files. Plan: (1) move the folder, (2) rewrite package.json names/deps, (3) rewrite imports with a single sed over the two src trees, (4) fix tsconfig.base.json paths, (5…
Write a commit message for this diff. Conventional commits style. [code]
Before the message: this diff changes behaviour, and I don’t think intentionally. delete then set is what moves the key to the end of a Map’s insertion order — that is how this LRU marks an…