Skip to content

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

django-saas-boilerplate

A world-class, production-ready Django SaaS boilerplate designed to accelerate the development of scalable, secure, and feature-rich applications. This boilerplate is optimized for performance, maintainability, and rapid development.


Features

Backend

  • User authentication and management, including social login (Google, Facebook).
  • Role-Based Access Control (RBAC) for granular permissions.
  • REST API setup using Django REST Framework (DRF) with JWT authentication.
  • Integration with OpenAI APIs (e.g., ChatGPT) for AI-powered features.

Frontend

  • Pre-configured Django templates with responsive design (TailwindCSS/Bootstrap).
  • Optional SPA compatibility with React or Vue.js.

Payment Integration

  • Stripe integration for subscription management (plans, trials, billing).
  • Webhook support for handling subscription lifecycle events.

Additional Features

  • Multi-tenancy support for serving multiple clients with isolated data.
  • Logging and monitoring (Sentry, Django Admin logging).
  • Scalable database setup with PostgreSQL and Redis for caching.
  • Deployment readiness for AWS, GCP, or Heroku.
  • Comprehensive test coverage and CI/CD pipeline configuration.

Getting Started

Prerequisites

  • Python 3.10 or later
  • Docker (optional but recommended)
  • PostgreSQL (or your preferred database)
  • Redis (for caching and task queue)

Installation

  1. Clone the Repository

    git clone https://github.com/yourusername/django-saas-boilerplate.git
    cd django-saas-boilerplate
  2. Create and Activate a Virtual Environment

    python -m venv env
    source env/bin/activate    # On Windows: .\env\Scripts\activate
  3. Install Dependencies

    pip install -r requirements.txt
  4. Set Up Environment Variables

    • Copy .env.example to .env:
      cp .env.example .env
    • Update .env with your configuration (e.g., database, Stripe keys).
  5. Run Migrations

    python manage.py migrate
  6. Start the Development Server

    python manage.py runserver

Usage

Admin Panel

  • Default admin URL: http://127.0.0.1:8000/admin
  • Create a superuser to access the admin:
    python manage.py createsuperuser

API Endpoints

  • Authentication: /api/token/ (JWT login)

Deployment

This boilerplate is ready for deployment using Docker and a cloud provider like AWS, GCP, or Heroku.

  1. Build Docker Image

    docker build -t django-saas-boilerplate .
  2. Run Docker Compose

    docker-compose up -d
  3. Configure Your Cloud Provider

    • Set up a PostgreSQL database.
    • Configure environment variables on the server.

Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix:
    git checkout -b feature-name
  3. Commit your changes and push to your fork:
    git push origin feature-name
  4. Submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.


Contact

For questions, suggestions, or contributions, feel free to reach out:

About

A world-class, production-ready Django SaaS boilerplate designed to accelerate the development of scalable, secure, and feature-rich applications. This boilerplate is optimized for performance, maintainability, and rapid development.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages