开源的用户管理解决方案,自带前端组件和管理后台。
Go to file
Bilal Godil 7f4a15078d Address review findings on subscription wind-down handling
- Clear cancel_at_period_end when switching plans on a Stripe sub —
  paying to switch is an explicit "keep me subscribed", and Stripe
  otherwise persists the flag so the newly paid plan would still die
  at the period boundary. Also reset the locally written canceledAt /
  endedAt wind-down marks so the reactivated sub doesn't end early.
- Prefer active subs over winding-down ones when several in-effect
  subs share a productId in the product list (partial cancel of a
  stackable product could otherwise hide the cancel button).
- Extract isSubscriptionCancelable and use it in both the product
  list's is_cancelable field and the cancel route's filter, so
  is_cancelable: false always implies the DELETE returns 400 — for
  Stripe subs too, which previously re-ran the cancel silently. The
  cancel route now also updates the local row eagerly (mirroring the
  refund route) instead of waiting for the webhook sync.
- Give the by-subscription-id cancel branch the same already-canceled
  error, and stop claiming past_due/incomplete subs are "already
  canceled" — they get their own message.
- Treat canceled-at-period-end subs as replaceable conflicts in
  validatePurchaseSession, so buying another plan in the same product
  line during a wind-down is no longer rejected as "already has a
  one-time purchase". Scoped narrower than isSubscriptionInEffect so
  payment retries of incomplete subs aren't rejected as duplicates.
- Make isSubscriptionInEffect's parameter a union so callers must
  actually have one of the endedAt fields, and rename
  resolveActivePlanSubscription to resolveInEffectPlanSubscription to
  match its new semantics.
- Tests: unit tests for both predicates and the plan-usage wind-down
  resolution, a validatePurchaseSession wind-down conflict test, and
  e2e coverage for stackable partial-cancel shadowing, by-id double
  cancel, and same-line replacement during wind-down.
2026-07-16 14:03:08 -07:00
.agents/skills feat(hexclave): PR 2 — visible rebrand (Hexclave brand goes public) (#1481) 2026-05-26 19:18:20 -07:00
.changeset Disable changesets changelogs 2026-01-12 15:21:56 -08:00
.claude refactor: migrate config parsing from Babel AST to jiti (#1661) 2026-06-29 10:25:11 -07:00
.cursor Remove afterFileLint hook from Cursor 2026-07-10 10:46:02 -07:00
.devcontainer feat(hexclave): PR 2 — visible rebrand (Hexclave brand goes public) (#1481) 2026-05-26 19:18:20 -07:00
.github Fix all good script to use pagination 2026-07-13 15:39:10 -07:00
.vscode Make it clear there are more SDK packages 2026-06-16 10:37:58 -07:00
apps Address review findings on subscription wind-down handling 2026-07-16 14:03:08 -07:00
configs Silence spurious import.meta CJS warning during pnpm run dev (#1751) 2026-07-08 20:11:33 -07:00
docker Revert "Migrate backend transport from Next.js to ElysiaJS (WIP) (#1630)" 2026-07-13 12:38:53 -07:00
docs feat: add CLI Auth dashboard app (#1739) 2026-07-08 12:34:34 -07:00
docs-mintlify Update reminders 2026-07-13 15:34:36 -07:00
examples chore: update package versions 2026-07-06 23:34:27 +00:00
packages Treat canceled-at-period-end subscriptions as still in effect 2026-07-16 13:19:07 -07:00
patches Fix MS OAuth (#457) 2025-02-21 19:39:22 +01:00
scripts Various improvements 2026-07-13 13:40:56 -07:00
sdks [Fix]: OOM Risk with Data Table (#1766) 2026-07-14 11:06:41 -07:00
skills/hexclave feat(hexclave): PR 5 — internal symbol/path/package renames + brand strings (#1547) 2026-06-03 18:57:09 -07:00
.dockerignore feat(hexclave): PR 5 — internal symbol/path/package renames + brand strings (#1547) 2026-06-03 18:57:09 -07:00
.gitignore [Feat] [Refactor]: Implement Bulldozer JS (#1700) 2026-07-02 10:09:46 -07:00
.gitmodules Update GitHub URL 2026-05-19 10:27:53 -07:00
AGENTS.md docs(agents): add comment-style guidance and symlink CLAUDE.md to AGENTS.md (#1725) 2026-07-10 19:17:50 -07:00
CHANGELOG.md Add 6/26/26–7/10/26 changelog entries (#1753) 2026-07-13 18:32:53 -07:00
CLAUDE.md docs(agents): add comment-style guidance and symlink CLAUDE.md to AGENTS.md (#1725) 2026-07-10 19:17:50 -07:00
CONTRIBUTING.md Rename port prefix envvar 2026-05-27 18:09:52 -07:00
LICENSE feat(hexclave): PR 2 — visible rebrand (Hexclave brand goes public) (#1481) 2026-05-26 19:18:20 -07:00
package.json Make dev script exit when deps not running 2026-07-10 18:11:22 -07:00
pnpm-lock.yaml Revert "Migrate backend transport from Next.js to ElysiaJS (WIP) (#1630)" 2026-07-13 12:38:53 -07:00
pnpm-workspace.yaml [Feat] [Refactor]: Implement Bulldozer JS (#1700) 2026-07-02 10:09:46 -07:00
README.md Add "For AI agents" section to README (#1563) 2026-06-05 17:01:13 -07:00
skills-lock.json Auth app redesign (#1367) 2026-05-19 23:03:46 -07:00
turbo.json dev:tui now builds packages again 2026-07-10 11:27:57 -07:00
vitest.shared.ts Migrate backend transport from Next.js to ElysiaJS (WIP) (#1630) 2026-07-09 21:39:28 -07:00
vitest.workspace.ts Hosted components (#1229) 2026-03-10 11:29:05 -07:00

Hexclave

Hexclave

The user infrastructure platform.

Hexclave handles everything around your users: authentication, teams, payments, emails, analytics, and much more. Start in minutes on the hosted cloud. Your data is always yours to export and self-host.

Website · Docs · Dashboard · Discord

License SDKs Deploy


Where Hexclave fits in the infrastructure stack

Get started

Setting up Hexclave is one prompt. Paste this into your coding agent of choice:

Read skill.hexclave.com and help me setup hexclave in this project

For AI agents

If you're an AI coding agent, use your web fetch tool or curl the skill documentation for up-to-date integration instructions:

curl -sSL "https://skill.hexclave.com?question=<your-question>&context=<your-context>"

What's included

Hexclave ships as a catalog of apps you switch on as your product needs them. Each one is built on the same user model, and new apps land regularly.

  Authentication

Authentication that just works with passkeys, OAuth, and CLI auth. Drop in one component and ship the whole flow; auth methods toggle from the dashboard with no code changes needed.

Authentication

  Teams

Build for teams, not just users, with workspaces, email invites, and roles that actually gate the work. The workspace switcher remembers selection, invites auto sign up new users, and permissions hold up under audit.

Teams

  RBAC

Permissions, sorted: roles that nest and one permission check that works the same on server or client. Define them in the dashboard, check them anywhere in your code.

RBAC

  API Keys

API keys without the footguns: leaked keys get auto-revoked, work for users and teams, and show the full secret only once. We never keep the plaintext after creation.

API Keys

  Payments

Payments without the plumbing for subscriptions, one-time charges, and usage metering with credits. Bill a person or a whole team with one model, no separate codepath.

Payments

  Emails

Email that delivers and tells you so, handling transactional and marketing sends from one API. Edit templates with an AI editor, theme once, and track every open and click.

Emails

  Analytics

Know your users with no data stack required, with live active user counts and session replays out of the box. Ask in plain English to build dashboards or write SQL to save queries, all with one flag enabled.

Analytics

  Webhooks

React to every user event in real time with signed, tamper-proof webhooks. Retries and backoff are handled for you; verify in five lines and manage endpoints from the dashboard.

Webhooks

  Data Vault

A safe for the secrets your users hand you, locked with your secret so we never see the plaintext. Store and retrieve tokens in two lines each, server-only by design.

Data Vault

  Launch Checklist

Run through the must-do checks before flipping to production: domain setup, callbacks locked, secrets rotated. The progress tracker keeps your team aligned so nothing critical slips through on launch day.

Launch Checklist

Contributing

Hexclave is open source, and contributions are welcome. Read CONTRIBUTING.md to get started, and say hello in Discord before picking up anything large. Found a security issue? Email security@hexclave.com.

❤ Contributors

Contributors