2.9 KiB
id, title, status, assignee, created_date, updated_date, labels, dependencies, references, priority, ordinal
| id | title | status | assignee | created_date | updated_date | labels | dependencies | references | priority | ordinal | |||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| TASK-2 | Wire Convex data and storage foundations | Done | 2026-06-03 19:12 | 2026-06-04 08:41 |
|
|
|
high | 2000 |
Description
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.
Acceptance Criteria
- #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
Implementation Plan
- Preserve existing Convex env/setup and install the Convex package if missing.
- Use TDD for shared Convex domain constants and secret-key guards.
- Define the Convex schema, indexes, storage metadata, and bounded functions.
- Wire the Next.js App Router root through a Convex client provider.
- Verify with pnpm test, pnpm lint, Convex generation, and pnpm build.
- Check acceptance criteria after verification, but do not mark Done until user confirmation.
Implementation Notes
Started implementation on branch codex-task-2-convex-foundations. Existing .env.local Convex values and generated AI guidance will be preserved.
Verified TASK-2 acceptance criteria with pnpm test, pnpm lint, pnpm exec convex codegen --dry-run --typecheck enable, pnpm dlx convex dev --once, and pnpm build. Subagent spec review found no compliance issues. Code-quality review findings were addressed for slug uniqueness, safe settings listing, structured payloads, normalized list limits, generated lint ignores, and Convex tsconfig. Residual risk: public Convex functions remain unauthenticated until TASK-3 adds Better Auth, so deployment should remain internal/non-public until auth is wired.
Final Summary
Convex is connected to the Next.js app, generated types are available, core MVP tables and bounded functions are in place, screenshot storage metadata is wired, run observability is represented, and settings metadata rejects secret-like keys. Verified with pnpm test, pnpm lint, pnpm exec convex codegen --dry-run --typecheck enable, pnpm dlx convex dev --once, and pnpm build.