# Task 009 — Campaigns Module

## Objective

Implement Campaign orchestration that uses Segments + Email Templates (no sending engine yet).

## Scope delivered

- Campaign model snapshots (subject/template/segment)
- CampaignRecipient model and indexing
- Campaign service for preview, recipient generation, and stats
- Protected `/api/campaigns/*` routes
- UI pages: list/create/detail/edit
- Disabled send action placeholder (future task)

## Acceptance criteria

- [x] `npm run build` succeeds
- [x] `npm run lint` succeeds
- [x] `/campaigns` exists and is protected
- [x] User can create draft campaign
- [x] User can select segment/template
- [x] User can preview recipients
- [x] User can save campaign
- [x] User can generate recipients
- [x] Deduplication by email works
- [x] Missing emails are skipped with reason
- [x] Campaign stats are calculated
- [x] Send button present but disabled
- [x] Docs/changelog/task index updated

## Status

**done** — Task 009 completed.
