Service template CRUD (create/read/update/deactivate) and the pure
expandRRULE() recurrence expander for the RFC 5545 subset (WEEKLY,
BIWEEKLY via INTERVAL=2, MONTHLY nth weekday).
- src/domain/recurrence.ts: expandRRULE, parseRecurrence,
matchesRecurrence, validateRecurrence. Pure — no DB imports.
- src/domain/recurrence.test.ts: 13 tests, incl. the 5 required
recurrence cases (spring-forward / fall-back Sunday, monthly-nth
across a year boundary, cancelled instance not regenerated,
biweekly phase stable).
- src/db/services.ts + src/app/api/dev/services/route.ts: list/get/
create/update/deactivate; rrule validated on write; deactivate
flips active (never delete); 409 on duplicate name.
No schema change (services table predates this unit). DST stays in
the caller's localToUtc; interval phase anchored to a fixed epoch so
biweekly never drifts.