@a0n/aeon-invite
v5.0.0
Published
Beta shield, invite codes, waitlist management, and funnel analytics for controlled rollouts.
Readme
@a0n/aeon-invite
Parent: Open Source Catalog
@a0n/aeon-invite handles invites, waitlists, beta shields, and rollout analytics for staged launches.
The fair brag is that it covers the whole rollout path in one package: code generation, waitlist handling, access evaluation, analytics hooks, storage adapters, and React bindings for gated UI.
Why People May Like It
- invite code lifecycle management is built in,
- waitlist joins and position checks are part of the same package,
- access evaluation can consider admin, beta, redeemed, and code-based paths,
- analytics hooks exist for funnel tracking,
- and the React surface makes it easy to gate parts of the UI without rewriting the same logic.
Install
bun add @a0n/aeon-inviteQuick Start
import { InviteManager, MemoryInviteStore } from '@a0n/aeon-invite';
const manager = new InviteManager({
store: new MemoryInviteStore(),
adminEmails: ['[email protected]'],
betaTesterEmails: ['[email protected]'],
});
const invite = await manager.createInviteCode('direct', '[email protected]', {
maxUses: 100,
});
const gate = await manager.evaluate({
email: '[email protected]',
inviteCode: invite.code,
});Store Adapters
MemoryInviteStore: in-memory adapter for tests and local workD1InviteStore: D1-backed persistenceFetchInviteStore: client-side adapter for/api/invite/*endpoints
Schema for D1 lives at sql/schema.sql.
React Bindings
React entrypoint: @a0n/aeon-invite/react
import { InviteProvider, BetaShield } from '@a0n/aeon-invite/react';
<InviteProvider manager={manager} context={{ email: '[email protected]' }}>
<BetaShield waitlistFallback={<div>Join waitlist</div>}>
<App />
</BetaShield>
</InviteProvider>;Other Useful Exports
generateInviteCode()andvalidateCodeFormat()joinWaitlist()andgetWaitlistPosition()createFunnelEvent()D1Analytics,ConsoleAnalytics, andBeaconAnalytics
Development
cd open-source/aeon-invite
bun run build
bun testWhy This README Is Grounded
Aeon Invite does not need inflated language. The strongest fair brag is that it already gives you a practical rollout package instead of forcing you to glue invites, waitlists, analytics, and UI gating together yourself.
