📚 For complete documentation, visit authhero.net
AuthHero is a multi-tenant authentication system that provides identity and access management services. This is the main monorepo containing all packages and applications.
- authhero - The main package for AuthHero that handles authentication and API requests
- create-authhero - A CLI for creating new AuthHero projects
- Adapters:
adapter-interfaces- Interfaces for creating adapters for AuthHerokysely- ORM adapter for SQL databasesdrizzle- ORM adapter for SQL databases (experimental)cloudflare- Custom domains supportsaml- SAML authentication support
- react-admin - Admin interface for managing tenants, users, applications, and more
- auth0-proxy - Proxy service for Auth0 compatibility
- demo - Demo authentication server using the kysely adapter and SQLite
- docs - Documentation site powered by VitePress
The fastest way to get started is using the create-authhero CLI:
npm create authhero my-auth-project
cd my-auth-project
pnpm install
pnpm devThis creates a new project with:
- SQLite database for local development
- Pre-configured authentication endpoints
- Example templates you can customize
To manage your authentication system, use the hosted admin interface:
- Go to manage.authhero.net
- Create a tenant or connect to your local instance
- Configure your applications, users, and authentication settings
Clone and set up the monorepo for development:
git clone https://github.com/authhero/authhero.git
cd authhero
pnpm installStart the demo authentication server:
pnpm demo devThis starts a local auth server at http://localhost:8787 with SQLite storage.
Start all apps in development mode:
pnpm devThis starts:
- Demo auth server
- React admin interface
- Documentation site
- All other apps in parallel
Use these shortcuts to work with individual apps:
pnpm demo # Work with demo app
pnpm react-admin # Work with admin interface
pnpm authhero # Work with main package
pnpm vitepress # Work with docsWe welcome contributions! Here's how to get started:
-
Create a new branch for your changes:
git checkout -b feature/my-feature
-
Make your changes and ensure tests pass:
pnpm test -
Format your code:
pnpm format
AuthHero uses Changesets for version management. When you make changes that should be included in the changelog, create a changeset:
pnpm changesetThis will prompt you to:
- Select packages - Choose which packages are affected by your changes
- Select version bump type:
- Patch (0.0.x) - Bug fixes, documentation updates, non-breaking changes
- Minor (0.x.0) - New features, non-breaking additions
- Major (x.0.0) - Breaking changes that require users to modify their code
- Describe your changes - Write a summary that will appear in the changelog
The changeset will be saved as a markdown file in .changeset/ and should be committed with your changes.
Example:
$ pnpm changeset
🦋 Which packages would you like to include? › authhero
🦋 What kind of change is this for authhero? › minor
🦋 Please enter a summary for this change:
Added support for custom email templates- Push your branch to GitHub
- Open a pull request with:
- Clear description of changes
- Any relevant issue numbers
- Your changeset(s) included
- Wait for review and CI checks to pass
Releases are automated via GitHub Actions when changesets are merged to the main branch. The process:
- Changesets are collected on each PR
- After merge, a "Version Packages" PR is automatically created
- When the Version Packages PR is merged, packages are published to npm
authhero/
├── apps/
│ ├── auth0-proxy/ # Auth0 compatibility proxy
│ ├── demo/ # Demo auth server
│ ├── docs/ # Documentation site
│ └── react-admin/ # Admin interface
├── packages/
│ ├── adapter-interfaces/
│ ├── authhero/ # Main package
│ ├── cloudflare/
│ ├── create-authhero/ # Project generator CLI
│ ├── drizzle/
│ ├── kysely/
│ └── saml/
└── test/ # Integration tests