Vache prompts. Claude codes.How it works
← Linesheet

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.

1,400+
Items managed
30+
Features shipped
542+
Convex functions
5
AI agents
Architecture

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.

AI Agents

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
Every shipped feature

30+ user-facing capabilities, in roughly the order they were prompted into existence:

Multi-tenant inventory management
PDF and PNG catalog generation with multiple layouts
Shareable buyer links with direct ordering
Per-buyer analytics dashboard
Purchase order grouping, receiving, and per-PO line items
Multi-tier pricing (M5/M4/M3/M2/M1) with per-style overrides
Bulk operations — select, mark received, remove
Excel import with smart column detection and merge memory
CRM with account-level engagement tracking
AI-powered product image generation (Gemini) with batch mode
Bulk email campaigns via Resend
Real-time sync across all users
Inventory intelligence (WOS, ABC-XYZ, safety stock, reorder points)
Customer analytics with RFM segmentation and leaderboard
Hero color selection for PDF/PNG exports
Production import reconciliation with anomaly gate
CatalogOrderView with image carousel ordering
PNG export with 3 layout options (catalog, showcase, lookbook)
Buyer segments with price modifier multipliers
Daily linesheet auto-generation (cron)
SEO/AEO — sitemap, JSON-LD, llms.txt
Dashboard widgets (overstock alerts, conversion funnel, reorder velocity)
PO arrivals calendar
CSV export and PO PDF generation
Multi-currency display on share pages
Invoice history import (230K+ rows, client-side parsing)
Revenue dashboard with year/quarter/month view toggle
Sales forecasting with comparison to actuals
Print-friendly mode for reports
Fulfillment auto-promotion workflow
Tech Stack
Next.js 15TypeScriptConvexClerkTailwindReact-PDFhtml-to-imageCloudflare R2ResendVercel

Want the wholesale-side pitch instead?

← Back to Linesheet
© 2026 Vache Sarkissian·Built with Claude Code