Skip to main content
GatoJS is an open-source Next.js kit for multi-tenant business applications. Sign-in, invitations, organizations, roles and an admin panel land in your repository as plain code. There is no framework package to update and nothing to fight: you read it, change it and ship it.

Quickstart

Create a project and run it locally in a few minutes.

Architecture

Learn how the kit, the core and the modules fit together.

Build a feature

Add your own domain feature, tests first.

CLI reference

create-gato-app and the gato command.

The problem

Every business app starts with the same weeks of work: accounts, teams, permissions, invitations, emails, an admin panel, deployment. It is never the part the client pays for, and it is the part where a mistake costs the most: one missing filter and a customer sees another customer’s data. The usual answers both hurt. A SaaS boilerplate gives you code once and leaves you alone with it. A framework package keeps the code in node_modules, where changing how something works means config flags, overrides or a fork, and an upgrade you did not write can break your app.

Why GatoJS

Copied into your repo, not installed from npm. A small CLI copies the core and the modules you choose into a fresh repository. It’s plain Next.js, Prisma and TypeScript, next to your own code. When the kit moves on, gato update merges the new version into your project the way git merges a branch.

Isolation is enforced

Every record belongs to an organization. A runtime guard rejects queries without an organization filter, and an isolation test on a real database proves it.

Roles the server enforces

The menu and the page guard use the same access check. Every server action checks permissions itself.

Safe support access

Superadmin accounts client admins can’t touch, impersonation, and a service mode that asks before changing client data.

Tests that try to break the code

Tests are written before the code, and mutation testing blocks changes whose tests don’t catch real bugs.

What’s in the core

  • Sign-in and invitations: email and password, password reset and invitations, built on better-auth. Public sign-up stays off until you turn it on.
  • Organizations: one flag (MULTI_ORG) switches between an app for a single company and a multi-tenant SaaS with an organization switcher. The data model stays the same.
  • Roles: user, admin and superadmin across the app; owner, admin and member inside an organization.
  • Two languages from day one: Polish and English through next-intl, with each feature’s translations next to its code.
  • Email that works locally: SMTP or Resend in production, mailpit on your machine.
  • Production basics: environment validated at startup, OpenTelemetry logs, security headers, a health check endpoint, a Dockerfile and a Railway config.
  • Tests: Vitest, Playwright, integration tests on real PostgreSQL and Stryker mutation testing.

Modules

Add modules when a project needs them and remove them when it doesn’t. A module only adds files: the core learns about it through a generated registry, so it never edits core code.
See Modules overview and the roadmap for what’s planned.

Built on tools you already know

Next.js 16 · React 19 · TypeScript · Tailwind CSS 4 · shadcn/ui · Prisma 7 · PostgreSQL · better-auth · next-intl · Vitest · Playwright · Stryker · OpenTelemetry · Docker
GatoJS is the open-source release of the kit Web Amigos builds client apps on. It is licensed under Apache-2.0. Breaking changes can land before 1.0.