Files
pitchfast/backlog/tasks/task-2 - Wire-Convex-data-and-storage-foundations.md

2.4 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 In Progress
2026-06-03 19:12 2026-06-04 07:55
mvp
backend
convex
TASK-1
PRD.md
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

  1. Preserve existing Convex env/setup and install the Convex package if missing.
  2. Use TDD for shared Convex domain constants and secret-key guards.
  3. Define the Convex schema, indexes, storage metadata, and bounded functions.
  4. Wire the Next.js App Router root through a Convex client provider.
  5. Verify with pnpm test, pnpm lint, Convex generation, and pnpm build.
  6. 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.