BASELINE
Core SaaS baseline
A full-stack starter that treats tenancy, auth, permissions, billing, audit, and CI as foundation, not backlog.
MVP Factory turns the repeated parts of a serious product into a reusable baseline: tenant-safe backend, composed frontend, billing rails, AI modules, tests, and deployment gates.
Generation command
make create
Name the product
Capture display name, slug, output directory, and deployment defaults before any files are written.
Choose the architecture
Select Minimal, Standard, Full AI, or Enterprise, then choose multi-tenant or single-tenant generation.
Toggle capabilities
Enable billing, file uploads, notifications, invitations, RAG, agents, AI API, and workflow modules only when needed.
Next.js 16
app router interface layer
FastAPI
service-first backend spine
Postgres
Schema-per-tenant isolation
633
backend tests tracked as factory signal
Next.js 16
app router interface layer
FastAPI
service-first backend spine
Postgres
Schema-per-tenant isolation
633
backend tests tracked as factory signal
The reference site uses repeated calm blocks to explain a complex AI product. Here, those blocks explain the reusable architecture layers MVP Factory gives every generated app.
BASELINE
A full-stack starter that treats tenancy, auth, permissions, billing, audit, and CI as foundation, not backlog.
BOOTSTRAP
The factory wizard turns a product name, preset, module mix, and tenancy model into a ready project structure.
INTELLIGENCE
Provider-neutral inference, RAG, agents, workflows, evals, and observability plug into the baseline without leaking into app code.
GUARDRAILS
Tenant-first search paths, permission gates, audit events, weak-secret checks, and CORS rules make safety a default behavior.
Cosmoq presents automation as clean capability groups. MVP Factory maps that method to provider contracts, compliance gates, RAG, agents, workflows, and evaluation loops.
OpenAI, Anthropic, Gemini, and local providers sit behind one provider contract with retry and fallback.
PII redaction, content safety, data residency, token budgets, and audit logging wrap every full AI call.
Document ingestion, hybrid search, reranking, streaming chat, and source citations ship as a cohesive slice.
A ReAct loop, tool registry, run traces, and long-term memory give generated products extensible automation.
LLM calls, tools, code, and condition steps compose into retryable workflows with parallel branches.
Async evaluators, usage tracking, and per-model cost calculations keep AI behavior observable after launch.
Optional modules are designed to prune cleanly. A generated project that disables a capability should compile without stale references.
billing
JazzCash hosted checkout, signed return handling, usage metering, and subscription routes.
file_uploads
Multipart upload endpoints, object storage adapters, quotas, and tenant-aware file records.
notifications
Email and in-app notifications with templates, delivery workers, and user preferences.
invitations
Invite-by-email flows, token validation, and clinic membership on accept.
ai_api
Direct completions, streaming, and structured output endpoints behind the compliance pipeline.
rag
Knowledge bases, ingestion loaders, hybrid search, reranking, and citation-ready retrieval.
agents
ReAct execution, built-in tools, memory, and traceable agent runs for operational workflows.
workflows
DAG-based LLM, tool, code, and condition steps with retries and parallel branches.
The factory wizard behaves like an architectural intake form: it captures the system shape, then emits a project that already follows the repository layer boundaries.
$ make create
Display name: Medical AI Scribe
Preset: Full AI
Modules: billing, rag, agents, workflows
Tenancy: multi-tenant
Validating module specs and migration tracks
Capture display name, slug, output directory, and deployment defaults before any files are written.
Select Minimal, Standard, Full AI, or Enterprise, then choose multi-tenant or single-tenant generation.
Enable billing, file uploads, notifications, invitations, RAG, agents, AI API, and workflow modules only when needed.
Module specs, prune rules, migrations, CI templates, and generated docs are checked before handoff.
The reference security section maps naturally to the strongest MVP Factory promise: tenant correctness and deployment readiness are built into the baseline.
Tenant boundary
Every tenant request sets `search_path` to the clinic schema first, then public, preventing table shadowing.
Mutation boundary
Routers validate and delegate; services own authorization, orchestration, and write-side audit behavior.
Configuration boundary
Weak secrets, permissive production CORS, and unsafe RAG paths fail fast instead of becoming deployment surprises.
Recovery boundary
Audit sinks are fire-and-forget, but failures are logged so user-impacting writes can be recovered from app logs.
TypeScript
0
Frontend type errors tolerated before build
Backend tests
633
Recorded test corpus across service, tenancy, AI, and bootstrap slices
Factory smoke
on
Generated project validation catches broken module pruning and stale templates
CI stages
6
Lint, test, smoke, build, staging migration, production migration gate
Use the factory as the first draft of a serious SaaS product, then spend your energy on the domain that makes it yours.
Sign in