Your AI agent is flying blind
No AGENTS.md, no specs, no conventions. Every prompt starts with “here’s my folder structure…” and ends with wrong-file edits.
Agent-first · Next.js SaaS kit
Ship production SaaS in weeks.
Orgs, billing, and agent-ready docs — composed from packages, not forked from a starter.
Built for founders who ship with AI — and need production infrastructure underneath.
SaaS foundersIndie hackersAgenciesStartup teamsAI-native builders
The pain points we kept hearing — on Reddit, in support threads, and from our own rebuilds.
No AGENTS.md, no specs, no conventions. Every prompt starts with “here’s my folder structure…” and ends with wrong-file edits.
Your customer has three orgs. The payment plugin bills the person. Accounting sends you a sad emoji.
Inline card forms looked cool in the demo. Switching payment providers now means rewriting half the app.
membersPerOrg = 25 hardcoded in a useEffect. Change the plan in admin? Good luck finding every copy.
Isotopekit was built from the docs up — agent-first conventions, org billing, webhook-driven activation, and packages you upgrade instead of re-merging.
Three ideas behind the monorepo — agent-first docs, production SaaS surfaces, and composable packages.
AGENTS.md, structured docs, and skills so AI tools ship features — not invent folder names.
Orgs, billing, entitlements, agency mode, and admin — the unglamorous work already done.
Versioned @isotopekit/* packages with extension points. Your routes stay yours; the platform stays upgradeable.
Config for navigation. Bootstrap for secrets. Packages never import kit env — so you can update without merging a fork.
Sidebar and menus from config — no hardcoded demo links in core UI.
@isotopekit/types NavItem · IsotopekitConfig.navigation.main · AppSidebar
The app injects logger, db, auth, email, plans, and billing — packages never read kit env.
apps/starter/lib/bootstrap/* · createX / configureX · bootstrapFull() / bootstrapEdge()
Mount your own Hono routes on /api/v1 without editing package source.
createV1App({ extensions: [(app) => app.route(...)] }) · lib/adapters/v1-route.ts
Product-specific plans and add-ons — starter keeps defaults, your app brings its own catalog.
apps/starter/db/seed/catalog.ts · configureBillingOps in lib/bootstrap/full-wire.ts
Merge your product tables with platform schema. Migrations stay app-owned.
createDb({ connectionString, schema }) · createDrizzleConfig · apps/starter/db/
User shell in apps/starter; org chrome from @isotopekit/org-ui; admin and agency shells take app { name, userHome }.
lib/app-config.ts · @isotopekit/org-ui · createAdminLayout / createAgencyPanelLayout
Turn billing, admin, or agency surfaces on or off per product.
IsotopekitConfig.features: { billing, admin, agency }
Route files live in your app. Composition-root wires live in lib/bootstrap/*. Reusable server, client, and handler exports live in packages — and stay unit-testable with fakes.
Bump @isotopekit/* with semver — extension points and your app routes stay stable. No more merging upstream into a forked starter every release.
Semver-stable packages
Update @isotopekit/* with pnpm — minor and patch releases preserve extension contracts.
Your app stays put
Product routes, pages, and isotopekit.config.ts live in apps/starter. Platform code upgrades underneath.
No merge-upstream hell
Consumer apps depend on versioned packages instead of git-pulling an entire starter repo every month.
Flip a card for the technical layer. Press ⌘K for the rest.
apps/starter is a thin composition root — your routes, our packages, wired at lib/bootstrap.
Demos look fine until billing, multi-tenant orgs, and “we’ll add that later” catch up.
Representative voices from founders and teams building B2B SaaS — org billing, upgrades, and agency flows that don’t become weekend projects.
“We stopped rewriting billing every time Stripe hiccuped. Org-level subscriptions just work — webhooks and all.”
“The monorepo finally made sense. We extend through config, bump packages, and our routes never get touched.”
“Agency mode sold our board. One hub, client workspaces, shared pool — we quoted six weeks, shipped in two.”
“Adding Google took one coffee. GitHub was the same pattern. Better Auth did the heavy lifting.”
18 @isotopekit/* packages in four tiers. The starter is the composition root — it injects options so packages stay env-free and upgradeable.
Core
cfg
db
types
log
ui
Domain
id
auth
org
bill
plans
user
Modules
admin
agency
org-ui
price
ops
Transport
api
apps/starter
lib/bootstrap wires options
18 packages · 7 wired from the app · core → domain → modules → transport
Env stays in the app
Packages take createX / configureX options. Unit-test with fakes — no .env required.
Composition root
lib/bootstrap wires logger · db · plans · auth · email · billing · api once at boot.
Contracts vs surfaces
organization stays portable; org-ui owns React chrome. billing holds ports; billing-ops owns checkout.
Layer detail
Composition root — routes, env, and package wiring
Product UI surfaces and billing operations
Portable HTTP — Hono v1, no Next imports
Shared business kernel — auth, org, plans, billing contracts
Infra primitives — leaf packages with minimal deps
Unlock Reactor Mode or run “Show Architecture Layers” via ⌘K to reveal implementation paths.
Core, domain, modules, and transport — import what you need. The app wires options; packages stay env-free.
@isotopekit/configEnv presets (core/auth/billing) — app extends via @/env
@isotopekit/typesShared types, NavItem, IsotopekitConfig, defineProductConfig
@isotopekit/dbDrizzle schema, createDb({ connectionString }), queries
@isotopekit/loggerPino createLogger({ level, logFile }) with request context
@isotopekit/emailcreateEmailService + injectable transport for tests
@isotopekit/uishadcn primitives, shared components, progress hooks
@isotopekit/identityAuth options, branding, org-type, session services
@isotopekit/authBetter Auth factory, session guards, createAuthClientForApp
@isotopekit/organizationPortable workspace services, actions, loaders
@isotopekit/billingBilling contracts, org-status, read-models, ports
@isotopekit/plansconfigurePlans / getDefaultPlanId, entitlements math
@isotopekit/userAccount settings, sessions, profile actions
@isotopekit/org-uiOrg switcher, branding chrome, plan usage, member quotas
@isotopekit/billing-opsconfigureBillingOps, checkout, webhooks, Dodo adapter
@isotopekit/pricingPricing page loaders, plan cards, checkout dialogs
@isotopekit/adminPlatform operator shell — layouts take app { name, userHome }
@isotopekit/agencyAgency hub shell, client allocation, white-label
@isotopekit/apiHono v1 routes, portable HTTP transport
Full monorepo, starter composition root, and semver package updates — so you ship SaaS, not plumbing.
Full monorepo, starter app, and package updates while we polish launch.
For startups shipping one product on the kit.
White-label and multi-client workflows built in.
Short answers. No sales-deck energy.
Isotopekit
Stop duct-taping auth, billing, and org limits every weekend. Start from infrastructure built for production B2B.
Social login in ~20 minutes.Same pattern for every provider.
Google ships wired today. GitHub, Microsoft, Apple, LinkedIn, and Discord follow the same Better Auth steps — no custom OAuth layer.
~20 min
per provider (OAuth console + env + bootstrap/auth.ts)
Files touched per provider
packages/core/config/src/env/auth.tsOptional Zod env keys in the auth preset (if kit-wide)
apps/starter/env.tsOr product-only keys via createEnv extends
apps/starter/.envProvider client id + secret
apps/starter/lib/bootstrap/auth.tsAdd entry under socialProviders (+ trustedProviders)
Account linking is enabled for trusted providers. UI buttons render only when credentials are wired in the app's auth options — same pattern as Google today.