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.
- 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.
- Pre-configured Django templates with responsive design (TailwindCSS/Bootstrap).
- Optional SPA compatibility with React or Vue.js.
- Stripe integration for subscription management (plans, trials, billing).
- Webhook support for handling subscription lifecycle events.
- 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.
- Python 3.10 or later
- Docker (optional but recommended)
- PostgreSQL (or your preferred database)
- Redis (for caching and task queue)
-
Clone the Repository
git clone https://github.com/yourusername/django-saas-boilerplate.git cd django-saas-boilerplate -
Create and Activate a Virtual Environment
python -m venv env source env/bin/activate # On Windows: .\env\Scripts\activate
-
Install Dependencies
pip install -r requirements.txt
-
Set Up Environment Variables
- Copy
.env.exampleto.env:cp .env.example .env
- Update
.envwith your configuration (e.g., database, Stripe keys).
- Copy
-
Run Migrations
python manage.py migrate
-
Start the Development Server
python manage.py runserver
- Default admin URL:
http://127.0.0.1:8000/admin - Create a superuser to access the admin:
python manage.py createsuperuser
- Authentication:
/api/token/(JWT login)
This boilerplate is ready for deployment using Docker and a cloud provider like AWS, GCP, or Heroku.
-
Build Docker Image
docker build -t django-saas-boilerplate . -
Run Docker Compose
docker-compose up -d
-
Configure Your Cloud Provider
- Set up a PostgreSQL database.
- Configure environment variables on the server.
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bug fix:
git checkout -b feature-name
- Commit your changes and push to your fork:
git push origin feature-name
- Submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
For questions, suggestions, or contributions, feel free to reach out:
- Email: georgehlongwane8@gmail.com
- GitHub: V-FOR-VEND3TTA