Welcome to SaaS_Django Base! This project provides a robust foundation for developers to quickly build and deploy SaaS applications tailored to their specific needs. With its comprehensive set of features already implemented, developers can focus on adding unique functionalities and deploying their applications in just days or weeks.
- Built on Django: Take advantage of Django's secure and scalable architecture.
- Tailwind CSS Integration: Utilize Tailwind’s utility-first CSS framework for a modern, responsive design.
- Dynamic User Interfaces: Enhance interactivity with HTMX for seamless user experiences.
- PostgreSQL Database: Store your application data using a powerful relational database.
- Redis Caching: Improve performance with built-in caching and background task management.
- Social Authentication: Easily implement social login options to enhance user convenience.
- Stripe Integration: Manage subscriptions with various pricing options directly from the admin panel, allowing you to add new plans and subscriptions effortlessly.
- Flexible Authorization Controls: Design and manage user roles and permissions with Django’s group functionality, including the ability to provide beta plans or special permissions directly from the admin panel.
- Management Commands: Fetch the latest details from Stripe using built-in management commands.
- Email Verification: Secure user logins with email verification for all accounts.
- Containerized Deployment: Deploy your applications effortlessly using Docker.
- Deploy Django on Railway with [this Dockerfile and guide]
- Create a One-Off Secret Key for Django [blog post]
SaaS_Django Base serves as a customizable framework, allowing developers to add new features according to their SaaS requirements. Follow the installation instructions to set up your environment and start building your application today!
mkdir -p ~/dev/saas
cd ~/dev/saas
git clone https://github.com/amansr18/saas-django.git .
For macOS/Linux:
# Verify that Python 3.11 or higher is installed
python3 --version
# Create a virtual environment named 'venv'
python3 -m venv venv
# Activate the virtual environment
source venv/bin/activate
*For Windows*
# Create a virtual environment named 'venv'
```bash
c:\Python312\python.exe -m venv venv
.\venv\Scripts\activate
# with venv activated
pip install pip --upgrade && pip install -r requirements.txt
cp .env.sample .env
cat .env
Ensure that your .env file includes the following configuration values:
DJANGO_DEBUG=1
DJANGO_SECRET_KEY=""
DATABASE_URL=""
EMAIL_HOST="smtp.gmail.com"
EMAIL_PORT="587"
EMAIL_USE_TLS=True
EMAIL_USE_SSL=False
EMAIL_HOST_USER=""
EMAIL_HOST_PASSWORD=""
ADMIN_USER_EMAIL=""
STRIPE_SECRET_KEY=""
python -c 'from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())'
or
openssl rand -base64 64
or
python -c 'import secrets; print(secrets.token_urlsafe(64))'
Once you have this value, add update DJANGO_SECRET_KEY
in .env
.
source venv/bin/activate
# or .\venv\Scripts\activate if windows
cd src
python manage.py migrate
python manage.py createsuperuser
python manage.py vendor_pull
- Sign up on Stripe.com for an account
- Get or create a Stripe Secret API Key (Dashboard > Developers > API keys > Secret key )
- Update dotenv (
.env
) with the valueSTRIPE_SECRET_KEY
with your key.
python manage.py runserver
Ready to roll! 🚀
Much more coming soon!