Skip to content

Conversation

@ngoiyaeric
Copy link

This commit introduces a new credit system to the SaaS starter.

The credit system allows you to track and limit usage of premium features based on subscription plans.

Key features:

  • Automatic credit granting based on Stripe subscription plans.
  • Usage tracking through Stripe Billing Meters.
  • Real-time credit balance and usage information.
  • UI components for credit management.
  • API endpoints for credit operations.
  • Comprehensive logging of credit grants and usage.

The implementation includes:

  • A new credit-service.ts to handle the business logic of the credit system.
  • Updates to the database schema to include credit-related fields.
  • A new Stripe webhook handler to grant credits on subscription payments.
  • New API routes for credit management.
  • New React components for displaying credit information.
  • Example of how to protect API routes and frontend components with credit checks.
  • Documentation for testing and deployment.

This commit introduces a new credit system to the SaaS starter.

The credit system allows you to track and limit usage of premium features based on subscription plans.

Key features:
- Automatic credit granting based on Stripe subscription plans.
- Usage tracking through Stripe Billing Meters.
- Real-time credit balance and usage information.
- UI components for credit management.
- API endpoints for credit operations.
- Comprehensive logging of credit grants and usage.

The implementation includes:
- A new `credit-service.ts` to handle the business logic of the credit system.
- Updates to the database schema to include credit-related fields.
- A new Stripe webhook handler to grant credits on subscription payments.
- New API routes for credit management.
- New React components for displaying credit information.
- Example of how to protect API routes and frontend components with credit checks.
- Documentation for testing and deployment.
@vercel
Copy link

vercel bot commented Jul 23, 2025

@google-labs-jules[bot] is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

@brrock
Copy link

brrock commented Aug 25, 2025

Completely vibed!!?

@brrock
Copy link

brrock commented Aug 25, 2025

Does it even work?

@ngoiyaeric
Copy link
Author

No but I will have to get it working. Do you want to collaborate?

@brrock
Copy link

brrock commented Aug 25, 2025

If I were you I would use redis

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