Skip to content

feat: add Polar support for Convex-backed Better Auth projects with CLI integration#110

Open
Alisha-21-cloud wants to merge 2 commits intoMarve10s:mainfrom
Alisha-21-cloud:convex-polar-support
Open

feat: add Polar support for Convex-backed Better Auth projects with CLI integration#110
Alisha-21-cloud wants to merge 2 commits intoMarve10s:mainfrom
Alisha-21-cloud:convex-polar-support

Conversation

@Alisha-21-cloud
Copy link
Copy Markdown

This pull request adds first-class support for integrating Polar Payments with Convex backends when using Better Auth. It updates the CLI, template generator, and project templates to scaffold all necessary code, dependencies, environment variables, and documentation for this combination. The changes ensure that projects using Convex, Better Auth, and Polar Payments are correctly scaffolded and tested out-of-the-box.

Key changes include:

Support for Convex + Better Auth + Polar Payments:

  • Enabled Polar Payments as a compatible option for Convex backends using Better Auth, updating compatibility checks in the CLI prompt logic.
  • Added a comprehensive test that scaffolds a project with Convex, Better Auth, and Polar Payments, verifying that all expected files, dependencies, and environment variables are generated.

Template and Code Generation:

  • Updated template generator logic to process and inject Polar Payments templates for Convex backends, including both backend and web React templates. [1] [2] [3]
  • Enhanced dashboard page templates for React (Next.js, Vite, Tanstack Router) to include Polar Payments UI components and subscription logic when Polar is enabled. [1] [2] [3]

Dependencies and Environment Variables:

  • Automatically adds required Polar-related dependencies (@convex-dev/polar, @polar-sh/sdk, @polar-sh/checkout) to backend and web package.json files for Convex projects. [1] [2] [3]
  • Generates all necessary Polar Payments environment variables and documentation in packages/backend/.env.local for Convex projects, including comments and setup instructions. [1] [2] [3] [4] [5]

Post-Installation Instructions:

  • Updated post-installation instructions to include Polar Payments setup steps for Convex backends, with package manager awareness. [1] [2]

These changes make it seamless to scaffold and use Polar Payments with Convex and Better Auth, providing a robust developer experience for this stack.

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 31, 2026

@Alisha-21-cloud is attempting to deploy a commit to the Ibrahim's projects Team on Vercel.

A member of the Team first needs to authorize it.

@Marve10s
Copy link
Copy Markdown
Owner

Hey! Thank you for the PR! Will take a closer look soon

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.

2 participants