Build log
How a multi-tenant wholesale catalog SaaS was prompted into existence. Tech stack, architecture, AI agents, and the bullet list of every shipped feature.
Vache prompted; Claude wrote the code. Production today with one tenant. This page is the engineering deep-dive — the wholesale pitch lives at /projects/linesheet.
Next.js 15 on the frontend with React Server Components for the catalog renderer and client components for the inventory workspace. Authentication via Clerk; multi-tenant isolation enforced at the Convex query layer (every query takes an orgId filter; helpers wrap that contract so it cannot be skipped accidentally).
Convex as the backend — reactive queries push catalog and stock changes to every open buyer link in real time. Cloudflare R2 stores generated PDFs and line-sheet PNGs; Resend handles transactional + campaign email. Deploys via Vercel.
PDF + PNG generation uses react-pdf for vector PDFs and html-to-image for raster PNG line sheets. Generation happens in a Convex action; outputs are written to R2 with signed URLs.
Per-buyer pricing tiers live as a separate price table joined at order time, so a buyer's negotiated discount is enforced server-side rather than computed in the catalog renderer.
Five Claude-Code subagents kept under Projects/Linesheet/linesheet-app/.claude/agents/:
- code-reviewer (Opus) — quality, security, tenant isolation review on every PR
- debugger (Sonnet) — data-flow tracing for Convex query bugs
- test-writer (Sonnet) — Vitest unit + integration coverage
- linesheet-coder — feature work with project-context preloaded
- project-coder — generic code edits routed via the vault's neural router
30+ user-facing capabilities, in roughly the order they were prompted into existence:
Want the wholesale-side pitch instead?
← Back to Linesheet