Contributing to LoyaltyOS
Thanks for your interest in contributing. LoyaltyOS is MIT-licensed and welcomes contributions of all kinds.
Getting Started
- Fork the repo and clone it locally.
- Install dependencies:
pnpm install - Start infrastructure:
docker compose up -d - Set up the database:
pnpm --filter @loyaltyos/api db:reset && pnpm --filter @loyaltyos/api db:seed - Start dev mode:
pnpm dev
Conventions
Before pushing, make sure your code passes:
pnpm typecheck # TypeScript strict mode — no implicit any
pnpm lint # ESLint + Prettier
pnpm test # Vitest (unit + integration)
Commits
We use Conventional Commits:
feat:— new featurefix:— bug fixdocs:— documentationrefactor:— code restructuring without behavior changetest:— test additions or changeschore:— tooling, dependencies, config
Pre-commit hooks (Husky) run lint-staged and commitlint on your changes automatically.
TypeScript
- Strict mode everywhere. Do not disable
strictin tsconfig. - No
anywithout explicit justification. - No
@ts-ignore— use@ts-expect-errorwith a comment explaining why.
Code Style
- Prettier with single quotes, trailing commas, and 100-char print width.
- All comments and documentation in English.
- Each
packages/*ships its own README.md with public API examples.
Pull Request Checklist
- TypeScript typechecks:
pnpm typecheck - Lint passes:
pnpm lint - Tests pass:
pnpm test - New features include tests
- API changes are reflected in the OpenAPI spec
- Commit messages follow Conventional Commits
Reporting Bugs
Open an issue on GitHub. Include:
- Steps to reproduce
- Expected vs actual behavior
- Environment: OS, Node version, Docker version
- Relevant logs or screenshots
License
By contributing, you agree that your contributions will be licensed under the MIT License.