π PayBuildr πΈβ¨
A powerful Django application that integrates Stripe payments, Kong API Gateway management, and page building capabilities using GrapeJS and Puck.
π₯ What is PayBuildr?
PayBuildr is the all-in-one solution for Django developers who need:
- π³ Payment processing with Stripe
- π API gateway management with Kong
- π¨ Visual page building with GrapeJS & Puck
Built for Django 5.0+ and Python 3.12+, PayBuildr is the modern way to build payment-enabled web apps!
β¨ Features
- π° Stripe Integration: Process payments, manage subscriptions, and handle webhooks like a boss!
- π Kong API Management: Configure and manage API services, routes, and rate limiting without breaking a sweat
- ποΈ Page Builder: Create and customize stunning pages with GrapeJS or Puck.js without writing a single line of HTML
- π§ Smart Admin Interface: Comprehensive Django admin integration that just worksβ’
- π API Access: RESTful endpoints for plans, subscriptions, and pages
- π οΈ Customizable: Plug it into your project and extend it however you want!
π Requirements
- π Python 3.12+
- πΈ Django 5.0+
- π Django REST Framework 3.14+
- π΅ Stripe Python SDK 7.0+
- π¦ Kong API Gateway
- π¦ Node.js (for building frontend assets)
π Installation
pip install paybuildr
Add to your INSTALLED_APPS
(so easy your cat could do it):
INSTALLED_APPS = [
'rest_framework',
'paybuildr',
]
Add to your urls.py
(copy & paste, you got this!):
urlpatterns = [
path('paybuildr/', include('paybuildr.urls')),
]
βοΈ Configuration
π³ Stripe Configuration
Add these settings to your settings.py
:
STRIPE_SECRET_KEY = 'your-stripe-secret-key'
STRIPE_PUBLIC_KEY = 'your-stripe-publishable-key'
STRIPE_WEBHOOK_SECRET = 'your-stripe-webhook-secret'
STRIPE_SUCCESS_URL = 'https://your-site.com/success/'
STRIPE_CANCEL_URL = 'https://your-site.com/cancel/'
π¦ Kong Configuration
KONG_ADMIN_URL = 'http://localhost:8001'
KONG_SYNC_ENABLED = True
ποΈ Migrations
Run migrations (database tables don't create themselves... yet):
python manage.py migrate paybuildr
π§© Usage
ποΈ Admin Interface
The admin interface is where the magic happens:
- π Plans: Create and manage subscription plans
- πΌ Subscriptions: View and manage user subscriptions
- π API Services: Configure Kong API services
- π£οΈ API Routes: Set up routes for your Kong services
- β±οΈ API Plans: Configure rate limiting for different plans
- π Pages: Create and edit pages with the built-in page builders
π§ Management Commands
python manage.py setup_kong
python manage.py sync_from_kong
python manage.py sync_stripe_plans
π API Endpoints
RESTful goodness at your fingertips:
/api/plans/
- List available plans π
/api/plans/{id}/checkout/
- Create a checkout session πΈ
/api/subscriptions/
- List user subscriptions π
/api/pages/
- Access pages created with the page builder π
π¨ Page Building
Build pages like you're designing in Figma:
- π Create pages in the admin interface
- ποΈ Use the visual page builder to design like a pro
- π Publish and make available via the API or direct URL
π» Development
π Frontend Assets
To build the frontend assets:
cd paybuildr/static/paybuildr/js/puck
npm install
npm run build
π§ͺ Running Tests
python manage.py test paybuildr
π License
MIT (Go wild! Just don't blame us if something breaks π)
π€ Contributing
We π contributions! Let's build something awesome together:
- π΄ Fork the repository
- π± Create your feature branch (
git checkout -b feature/amazing-feature
)
- πΎ Commit your changes (
git commit -m 'Add some amazing feature'
)
- π€ Push to the branch (
git push origin feature/amazing-feature
)
- π Open a Pull Request
π Development Status & Roadmap
β
Completed Features
- β
Stripe payment integration with plans and subscriptions
- β
Kong API Gateway service and route management
- β
Rate limiting for API services based on subscription plans
- β
GrapeJS page builder integration
- β
Django admin interface customization
- β
RESTful API endpoints for plans and subscriptions
- β
Management commands for Kong synchronization
- β
Signal handlers for Stripe and Kong events
π§ In Progress & Planned Features
- π§ Comprehensive test suite
- π§ Documentation and examples
- π§ Puck page builder integration
- π User dashboard for managing subscriptions
- π Webhook handler improvements
- π Additional page templates
- π Analytics integration
- π Multi-tenant support
- π Docker setup for development
- π CI/CD pipeline
- π i18n/l10n support
π‘ Want to help? Pick one of these items and submit a PR!
π Acknowledgements
- Kudos to the Django community
- High-fives to the Stripe and Kong teams
- Virtual hugs to all contributors!
Made with β€οΈ by a developer, for whoever.