Proposed design
Components
TaskExporter.Export(ctx, projectID uuid.UUID) ([]byte, error) — …
Alternatives considered
| Approach | Why not |
|---|
| Stream from the handler | Untestable without HTTP. |
Decision record
Problem: need a reusable, testable export path. Drivers: testability without HTTP, reuse by a future scheduled export. Chosen: an application service returning bytes, because it is unit-testable and the handler stays thin. Consequences: Good, because tests don't need an HTTP harness. Bad, because large exports hold the full CSV in memory (mitigated in risks).
Security & data
Only the project's owner may call the export endpoint (reuses the existing project-scoped auth middleware); no new data leaves the system beyond what the user already sees in the board.
Out of scope: PDF, scheduled export, column selection.