Files
webdev-pipeline/backlog/tasks/task-2 - Wire-Convex-data-and-storage-foundations.md
2026-06-03 21:18:36 +02:00

43 lines
1.5 KiB
Markdown

---
id: TASK-2
title: Wire Convex data and storage foundations
status: To Do
assignee: []
created_date: '2026-06-03 19:12'
labels:
- mvp
- backend
- convex
dependencies:
- TASK-1
references:
- PRD.md
priority: high
ordinal: 2000
---
## Description
<!-- SECTION:DESCRIPTION:BEGIN -->
Configure Convex Cloud for the MVP and define the core persistence model for campaigns, leads, audits, outreach records, blacklist entries, run logs, and screenshot/file storage. The goal is a typed backend foundation that can support the dashboard, agent pipeline, and public audit pages.
<!-- SECTION:DESCRIPTION:END -->
## Acceptance Criteria
<!-- AC:BEGIN -->
- [ ] #1 Convex is connected to the Next.js app with generated types available
- [ ] #2 Core tables exist for campaigns, leads, audits, outreach, blacklist, run logs, and settings metadata
- [ ] #3 Convex File Storage is ready for desktop and mobile screenshots
- [ ] #4 Run-status and error-log concepts are represented so background jobs are observable
- [ ] #5 No API keys or secrets are stored in user-editable database records
<!-- AC:END -->
## Implementation Plan
<!-- SECTION:PLAN:BEGIN -->
1. Add Convex project configuration and connect it to the app.
2. Define schemas for Campaign, Lead, Audit, Outreach, BlacklistEntry, and AgentRun.
3. Add storage conventions for screenshot files and audit assets.
4. Add basic queries/mutations for creating and reading core records.
5. Verify Convex generation and typechecking work locally.
<!-- SECTION:PLAN:END -->