chore: remove unused Redis service and references (#26)
Publish / publish (push) Successful in 23s

This commit was merged in pull request #26.
This commit is contained in:
2026-06-18 21:06:32 -04:00
parent 0810260d0b
commit 2276a254e4
15 changed files with 173 additions and 38 deletions
@@ -0,0 +1,83 @@
---
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]
@@ -0,0 +1,65 @@
---
quick_id: 260618-smr
slug: remove-unused-redis-service-and-referenc
description: Remove unused Redis service and references
status: complete
completed: 2026-06-18
duration: ~10m
tasks_completed: 2
tasks_total: 2
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
decisions:
- Redis dropped entirely from compose and all docs; in-memory EventEmitter is the live-sync mechanism (D-12/D-18 rationale comments in source preserved)
---
# Quick Task 260618-smr: Remove unused Redis service and references — Summary
## One-liner
Dropped the unused `redis:7-alpine` compose service and scrubbed every documentation/config reference implying Redis is part of the stack, while preserving the D-12/D-18 in-memory-vs-Redis design-rationale comments in source.
## Tasks Completed
| Task | Description | Commit | Files |
| ---- | ------------------------------------ | ------- | ---------------------------------------------------------- |
| 1 | Remove redis service from compose | 269e474 | docker-compose.yml, docker-compose.dev.yml |
| 2 | Clean documentation references | 8255be6 | CLAUDE.md, README.md, docs/*, apps/pwa/e2e/README.md, apps/pwa/playwright.config.ts |
## Verification Results
- `grep -ri redis docker-compose.yml docker-compose.dev.yml` → no output (clean)
- `docker compose -f docker-compose.yml -f docker-compose.dev.yml config` → PARSE OK
- `grep -rniE redis CLAUDE.md README.md docs apps/pwa/e2e apps/pwa/playwright.config.ts` → no output (clean)
- `pnpm format:check` → all matched files use Prettier code style
- Protected source files (listEmitter.ts, reminderScheduler.ts, linkNonceStore.ts, localAuth.ts) → untouched (git diff confirms no changes)
## Docker Compose Config
`docker compose -f docker-compose.yml -f docker-compose.dev.yml config` parsed successfully with no Redis service — confirmed available on this host.
## Deviations from Plan
None — plan executed exactly as written.
## Known Stubs
None.
## Self-Check: PASSED
- Commits 269e474 and 8255be6 exist in git log
- All 12 modified files confirmed updated
- Grep verifies zero Redis references in target files
- Protected source files confirmed untouched