> ## 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.

# Contributing to GatoJS

> How to report issues, open pull requests and get them merged in the GatoJS repository: setup, commit conventions, verification gates, review, security reports and licensing.

GatoJS is a working Next.js application (the core plus optional modules) whose code is copied into every new project. A change in the kit reaches every project built from it, so the bar is correctness first. Contributions are welcome: bug reports, fixes, documentation and new modules.

The repository is [github.com/webamigos/gatojs](https://github.com/webamigos/gatojs).

> [!NOTE]
>
> GatoJS is moving from an internal kit to an open-source project. Parts of the in-repository documentation are still in Polish; English is the language for all new content.

## Before you start

* For anything larger than a small fix, **open an issue first** so we can agree on the approach.
* Read `AGENTS.md` and `CLAUDE.md` in the repository root. They are the rules for humans and AI agents alike: data access through `getOrgContext()` with an `organizationId` filter, the service mode contract, no code comments except `// WHY:`, no edits to generated files. The [code patterns](https://docs.gatojs.com/guides/code-patterns.md) guide explains them.
* Kit-only rules (the CLI, manifests, releases) are in `kit/CLAUDE.md`; this tab explains them: [Kit repository](https://docs.gatojs.com/contributing/kit-repository.md), [New kit module](https://docs.gatojs.com/contributing/new-kit-module.md), [Releases](https://docs.gatojs.com/contributing/releases.md).
* New decisions are recorded as ADRs in `docs/adrs/`; known gotchas are collected in `docs/lessons.md`.

## Set up

```bash theme={null}
git clone https://github.com/webamigos/gatojs.git
cd gatojs
npm ci                  # the app and the workspace packages, CLI included
cp .env.example .env
docker compose up -d    # PostgreSQL and mailpit
npx prisma migrate dev --name init
npm run dev             # http://localhost:3000
```

You need Node.js 22 with npm 11 (`packageManager` pins `npm@11.21.1`; older npm rewrites `package-lock.json`). The kit repository is a full reference app with every module installed; see [Installation](https://docs.gatojs.com/installation.md) for ports, environment variables and the first admin.

## Issues

* **Bugs and feature requests:** GitHub issues, using the templates. Include the kit version (`kitVersion` in `.wa/kit.json` of your project, or the commit), steps to reproduce and what you expected.
* **Security vulnerabilities:** never in a public issue. See [Security](#security).

## Pull requests

* Target `main` and keep a pull request to one concern. Fill in the pull request template.
* **Commit messages** follow [Conventional Commits](https://www.conventionalcommits.org/) with a lowercase subject, for example `feat(core): …` or `fix(uploads): …`. Husky runs lint-staged and commitlint on commit. Commit types also decide kit releases, so pick them carefully: `feat` releases a minor version, `fix` and `perf` a patch ([Releases](https://docs.gatojs.com/contributing/releases.md)).
* **Tests for every behaviour you change.** A bug fix comes with a test that fails without the fix. Expected values are literals or come from a spec, never from the code under test. See [Testing](https://docs.gatojs.com/guides/testing.md).
* **Mutation gate.** Data access, auth, organizations and roles are covered by mutation testing: `npm run test:mutation:task -- <files>` and `npm run test:mutation:gate`. A surviving mutant needs a test, or a justified `allowed` entry that a maintainer approves.
* **Kit files.** If you change files of a kit module, bump that module's `version` in `kit/modules/<module>.json` and run `npm run wa -- kit sync`.
* **Generated files.** Never edit generated files or `wa:*` regions; run `npm run wa -- generate` and commit the result.
* **User-facing text** goes into both `pl` and `en` messages.
* **Schema changes** need migration notes for projects, since the kit commits no migrations.

## Verify before you push

```bash theme={null}
npm run verify
```

`npm run verify` runs lint, typecheck, unit tests and a production build of the app, then the workspace packages' own checks and the hook tests. For tool package changes also run that package's gate:

```bash theme={null}
npm run verify --prefix packages/gato-cli          # lint, typecheck, tests, bundle build
npm run verify --prefix packages/create-gato-app   # lint, typecheck, tests, build
```

After a change in `packages/gato-cli/src`, commit the rebuilt bundle `.wa/bin/wa.mjs` with it ([Kit repository](https://docs.gatojs.com/contributing/kit-repository.md#the-cli-bundle)).

## Code review

You do not need CodeRabbit. Review your own change against `.claude/skills/wa-code-review/SKILL.md`, the checklist of what `npm run verify` cannot check (organization scoping, service mode, generated files, tests, i18n), and tick the pull request template. In Claude Code the same checklist runs as the `wa-code-review` skill. If CodeRabbit comments on your pull request, treat its comments like any reviewer's.

A pull request merges on the required checks and a maintainer's approval.

## Security

Report vulnerabilities privately to **[security@webamigos.pl](mailto:security@webamigos.pl)** or through [GitHub private vulnerability reporting](https://github.com/webamigos/gatojs/security/advisories/new). Include the affected area (core, a kit module, the CLI), the kit version, steps to reproduce or a proof of concept, and the impact as you understand it. A partial report is better than none.

| Step | Target |
| - | - |
| Acknowledgement | 48 hours |
| First assessment | 7 days |
| Fix for a confirmed issue | Depends on severity; you are kept informed |

Reporters are credited in the release notes unless they ask not to be. Organization isolation, authentication and roles, the signup gate and invitations, the kit modules and the CLI are in scope. Third-party dependency issues without a GatoJS-specific impact, projects that changed the affected kit code, and findings that need a compromised machine or admin account are out of scope. Fixes go to the latest kit version; projects pick them up with [`gato update`](https://docs.gatojs.com/cli/update).

## Code of conduct

Everyone taking part follows the [Contributor Covenant Code of Conduct](https://github.com/webamigos/gatojs/blob/main/CODE_OF_CONDUCT.md).

## License

GatoJS is licensed under the [Apache License 2.0](https://github.com/webamigos/gatojs/blob/main/LICENSE). By contributing, you agree that your contributions are licensed under the same license.


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