πŸš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more β†’
Socket
DemoInstallSign in
Socket

paybuildr

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

paybuildr

A Django app for integrating Stripe payments and Kong API management

0.1.0
PyPI
Maintainers
1

πŸš€ 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  # It's that simple!

Add to your INSTALLED_APPS (so easy your cat could do it):

INSTALLED_APPS = [
    # ... your other cool apps
    'rest_framework',  # gotta have this!
    'paybuildr',       # πŸ’₯ BOOM!
    # ... maybe more apps here
]

Add to your urls.py (copy & paste, you got this!):

urlpatterns = [
    # ... other URLs
    path('paybuildr/', include('paybuildr.urls')),  # 🎯 Plug and play!
    # ... more URLs maybe?
]

βš™οΈ Configuration

πŸ’³ Stripe Configuration

Add these settings to your settings.py:

# πŸ”‘ Your secret keys (don't commit these to git!)
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  # Set to False if you're feeling rebellious

πŸ—„οΈ Migrations

Run migrations (database tables don't create themselves... yet):

python manage.py migrate paybuildr
# βœ… Database tables created like magic!

🧩 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

# 🦍 Sync services to Kong
python manage.py setup_kong

# πŸ“₯ Import services from Kong to Django
python manage.py sync_from_kong

# πŸ’° Sync Stripe plans
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    # πŸ“¦ Get the packages
npm run build  # πŸ”¨ Build the assets

πŸ§ͺ Running Tests

python manage.py test paybuildr  # 🧠 Because testing is smart

πŸ“œ 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.

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts