AI build guide

Build a SaaS app with AI—and keep the code

A SaaS build becomes real when tenant boundaries, permissions, failure states, billing events, and operations work together—not when a dashboard merely renders.

01

Model the product boundary

Define users, tenants, roles, activation, billing states, and the smallest workflow that creates value.

02

Protect the server boundary

Authorisation, tenant checks, webhooks, and secrets belong on trusted server paths.

03

Prove the release

Run migrations, type checks, tests, a production build, and a post-deploy smoke test.

04

A production-shaped Xroga prompt

Build a multi-tenant SaaS workspace for small teams. Define owner, admin, and member permissions; use server-enforced tenant checks; persist projects and tasks; integrate hosted checkout through an authorised provider; verify signed webhooks; include empty, loading, error, and cancellation states; run type checks, tests, and a production build; report deployment separately from verification.

05

Evidence to require

Review the repository diff, migration files, server authorization paths, webhook verification, and actual command output. A rendered dashboard or successful checkout redirect is not proof of tenant isolation or payment.

06

Before calling it production-ready

Review permissions, data handling, error states, accessibility, mobile behaviour, tests, environment configuration, observability, and rollback. The exact checklist must follow the project rather than a fixed framework template.