Skip to content

Development Setup ​

This guide explains how to set up the AuthHero development environment.

Prerequisites ​

  • Node.js (version 16 or higher)
  • npm, yarn, or pnpm package manager
  • Git

Getting the Code ​

  1. Clone the repository:
bash
git clone https://github.com/yourusername/authhero.git
cd authhero
  1. Install dependencies:
bash
pnpm install

Project Structure ​

AuthHero is organized as a monorepo with several packages and applications:

  • packages/: Contains the core library and adapters
  • apps/: Contains the admin UI, the docs site, the marketing website and the conformance runner

Running the Projects ​

You can run all projects in parallel with:

bash
pnpm dev

Or run a specific project:

bash
pnpm <project-name>

For example:

bash
pnpm admin

Building ​

Build all projects:

bash
pnpm build

Or build a specific project:

bash
pnpm <project-name> build

Generated files ​

Some generated files are committed, so builds don't rewrite the source tree. Builds only check that they're current and fail if they're stale.

FileRegenerate after changingCommand
packages/adapter-interfaces/src/types/codeHookApiDeclarations.generated.json: the TypeScript declarations of each trigger's Action api, sent to AI generatorspackages/adapter-interfaces/src/types/codeHookApiTypes.tspnpm --filter @authhero/adapter-interfaces generate:action-types

The @authhero/adapter-interfaces build runs check:action-types, so CI fails on a stale file (the pre-commit hook doesn't build, so it won't catch it). If it fails with "Action API declarations are stale", run the command above and commit the result.

Next Steps ​

After setting up your development environment, you might want to:

  1. Read the code style guide
  2. Learn about testing
  3. Understand the release process

Dual-licensed: AGPL-3.0-only or commercial license.