Catalyst¶
Catalyst is a multi-tenant proposal operations platform for services teams that need to move proposals from draft to approval with speed, control, and executive visibility.
Product Definition¶
Primary users: Internal services teams — sales, architects, delivery leads.
Primary outcome: Produce better proposals faster while preserving review quality, approval discipline, and export/share readiness.
Core Workflows¶
- Create a proposal with correct tenant/user permissions
- Draft and revise proposal content in the workbench
- Collaborate through comments, section reviews, and approval gates
- Publish or revoke a controlled public share link
- Export the proposal in client-facing formats
Tech Stack¶
| Layer | Technology |
|---|---|
| Framework | Next.js 16 (App Router) |
| Frontend | React 19, TypeScript |
| ORM | Prisma |
| Database | PostgreSQL |
| Validation | Zod |
| Nodemailer | |
| Documents | Playwright + docx/html-to-docx |
Platform Features¶
Core Platform¶
- Multi-tenant workspace model (
Tenant,Membership,Invitation) - Role-based access:
admin,sales,architect,viewer - Session auth with signed cookies + optional Google OAuth
CRM + Pipeline¶
- Account management, contact directory
- Pipeline view and account 360 insights
Proposal Workflow¶
- Proposal creation linked to account/contact
- Versioned markdown content
- Assignees and review flow
- Comments, mentions, approval chain, signatures
- Exports and export history
AI & Quality Workflows¶
- Proposal generation (streaming)
- Diagram explain, diff summaries, semantic diff
- Quality score, red team, effort estimate, scenario simulator, brand voice checks
- Rate limiting and entitlements enforcement by plan
Operations¶
- Ops dashboard and trend charts
- Queue management for review/export actions
- Retention automation (auto-archive, cleanup)
- Digest and SLA reminder endpoints
SaaS / Billing¶
- Settings: Organization, Team, Billing, Activity
- Organization feature flags with plan gates
- Onboarding wizard with persisted progress
- Settings audit timeline
- Stripe checkout, billing portal, webhook sync
Repository Layout¶
app/ Next.js routes and API handlers
src/lib/ Business logic (auth, tenant, entitlements, integrations)
src/components/ UI components
docs/ Product, recovery, and architecture notes
prisma/ Schema and migrations
scripts/ Utility and test scripts
Key UI Routes¶
| Route | Description |
|---|---|
/ |
Public landing |
/try |
Demo workspace (AI disabled) |
/workspace |
Authenticated dashboard |
/proposals |
Proposal list |
/proposals/new |
Create proposal |
/proposals/[id] |
Proposal workbench |
/queue |
Review/export queue |
/pipeline |
Sales pipeline |
/accounts |
Account management |
/contacts |
Contact directory |
/exports |
Export history |
/ops |
Operations dashboard |
/settings/* |
Organisation, team, billing, activity |
Local Setup¶
Prerequisites¶
- Node.js 20+
- PostgreSQL
- Docker (recommended)
npm install
cp .env.example .env
npx prisma migrate dev
npm run dev
Optional: local Ollama (AI)¶
npm run ollama:setup
Production Deployment¶
Environment Variables (required)¶
NODE_ENV=production
DATABASE_URL=...
APP_URL=...
SESSION_SECRET=...
CRON_SECRET=...
ENCRYPTION_KEY=... # if using tenant LLM API keys
Docker¶
docker build -t catalyst:latest .
docker compose -f docker-compose.production.yml up -d --build
Set APPLY_MIGRATIONS_AT_START=true to auto-migrate on startup, or run migrations separately.
Health & Observability¶
GET /api/health— app healthGET /api/health/ollama— Ollama healthENABLE_REQUEST_LOGS=true— emit API request logsLOG_LEVEL=info|warn|error— log verbosity
Quality Commands¶
npm run lint
npm run typecheck
npm run build
npm run test:integration
npm run test:rbac
npm run benchmark:rag
Data Model¶
Primary Prisma models:
- Tenant, Membership, Invitation, Invoice
- User
- Account, Contact
- Proposal, ProposalVersion, ProposalAssignee
- ProposalComment, ProposalSectionReview, ApprovalSignature, ProposalPresence
- Audit, Notification, Export
- RagDocument, RagChunk
- ProposalTemplate, BrandKit