docs: update architecture docs to reflect 6-service layer

The CLAUDE.md layered architecture section implied all handlers go
through services. In practice, services handle cross-repo coordination
while handlers call repos directly for simple CRUD. Updated the
diagram, added a services table, and added an "Adding Business Logic"
guide. Marked improvements.md item 4 as done.
This commit is contained in:
Houmgaor
2026-02-24 16:18:31 +01:00
parent 4d3ec8164c
commit c5fd0444f4
2 changed files with 32 additions and 4 deletions

View File

@@ -92,7 +92,11 @@ This isn't necessarily wrong — the services exist for multi-repo coordination,
**Fix:** Update the architecture diagram in `CLAUDE.md` to reflect the actual pattern: services are used for cross-repo coordination, handlers call repos directly for simple CRUD. Remove the implication that all handlers go through services. Alternatively, expand service coverage to match the documented architecture, but that is a much larger effort with diminishing returns.
**Status:** Pending.
**Status:** **Done.** Updated three files:
- `Erupe/CLAUDE.md` — Layered architecture diagram clarified ("where needed"), handler description updated to explain when to use services vs direct repo calls, added services table listing all 6 services with method counts and purpose, added "Adding Business Logic" section with guidelines
- `server/CLAUDE.md` — Repository Pattern section renamed to "Repository & Service Pattern", added service layer summary with the 6 services listed
- `docs/improvements.md` — This item marked as done
---