Skip to content

BASIC-BIT/perkcord

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

530 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Perkcord

A membership platform for communities.

Fund your community with memberships. Perkcord handles checkout, access, Discord roles, and member management.

Access Outputs

  • Now: Discord roles and Linked Roles metadata.
  • Coming soon: Notion spaces, private sites, course portals, Slack/Circle communities, custom webhooks, and API consumers.

What It Does

For members For admins
Branded tier pages Tier setup and role mapping
Google and Discord sign-in Stripe, Authorize.Net, and NMI setup
Subscription and one-time checkout Member lookup and billing context
Account and billing page Manual grants and revokes
Cancellation and continuation flows Audit history and access repair
Discord roles stay current Bot diagnostics and role checks

Product Pieces

  • Checkout: provider-specific payment collection with a shared access model.
  • Accounts: Google and Discord can both attach to the same member account.
  • Access state: active, expired, canceled, manual, one-time, lifetime, and free access paths.
  • Access outputs: Discord roles and Linked Roles today; Notion, private sites, webhooks, and API consumers next.
  • Discord access: bot-managed role updates, retries, diagnostics, and role hierarchy checks.
  • Admin ops: provider setup, tier lifecycle, member support views, audit trails, and repair tools.
  • Platform hooks: REST contracts, outbound webhooks, background jobs, and reconciliation.

Provider Status

Provider Current path Status
Stripe Stripe Checkout Subscriptions and one-time payments
Authorize.Net AcceptUI.js lightbox Tokenized first charge plus ARB renewal flow
NMI Merchant-hosted checkout URL Static hosted URL path; API-hosted checkout still planned

Perkcord does not store raw card data. Checkout modes use provider-hosted or tokenized collection. See docs/checkout-modes.md.

Repo Shape

Path Purpose
apps/web Next.js app for public pages, member flow, admin portal, and web API routes
apps/bot Discord.js bot for slash commands, diagnostics, and role updates
convex/convex Convex backend, schema, webhooks, jobs, and access engine
packages/contracts Shared Zod-backed domain and HTTP contracts
docs Product, setup, checkout, ops, testing, compliance, and visual QA notes

Hosted SaaS only. This is not a self-hosted Discord bot template.

Engineering Rules

  • Access state is authoritative; Discord roles and other outputs are derived from it.
  • Discord role updates are idempotent and retry-safe.
  • Webhooks are verified, normalized, and deduped.
  • Payment providers update access state; they do not mutate Discord directly.
  • Discord is linked account data, not the only identity anchor.

Local Development

Prereqs: Node.js 20+ and npm.

npm run install:apps
npx convex dev --once
npm run codegen
npm run playwright:install
npm run check:fast

For a fresh sibling worktree with setup:

npm run worktree:new:setup -- <branch-name>

Convex generated types require a configured deployment. Full setup lives in SETUP.md.

Commands

npm run check:fast
npm run check
npm run check:ci
npm run test:unit
npm run test:e2e
npm run test:e2e:visual
npm run test:coverage

Docs

Status

Active development. Stripe and Authorize.Net are the primary provider paths. NMI has partial hosted-URL support, with fuller API-hosted checkout still planned.

License

MIT. See LICENSE.

About

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors