Skip to content

feat(examples): add webhook-driven SaaS template#168

Closed
fjalil7 wants to merge 8 commits into
mainfrom
feature/bil-1332
Closed

feat(examples): add webhook-driven SaaS template#168
fjalil7 wants to merge 8 commits into
mainfrom
feature/bil-1332

Conversation

@fjalil7

@fjalil7 fjalil7 commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a webhook-driven SaaS example that demonstrates Commet subscription checkout, Better Auth customer creation, signed webhook handling, local billing state sync, and an events dashboard.

The example now points at published Commet packages instead of workspace packages so it can be tested like a real integrator app.

What changed

  • Added examples/webhooks with pricing, auth, checkout, dashboard, billing, and webhook event views.
  • Added signed /api/webhooks/commet handling backed by @commet/node@7.3.0.
  • Stores webhook deliveries and synchronized billing state in Postgres via Drizzle.
  • Supports subscription activation/reactivation, payment recovery, usage recorded events, and customer state snapshots.
  • Adds small @commet/next webhook typing support used by the example branch.

Validation

  • pnpm biome check --write
  • git diff --check origin/main...HEAD
  • pnpm build
  • pnpm typecheck
  • pnpm --filter webhooks-example build
  • pnpm --filter webhooks-example typecheck

Notes

origin/beta does not exist in this repo, so this PR targets main. Manual Chrome QA was not run because it was not requested as part of the PR gate.

@linear-code

linear-code Bot commented Jun 22, 2026

Copy link
Copy Markdown

BIL-1332

@vercel

vercel Bot commented Jun 22, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
quota Ready Ready Preview, Comment Jun 22, 2026 4:28pm
6 Skipped Deployments
Project Deployment Actions Updated (UTC)
balance-ai Skipped Skipped Jun 22, 2026 4:28pm
balance-fixed Skipped Skipped Jun 22, 2026 4:28pm
credits Skipped Skipped Jun 22, 2026 4:28pm
fixed Skipped Skipped Jun 22, 2026 4:28pm
metered Skipped Skipped Jun 22, 2026 4:28pm
seats Skipped Skipped Jun 22, 2026 4:28pm

@vercel vercel Bot temporarily deployed to Preview – credits June 22, 2026 16:27 Inactive
@vercel vercel Bot temporarily deployed to Preview – seats June 22, 2026 16:27 Inactive
@vercel vercel Bot temporarily deployed to Preview – balance-ai June 22, 2026 16:27 Inactive
@vercel vercel Bot temporarily deployed to Preview – balance-fixed June 22, 2026 16:27 Inactive
@vercel vercel Bot temporarily deployed to Preview – metered June 22, 2026 16:27 Inactive
@vercel vercel Bot temporarily deployed to Preview – fixed June 22, 2026 16:27 Inactive
@fjalil7

fjalil7 commented Jun 22, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by split PRs:\n\n- #169 for the @commet/next patch changeset\n- #170 for the webhooks example-only branch

@fjalil7 fjalil7 closed this Jun 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant