OpenSaaS Stack
Get Started
Access control handled for you

Describe a feature.
Claude Code builds it.

OpenSaaS Stack is a config-first Next.js stack built for AI-assisted development. Tell Claude Code what you want and it ships real features — with security and access‑control baked in.

Start in seconds

$npm create opensaas-app@latest my-app

One config, fully secured

Define your data and access rules in opensaas.config.ts. The engine secures every database operation automatically.

opensaas.config.ts
typescript
import { config, list } from '@opensaas/stack-core'
import { text, select, relationship } from '@opensaas/stack-core/fields'

export default config({
  db: { provider: 'sqlite', url: 'file:./dev.db' },
  lists: {
    Post: list({
      fields: {
        title: text({ validation: { isRequired: true } }),
        status: select({
          options: [
            { label: 'Draft', value: 'draft' },
            { label: 'Published', value: 'published' },
          ],
          defaultValue: 'draft',
        }),
        author: relationship({ ref: 'User.posts' }),
      },
      access: {
        operation: {
          // Anonymous visitors only see published posts; an access rule can
          // return a boolean or a Prisma filter that scopes the rows.
          query: ({ session }) => (session ? true : { status: { equals: 'published' } }),
          // Only the author can edit their own post.
          update: ({ session }) => (session ? { authorId: { equals: session.userId } } : false),
        },
      },
    }),
  },
})

From zero to feature in three steps

No boilerplate, no manual wiring. Scaffold, run, and let Claude Code do the building.

1

Step 1

Scaffold your app

npm create opensaas-app

One command sets up a fully configured OpenSaaS Stack project.

2

Step 2

Start the dev server

pnpm dev

Your admin UI, database, and access control are wired up out of the box.

3

Step 3

Describe a feature

Ask Claude Code

Tell Claude Code what you want. It builds it on OpenSaaS Stack for you.

Security by default

Access control wraps every database operation. Denied requests fail silently — no data leaks, no boilerplate.

Config-first development

Define schema, fields, and rules in one place. Prisma schema and TypeScript types are generated for you.

Built for Claude Code

Clear, predictable patterns mean AI assistants can map your requirements to real, working features.