The open-source backend for AI products
Multi-tenant auth, billing, payments, credits, and an admin console, already wired together. Self-host it and every tenant's records sit in your own Postgres. Hand the repo to your AI coding tool instead of a blank starter.
What you get
Identity, payments, entitlements, and usage live in one codebase. Wiring like "a purchase grants credits, a refund revokes them" is code you can read and change.
Multi-tenant auth
Isolated realms, each with its own users, roles, apps, and branding.
- Email/password and one-time-code login
- Google, GitHub, Apple, WeChat, Discord, LDAP
- Passkeys, TOTP 2FA, OpenID Connect
RBAC, orgs & client apps
Realm-level roles, organizations with their own membership, and app registration with scoped credentials.
- Per-realm roles and org tiers
- Client App registration
- OAuth 2.0, device flow, cross-app SSO
Billing & payments
Subscriptions, one-time purchases, and invoices, mapped to entitlements per client app.
- Stripe, Creem (merchant of record), WeChat Pay
- App Store / Google Play in-app purchases
- Multi-currency pricing & invoices
Points & credits
Prepaid balances that meter product usage, per user.
- Top-ups, refunds, expiry
- Per-user ledgers & grants
- Rolling quota windows
Consent & compliance
Versioned terms and privacy policies per realm, hosted or external.
- Version-bound re-consent
- Hosted or external pages
- Auditable account deletion
MCP server for AI agents
Agents query your realm through permission-gated tools instead of hand-written REST calls.
- Nine read-only tools
- Browser OAuth + per-user RBAC
- Streamable HTTP at /mcp/{realmId}
From repository to AI product in three steps
Deploy the foundation, shape it with AI, build your product logic.
Deploy with Docker
Copy the deploy files from docker/deploy/, edit three configs, and run docker compose up -d. Herald, PostgreSQL, and Redis start on one machine; add Caddy when you want HTTPS.
Shape it with AI
Point an AI coding tool at the repo. The docs ship as llms.txt, the API as OpenAPI, and an MCP server exposes admin tools, so the agent works from real interfaces instead of guesses.
Build your product logic
Your app integrates through the Node, Rust, and browser SDKs and OAuth 2.0 endpoints, then keeps iterating on the experience customers pay for.
Herald vs. the alternatives
Auth services stop at login. The table shows what else ships in the same Herald codebase.
| Herald | Auth0 | Supabase | Keycloak | |
|---|---|---|---|---|
| Multi-tenant auth | Included | Enterprise only | Manual setup | Included |
| Subscription billing | Built-in | No | No | No |
| Points & credits | Built-in | No | No | No |
| Self-hosted | Yes | Cloud service | Yes | Yes |
| Open source | Apache-2.0 | No | Partial | Apache-2.0 |
Frequently asked questions
What people usually ask before starting.
What is Herald?
How does Herald help me build faster?
How is Herald different from an auth provider?
When is a hosted service the better choice?
What does multi-tenant mean in Herald?
How do I deploy Herald?
What payment providers does Herald support?
What tech stack does Herald use?
Is Herald free and open source?
Can I get help evaluating or deploying Herald?
Build the AI product users pay for
Create a realm on the live demo and look around first, or clone the repo and run it yourself. Apache-2.0, no per-user fee, user data in your own database.
Questions, or building something with Herald? Email us: zsy.evan@gmail.com