-
Notifications
You must be signed in to change notification settings - Fork 8
feat: Astro example with Webhooks, Customer Portal and Checkout creation #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat: Astro example with Webhooks, Customer Portal and Checkout creation #13
Conversation
@devroy10 is attempting to deploy a commit to the polar-sh Team on Vercel. A member of the Team first needs to authorize it. |
@rishi-raj-jain ready for a review |
…rom dotenv to dotenvx
@rishi-raj-jain requested changes have been applied, review when you can |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please use the scope setup as in https://github.com/polarsource/examples/blob/main/with-astro-cloudflare-workers/scope.ts and https://github.com/polarsource/examples/blob/main/with-astro-cloudflare-workers/package.json#L8?
I've updated the bounty to be $150 for the efforts. |
just to align intention, does this effectively only replace the POLAR_MODE switch of prod and sandbox? is there need to retain SANDBOX_POLAR_WEBHOOK_SECRET, SANDBOX_POLAR_SUCCESS_URL? |
Should've clarified in my original message, the envs now should be only:
|
I have an implementation works on local but, when deploying to Vercel, I made use of run scope in the build command to embed the POLAR_MODE env var, it fails with error. This is for Build time Another implementation, I explored was obtaining the POLAR_MODE from getScope but this would be at runtime. Would love to get your thoughts? |
fix #7
Overview
This PR adds a complete Astro integration example
with-astro
that demonstrates how to build a products-services application using Polar's SDK and Astro adapter for seamless webhooks handling, customer portal integration, and checkout session creation.Implementation Checklist
Following the guidelines from https://docs.polar.sh/integrate/sdk/adapters/astro:
with-astro
Project Structure
Key Features
Environment Configuration
Checkout Integration
Customer Portal
Webhooks Handler
Validation Script
<! --Optional build-time script that validates: -->
Documentation
Installation Guide
Comprehensive
README.md
following the recommended stylistic guide pattern fromEnvironment Configuration
.env.example
with detailed comments linking to Polar documentationDeployment and Demo
Vercel Deployment
Live Deployment: https://polar-astro.vercel.app
Demo Recording
Video Recording
video-lite.mp4
Alternative link: http://bit.ly/4nP5lcj
Recording demonstrates:
Related Documentation
This example provides a solid foundation for building products-services applications with Polar and Astro, following all best practices and providing comprehensive documentation for developers to get started quickly.
Fixes #7