Skip to main content

A Django app for integrating Stripe payments and Kong API management

Project description

๐Ÿš€ 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:

  1. ๐Ÿ Create pages in the admin interface
  2. ๐Ÿ–Œ๏ธ Use the visual page builder to design like a pro
  3. ๐Ÿš€ 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:

  1. ๐Ÿด Fork the repository
  2. ๐ŸŒฑ Create your feature branch (git checkout -b feature/amazing-feature)
  3. ๐Ÿ’พ Commit your changes (git commit -m 'Add some amazing feature')
  4. ๐Ÿ“ค Push to the branch (git push origin feature/amazing-feature)
  5. ๐Ÿ”„ 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

paybuildr-0.1.0.tar.gz (66.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

paybuildr-0.1.0-py3-none-any.whl (75.2 kB view details)

Uploaded Python 3

File details

Details for the file paybuildr-0.1.0.tar.gz.

File metadata

  • Download URL: paybuildr-0.1.0.tar.gz
  • Upload date:
  • Size: 66.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.6

File hashes

Hashes for paybuildr-0.1.0.tar.gz
Algorithm Hash digest
SHA256 26d6d7d1cf8a5dec7770dca59778056e950c5713a7a12b398a509a8a972f2d33
MD5 2d1468b29865616c12102d42eb602c59
BLAKE2b-256 845b39a65e10094798c7d38b93916055924a5352014b212a0a4c1f400ae88e80

See more details on using hashes here.

File details

Details for the file paybuildr-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: paybuildr-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 75.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.6

File hashes

Hashes for paybuildr-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fee1b2614ae1ae13b8794cb8d7b21cbb218da68d53f609c5dee965b8d7f71d11
MD5 2ecf44c0e41ef24ebffd7f3b0a3db5ef
BLAKE2b-256 41c8b57fec3125f3858f9affe792f82e5d3f67fc0882177599f4af55c35cac0e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page