--- quick_id: 260618-smr slug: remove-unused-redis-service-and-referenc description: Remove unused Redis service and references type: quick created: 2026-06-19 files_modified: - docker-compose.yml - docker-compose.dev.yml - CLAUDE.md - README.md - docs/ARCHITECTURE.md - docs/CONFIGURATION.md - docs/deployment.md - docs/DEVELOPMENT.md - docs/GETTING-STARTED.md - docs/TESTING.md - apps/pwa/e2e/README.md - apps/pwa/playwright.config.ts --- # Quick Task 260618-smr: Remove unused Redis service and references ## Why Redis is confirmed **unused at runtime**: no `ioredis`/redis client import, no `REDIS_*` env vars read in code, and `ioredis` is not a dependency in any `package.json`. It exists only as a compose service + documentation references that imply it is part of the stack or "reserved for future pub/sub". Decision: drop the container and all references (keep the in-memory-vs-Redis design-rationale comments — see Constraint below). ## Tasks ### Task 1 — Remove the redis service from compose - `docker-compose.yml`: delete the `redis:` service block (`image: redis:7-alpine` + its comment) so only `api`, `mariadb`, and the `volumes:` block remain. The api `depends_on` lists only `mariadb` — leave it untouched. - `docker-compose.dev.yml`: delete the `redis:` ports override block (`ports: - '6379:6379'`). - verify: `grep -ri redis docker-compose.yml docker-compose.dev.yml` returns nothing. - done: neither compose file references redis; `docker compose config` still parses. ### Task 2 — Clean documentation references Remove/adjust every Redis mention so no doc implies Redis is part of the stack: - `CLAUDE.md`: delete the Constraints line "Redis available (optional, …)"; delete the `ioredis` row from the Supporting Libraries table; delete the "Redis is present in the stack but not yet used…" sentence from the architecture paragraph (keep the rest of the sentence about SSE/EventEmitter); change the compose-tree comment `(api + mariadb + redis)` → `(api + mariadb)`. - `README.md`: drop "Redis" from the prerequisites line; drop `redis` from the `docker compose … up mariadb redis` command; drop ", Redis 7" from the compose-file description; change "expose DB/Redis ports" → "expose DB ports"; change the Live-sync row "Server-Sent Events + Redis 7 pub/sub" → "Server-Sent Events (in-process EventEmitter)". - `docs/ARCHITECTURE.md`: delete the `Redis` table row. - `docs/CONFIGURATION.md`: drop "and Redis on `localhost:6379`". - `docs/deployment.md`: delete the `redis` services-table row. - `docs/DEVELOPMENT.md`: remove the four Redis mentions (prereq bullet, "### 2. Start the dev database and Redis" heading → "Start the dev database", the two `up mariadb redis` commands → `up mariadb`, the "Exposes Redis on `localhost:6379`" bullet, and the "(API in Docker + MariaDB + Redis…)" comment → "(API in Docker + MariaDB…)"). - `docs/GETTING-STARTED.md`: prereq row "Used to run MariaDB and Redis locally" → "MariaDB"; `up -d mariadb redis` → `up -d mariadb`; "and Redis (`localhost:6379`)" removed from prose. - `docs/TESTING.md`: "The API, MariaDB, and Redis must already be running" → "The API and MariaDB must already be running". - `apps/pwa/e2e/README.md`: delete the "- Redis on `:6379`" bullet. - `apps/pwa/playwright.config.ts`: update the two comments listing "API+MariaDB+Redis are compose-managed" → "API+MariaDB are compose-managed". - verify: `grep -rniE redis CLAUDE.md README.md docs apps/pwa/e2e apps/pwa/playwright.config.ts` returns nothing (case-insensitive, excluding the word "credential"). - done: no doc/config implies Redis is in the stack. ## Constraint — KEEP these (do NOT touch) The in-memory-vs-Redis **design-rationale** comments document why in-memory is used instead of Redis (decisions D-12/D-18) and must remain: - `apps/api/src/lib/listEmitter.ts` - `apps/api/src/broker/reminderScheduler.ts` - `apps/api/src/auth/linkNonceStore.ts` - `apps/api/src/routes/localAuth.ts` ## must_haves - truth: "No redis service exists in either compose file" - truth: "No documentation or e2e config references Redis as part of the stack" - truth: "The D-12/D-18 in-memory-vs-Redis rationale comments in the 4 source files are intact" - artifacts: [docker-compose.yml, docker-compose.dev.yml, CLAUDE.md, README.md, docs/*, apps/pwa/e2e/README.md, apps/pwa/playwright.config.ts]