DEV Community

Cover image for Ultimate Django SaaS Starterkit: Deploy your next SaaS in hours πŸš€
Paul
Paul

Posted on • Updated on

Ultimate Django SaaS Starterkit: Deploy your next SaaS in hours πŸš€

This is a submission for the Neon Open Source Starter Kit Challenge : Ultimate Starter Kit

Django SaaS Boilerplate/Staterkit

This is a production ready Django SaaS Starter kit. You should focus on building your core functionality and skip writing repetitive code. This starterkit Comes packed with responsive design, landing page, Payment integration, blog, Custom user model, modern admin, sitemap and more.

Django is a popular choice among SaaS developers due to its flexibility, security and ability to rapidly develop and add features to their SaaS.

However, setting things up in the beginning would take time, such as making it Production ready, adding environment variables, adding blogs, creating the base template, payments and more. I tried to address many of these repetitive tasks by building this boilerplate

#CodeLessShipMore

Demo and link

Github repo: Ultimate Django SaaS starterkit

Try it out: Django Demo website (login password below πŸ‘‡οΈ)

To test admin login use.

demo@mail.com
demo123*
Enter fullscreen mode Exit fullscreen mode

Note
You will not receive any confirmation email upon signup as its disabled, use the above account to login to admin dashboard

For testing stripe check out test cards: https://docs.stripe.com/testing

Features Packed for SaaS projects 🀩

  • Production ready, you can immediately deploy this to cloud such as Vercel, Railway.app, Render.com etc.
  • Comes with a landing page that you can modify.
  • Responsive design, forget about making things responsive yourself, as it comes with a responsive base.html, you can extend from.
  • Pricing page
  • Postgres database ready. πŸ’Ύ
  • ESP integration - Use transactional emails at scale. πŸ“¨
  • Modern admin - uses unfold admin module. 🌟
  • Payment integration - Default Stripe integration, just add your stripe keys and get started πŸ’΅
  • Recurring charges
  • Custom user model.
  • Login and Signup flow, including, verification email, resend token, password reset.
  • Contact us page.
  • 404 page
  • Has blog with pagination and Trix WYSIWYG editor built into the admin panel, so you can share articles with ease and build your SEO Game. πŸ“–
  • Technical SEO optimization.
  • Dynamic Sitemap.xml
  • Robots.txt
  • Google analytics
  • Django storages integration for production (default Google Object storage)
  • Tailwind css setup for rapid development (note: the tailwind classes are prefixed with tw-, to differentiate them)

Well looks like you just saved over 60+ hrs of work and headaches.

Oh! wait

If you don't want to deal with landing page, I have also made prebuilt landing pages so you can focus on shipping, iterating and marketing your SaaS instead of wasting time on non-trivial things.

GitHub logo PaulleDemon / awesome-landing-pages

Free to use landing pages for SaaS developers, freelancers, agencies and businesses

Free Landing page templates

Contains free and open-sourced website templates, including but not limited to SaaS landing page, portfolio, Restaurant page and more. Useful, for freelancers, agencies, SaaS developers, and more.

Download from browsable page: https://awesome-landingpages.vercel.app/

Updated weekly

New templates will be uploaded every Friday. Feel free to star this repository 🌟.

Have a generic template in mind?

  • Create a new template issue, once your template request have enough thumbs up, we'll make one.

  • If you are looking for a custom one, contact here

Consider supporting open-source.

when you support my open-source, I get funds to keep writing more free and open-source projects.

ko-fi

Table of content





Whom is this Django Stater pack meant for?

  • Solo SaaS developers, freelancers and Businesses
  • For people building an MVP(minimum viable product) and trying to ship as quickly as possible.
  • People looking to learn Django.
  • People who just finished building core functionality and are looking to integrate landing page, blog, payment etc.

Getting started with the boilerplate

step 1: 🌟 Star the repo: https://github.com/PaulleDemon/Django-SAAS-Boilerplate

step 2: Clone the repo

git clone https://github.com/PaulleDemon/Django-SAAS-Boilerplate
Enter fullscreen mode Exit fullscreen mode

step 3: Install dependencies in an environment (creating an environment is optional, but recommended)

pip install -r requirements.txt
Enter fullscreen mode Exit fullscreen mode

step 4: Add a .env file inside the project folder with the following

DEBUG=1
PYTHON_VERSION=3.10
DOMAIN=""

ALLOWED_HOSTS=".up.railway.app, .vercel.app"
ALLOWED_CORS=""

SECRET_KEY=""
PORD_SECRET_KEY=""

DJANGO_SUPERUSER_EMAIL="" # optonal use if you want to create supruser using --noinput
DJANGO_SUPERUSER_PASSWORD="" # optonal use if you want to create supruser using --noinput

EMAIL_HOST="smtpout.server.net"
EMAIL_HOST_USER=""
EMAIL_HOST_PASSWORD=""

POSTGRES_DATABASE=""
POSTGRES_USER=""
POSTGRES_PASSWORD=""
POSTGRES_HOST=""

POSTGRES_URL=""

PROJECT_ID="" # firebase project id
BUCKET_NAME=".appspot.com" # firebase storage name
FIREBASE_CRED_PATH="project/firebase-cred.json"

FIREBASE_ENCODED=""
CLOUD_PLATFORM="RAILWAY"

GOOGLE_ANALYTICS="G-"

STRIPE_TEST_API_KEY=""
STRIPE_WEBHOOK_TEST_API_KEY=""
STRIPE_PUB_TEST_KEY=""

STRIPE_PROD_API_KEY=""
STRIPE_WEBHOOK_PROD_API_KEY=""
STRIPE_PUB_PROD_KEY=""
Enter fullscreen mode Exit fullscreen mode

Step 5: Now in your terminal Create databases and Tables using

python manage.py migrate
Enter fullscreen mode Exit fullscreen mode

Step 6: Now run the website from the terminal using.

python manage.py runserver
Enter fullscreen mode Exit fullscreen mode

step 7: To run Tailwind CSS open a new terminal and run

python manage.py tailwind start
Enter fullscreen mode Exit fullscreen mode

Note: If you are facing problems starting this program in windows OS, remove logging from project/settings.py

Vola! that's it now your starterkit running

Admin superuser

You admin will be located at: http://localhost:8000/admin

To create superuser use:

python manage.py createsuperuser
Enter fullscreen mode Exit fullscreen mode

Deployment and more

You can deploy to Vercel for free, it also includes Neon postgres DB in its free tire πŸ˜‰. The demo repo uses Vercel and Neon.

You can now read more about production settings in the readme file

GitHub logo PaulleDemon / Django-SAAS-Boilerplate

Supercharge your SAAS development using the django SAAS Boilerplates

Django SaaS Boilerplate (production ready)

Focus on building your core functionality, skip writing repetitive code. Comes packed with landing page, Payment integration, blog, User model, sitemap and more.

Why use Django SaaS boilerplate?

Using a Django saas boilerplate can save you a lot of time, which is a huge benefit. Most customers don't care if you start from scratch or use a template; they just want their problem solved quickly. Whether you use Django or another framework usually doesn't matter to them as long as the job gets done efficiently.

This boilerplate can help you save hours of work, allowing you to focus on core functionality of your SaaS instead of spending a lot of time on setting up stripe, blog, login functionalities and landing page.

#CodeLessShipMore

Want to help me write more open-source?

Consider buying me a coffee

ko-fi

who is this boilerplate suitable for?

  • Reduce repetitive parts and focus…

More Tutorials to get you started

  1. Adding Stripe to your Django SaaS
  2. Adding ESP to send emails at scale
  3. Deploying your Django SaaS to vercel

Follow and updates

I am Paul, A full-stack developer and self-funded opensource dev. I write open-source project most of the time, if you want to see more open-source project you can follow me on twitter and Github:

Upcoming project

My another upcoming open-source project is an extension, made to help you decide and pick better fonts for your website. You can test 1000+ fonts directly on your website. Its currently submitted for review, So if you want updates on that, you can visit Github Font Tester.

Thanks! Continue shipping your projects to production πŸš€

#CodeLessShipMore

Top comments (5)

Collapse
 
stokry profile image
Stokry

The Django SaaS Starter Kit is fantastic! I think it would be even more powerful if it included a wizard or configuration tool that allows users to specify their project needs upfront. For example, if you don’t need a payment module or a blog, you could select these options before generating the project. This would result in a project tailored to your specific requirements from the start, greatly speeding up development. Of course, you could always add additional modules like payment or blog later if needed. This feature would make the starter kit even more useful and efficient.

Collapse
 
stokry profile image
Stokry

I could even sponsor this if needed! 😊

Collapse
 
paul_freeman profile image
Paul • Edited

Hey,
Thank you for your kind words!

I've been planning to create a webpage/CLI that dynamically adds modules based on developers' needs. However, lately I've been balancing open-source contributions with looking for small contract work, so progress has been a bit slow.

I primarily fund my open-source work through custom projects, but unfortunately, my previous client didn’t pay up, which has made things a bit challenging. That’s why I decided to participate in this challenge.

If you’re able to sponsor my work or have any projects you could delegate to meβ€”like custom landing pages or Django/React-related tasksβ€”I’d be more than happy to help. With sufficient funds, I could prioritize implementing this as early as possible.

Collapse
 
programordie profile image
programORdie

The commits in your repo are 2 months old...

Collapse
 
paul_freeman profile image
Paul • Edited

Thanks for your comment!

Yes, I started working on this 2 months ago, and I am constantly pushing updates and patches to make sure that the SaaS developers using my starterkit are always upto date, getting new features and bug fixes, so they won't have to worry about the maintenance.

Thought this would be a perfect competition to show some of my open-source Django starterkit, and help other developers find the starterkit and save time. πŸ˜‰