> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gatojs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction to GatoJS: open-source Next.js kit for business apps

> GatoJS gives you sign-in, organizations, roles and tenant isolation for a Next.js business app as plain code in your own repository.

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.

> [card] [Quickstart](https://docs.gatojs.com/quickstart.md)
>
> Create a project and run it locally in a few minutes.

> [card] [Architecture](https://docs.gatojs.com/concepts/architecture.md)
>
> Learn how the kit, the core and the modules fit together.

> [card] [Build a feature](https://docs.gatojs.com/guides/build-a-feature.md)
>
> Add your own domain feature, tests first.

> [card] [CLI reference](https://docs.gatojs.com/cli/overview.md)
>
> `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.

| | A framework package | GatoJS |
| - | - | - |
| Changing how something works | Config options, overrides or a fork | Edit the file |
| Reading the source | Somewhere in `node_modules` | In your editor, next to your code |
| What breaks your app | An upgrade you didn't write | A change you made and can see in git |
| Getting upstream fixes | `npm update` | `npx gato update`, merged with your changes |

> [card] [Isolation is enforced](https://docs.gatojs.com/concepts/organizations.md)
>
> 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.

> [card] [Roles the server enforces](https://docs.gatojs.com/concepts/auth-and-roles.md)
>
> The menu and the page guard use the same access check. Every server action checks permissions itself.

> [card] [Safe support access](https://docs.gatojs.com/concepts/superadmin-and-service-mode.md)
>
> Superadmin accounts client admins can't touch, impersonation, and a service mode that asks before changing client data.

> [card] [Tests that try to break the code](https://docs.gatojs.com/guides/ai-agents.md)
>
> 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.

| Module | What it does |
| - | - |
| [`audit-logs`](https://docs.gatojs.com/modules/audit-logs) | Who changed what, and when, in each organization |
| [`api-keys`](https://docs.gatojs.com/modules/api-keys) | Organization API keys with scopes, stored as hashes |
| [`uploads`](https://docs.gatojs.com/modules/uploads) | Organization files on local disk or S3-compatible storage |

```bash theme={null}
npx gato add uploads
```

See [Modules overview](https://docs.gatojs.com/modules/overview.md) and the [roadmap](https://docs.gatojs.com/roadmap.md) 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

> [!NOTE]
>
> GatoJS is the open-source release of the kit [Web Amigos](https://webamigos.pl/en) builds client apps on. It is licensed under Apache-2.0. Breaking changes can land before 1.0.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.