Bootwright SaaS boilerplate for building with AI
Stop vibe coding. Start shipping.
For a developer or a small team launching a SaaS with AI, on web and mobile, who writes code with an agent.
- Web, iOS and Android in one repository
- Next.js and Expo share authentication, types and business logic. You write a feature once.
- A failure before delivery is refunded
- If a job fails before delivering its result, the user's quota is returned automatically.
- Three apps in production, code included
- PhotoCV, Transcribe and Postwright run on this foundation. Their full source code is included.
- Set up for Claude Code and Codex
- An AGENTS.md at the root and for web, mobile and backend, four quality agents (tests, review, security, lint) and pull request review in CI.
Sound familiar?
- A week configuring Google & Apple auth before the first user can log in
- Three days wiring DynamoDB to GraphQL, still debugging why real-time updates don't propagate
- Rebuilding cache invalidation and optimistic delete logic for each screen because nothing is shared
- No single billing system that works across web, iOS, and Android without three separate integrations
- A user loses credits because a backend job failed and there's no automatic refund path
- .env files on the repo because proper secret management was going to take another week
- Push notifications broken in production because an APNs certificate expired at 2 a.m.
- No Mac in the team but the iOS app needs to go to the App Store
- Users landing on the wrong screen because cold start dropped the deep link
- Calling an AI API once per item in real time, paying full rate, with no recovery when a request fails midway
- An async AI workflow failing silently at step 4: spinner on screen, error in CloudWatch, quota consumed
- Your AI agent writes code fast, then skips the tests and the security review because nobody asked
What the foundation provides against code generated without guardrails
A coding agent writes fast. Public incidents from the past two years show where it goes wrong when nothing constrains it. Here is what Bootwright settles in advance.
- What happens without guardrailsMissing or wrong access rules. Of 1,645 apps generated with Lovable, 170 exposed their data (CVE-2025-48757). Source
- What Bootwright doesOwner-based access control on the GraphQL API. Each user's file path is derived from their identity on the server and checked before any processing.
- What happens without guardrailsAPI keys in browser code. Moltbook exposed 1.5 million tokens this way in February 2026. Source
- What Bootwright doesProvider keys are stored encrypted in AWS SSM Parameter Store. Each Lambda reads only its own, and no key appears in the code or in environment variables.
- What happens without guardrailsPayment logic that can be changed from the client. The same Lovable flaw let users write “paid” to the database themselves.
- What Bootwright doesCredits and subscriptions go through RevenueCat. The quota is debited and refunded in the workflow, on the server.
- What happens without guardrailsDestructive commands run without checks. In July 2025, an agent deleted a production database during a code freeze. Source
- What Bootwright doesProduction tables have deletion protection and point-in-time recovery.
- What happens without guardrailsCode nobody reviews. In a 2025 Veracode study, 45% of tasks given to a model introduced a known vulnerability. Source
- What Bootwright doesA Claude Code hook rejects any plan that does not schedule tests, review and lint; a security review is added for sensitive changes. Claude reviews every pull request in CI.
- What happens without guardrailsSilent failures and load nobody planned for.
- What Bootwright doesThree retries per step, an alarm on every workflow failure, an error queue on asynchronous paths, and serverless infrastructure defined in code with CDK.
- What happens without guardrailsThe same event processed twice: double charge, double generation.
- What Bootwright doesA replayed event does not restart the same job. Status and credit updates are conditional writes.
- What happens without guardrailsUser text sent to the model as is.
- What Bootwright doesTyped text is cleaned and isolated before it is sent to the model, and model refusals are detected instead of being delivered as results.
The path of an AI job
The user starts a job
From the web or mobile. The database write triggers the workflow, and the quota is debited.
DynamoDB → EventBridge Pipe → Step Functions
The workflow chains the models
Steps run in sequence or in parallel on Bedrock, Vertex AI, OpenAI or Mistral, with up to three retries each. Large volumes go through the batch APIs of Vertex AI, OpenAI or Mistral, at about half the price.
createStep · createMapStep · createMergeStep
If a step fails
The quota is refunded, the status switches to error, then the workflow is marked as failed, in that order. The app shows a readable error and an alarm alerts the team.
RefundQuota → UpdateStatusError → WorkflowFailed
The result arrives
The screen updates in real time. On mobile, a push notification goes to the phone.
AppSync · DynamoDB Streams → SQS FIFO → Lambda
What's in the repository
- Web
- Next.js 16, React 19, Tailwind CSS 4, shadcn/ui, TanStack Query, Zustand
- Mobile
- Expo SDK 54 (React Native) for iOS and Android. Optional.
- Authentication
- Cognito: passwordless email code, Google, Apple. Legal pages ready for the App Store.
- Data
- AppSync (real-time GraphQL), DynamoDB, S3 with lifecycle rules
- AI backend
- CDK, Step Functions, Lambdas in TypeScript, Python or Rust on ARM64, and Python as a Docker image
- AI providers
- Bedrock (Claude), Vertex AI (Gemini), OpenAI, Mistral, and a template for any OpenAI-compatible provider
- Payments
- RevenueCat on iOS, Android and web: subscriptions, credits and one-time packs
- Secrets
- Keys encrypted in SSM Parameter Store, read Lambda by Lambda
- Notifications
- Expo Push, receipt checks, cleanup of invalid tokens
- Observability
- X-Ray, CloudWatch alarms, SNS alerts, Sentry, PostHog or Mixpanel
- Tooling
- Strict TypeScript, Biome and Ruff, Vitest and pytest, CI on every push, interface in five languages
- Documentation
- More than 45 pages
- Cost
- Everything is billed by usage. With no users, the AWS bill is $0.
Three reference applications included
PhotoCV, Transcribe and Postwright show how the same foundation can serve very different products. PhotoCV runs on the web, iOS and Android; Transcribe is a web-only app, as mobile is optional; Postwright is an MCP server used from an AI assistant, with a companion website. Their complete source code is included with Bootwright.
PhotoCV A professional photo generation app that exercises the complete web and mobile stack. Explore PhotoCV
Transcribe A straightforward web app for timestamped, on-demand audio transcription. Open Transcribe (Opens in a new tab)
Postwright An MCP server that sends postal letters from an AI assistant, with a web dashboard for settings and status tracking. Open Postwright (Opens in a new tab)
Before you buy
- The database is DynamoDB. If you want PostgreSQL and free-form SQL queries, this foundation is not for you.
- Everything runs on AWS. You need an AWS account and some familiarity with CDK.
- Payments go through RevenueCat, on all three platforms.
Pricing
$349Early Access
One-time purchase. Full source code. Lifetime updates.
- Complete monorepo (Next.js + Expo)
- AWS CDK infrastructure
- PhotoCV, Transcribe and Postwright source code
- AGENTS.md, CLAUDE.md and quality agents for Claude Code and Codex
Frequently asked questions
What is included in Bootwright?
A monorepo with web (Next.js) and optional mobile (Expo, React Native) in a single codebase, hosted on AWS. It covers authentication, data and storage, user isolation, secrets, AI orchestration, payments and quotas, push notifications, analytics, developer tooling and observability, with more than 45 pages of documentation. The complete source code of PhotoCV, Transcribe and Postwright is provided.
How much does Bootwright cost?
$349 (€299), as a one-time purchase. The price includes the complete source code and lifetime updates. Bootwright is in Early Access.
What is the tech stack?
Next.js 16, React 19, Tailwind CSS 4 and shadcn/ui for the web, Expo SDK 54 (React Native) for iOS and Android, optional. On the backend: AWS Amplify and CDK, Step Functions, DynamoDB, S3, and Lambdas in TypeScript (Node.js 24), Python 3.12 or Rust on ARM64 Graviton, plus Python as a Docker image for heavy processing. Authentication goes through AWS Cognito: passwordless email code, Google and Apple Sign-in.
Which AI models are supported?
AWS Bedrock (Claude), Google Vertex AI (Gemini), OpenAI and Mistral, plus a template for any provider compatible with the OpenAI API. Step Functions workflows chain or parallelize several models, in real time or in batch through the Vertex AI, OpenAI or Mistral batch APIs.
How much does hosting cost?
Everything is billed by usage on AWS, with the Free Tier. As long as there are no users, the bill is $0.
How are payments handled?
By RevenueCat, on iOS, Android and web, with subscriptions, consumable credits and one-time packs. If a job fails before delivering its result, the quota it consumed is refunded automatically.
How do I buy and get started?
You buy with a Stripe payment from this page. Then you clone the repository, configure your keys, deploy, and code what is specific to your product.