Demo-safe, multi-tenant SMB SMS/MMS marketing + shared inbox + lead-qualification SaaS
(Next.js App Router · TypeScript · Prisma/Postgres · BullMQ/Redis). All real-world impact — live
SMS, billing, AI, and production auth/workers/deploy — is off by default behind executable hard
gates. The only intentional live path is the multi-gated /demo live-test SMS form.
This repo uses npm as the canonical package manager; package-lock.json is the only committed
package-manager metadata.
bash scripts/agent/bootstrap.sh # copy .env, install deps, generate Prisma client
docker compose up -d postgres redis # local backing services
npm run db:migrate # apply schema
npm run demo:seed # seed demo data
npm run dev # http://localhost:3000Product workspace is at /dashboard; the gated live-test console is at /demo.
npm run agent:bootstrap # alias for scripts/agent/bootstrap.sh
npm run agent:check # full local gate (alias: npm run validate)
npm run dev # dev server
npm run build # production build
npm start # serve the production build (next start)
npm run validate # full local gate: lint, typecheck, unit tests, build, domain gates
npm run test # unit tests onlyEnd-to-end (needs Postgres + npx playwright install chromium):
npm run test:e2e:smokeIf playwright browsers are unavailable in the shell runtime, run npx playwright install chromium
before npm run test:e2e:smoke or npm run validate (Linux Playwright support is version-sensitive).
bootstrap.sh copies .env.example → .env. Demo-safe defaults: DEMO_MODE=true,
LIVE_MESSAGING_ENABLED=false, LIVE_BILLING_ENABLED=false, MESSAGING_PROVIDER=dummy,
AI_PROVIDER=fake. Clerk/Twilio/Stripe keys are blank placeholders — keep real secrets out of git
(npm run secrets:scan enforces this).
/dashboard— contacts, campaigns, inbox, templates, analytics, compliance./settings— go-live readiness + 10 read-only operations surfaces./demo— gated live-test SMS console.
GOAL.md— purpose, current state, definition of done.ROADMAP.md— phased plan mapped totickets/.AGENTS.md+docs/ai/REPO_MAP.md— autonomous-agent instructions and where code lives.plan/— research-informed transformation plan (specs, roadmap, execution prompt).docs/CANONICAL_IMPLEMENTATION_PLAN.md— governing implementation contract.