Skip to content

Build an Enterprise SaaS Service with Django. Learn how to isolate customer data by implementing multi-tenancy, subdomain-based auth, and more.

License

Notifications You must be signed in to change notification settings

codingforentrepreneurs/SaaS-for-Enterprise-with-Django

Repository files navigation

SaaS for Enterprise with Django

Learn how to build an Enterprise SaaS project using Django, Neon Postgres, TailwindCSS, SaaS Starter Code, and more. Enterprise SaaS means we need a a way to isolate customer data by implementing multi-tenancy, subdomain-based auth, and much more. We start with an existing Django application and build on top of that.

Need help?

Use the discussions tab.

Before you start

I recommend you know some of the following:

  • Python
    • Such as classes, functions, variables, math operations, installing, setting up virtual environments
    • If you're new to Python, watch up to day 15 of 30 Days of Python(free)
  • Django basics
  • SaaS fundamentals with Django (Optional).
    • Such as Stripe integration, groups, user permissions,
    • Consider watching SaaS Foundations course on YouTube or on CFE
    • Review the SaaS starter code on GitHub(open source) or cfe.run(managed)

Links

Topics

  • What, when, and why of multi-tenant apps (e.g. SaaS apps that need to keep enterprise data isolated)
  • Levels of helping enterprise customers (e.g. when not to use multi-tenant)
  • Implementing a multi-tenant in Django
  • Per-tenant (per enterprise customer) login
  • User data isoloation (via Postgres Schemas and Neon Databases)
  • Custom migrations for Django models; for standard Django and Enterprise customers
  • Django-hosts for subdomain routing and handling

Tech stack

  • Django 5+
  • Python 3+
  • django-hosts - Subdomain handling in Django
  • Neon Postgres - Serverless postgres + near instance database loading
  • Django SaaS Starter code via GitHub(open source) or cfe.run(managed)
  • psycopyg[binary] and dj-database-url - Loading postgres
  • and more

Note: django-tenants is not used in this course. While Django Tenants is a very good tool it requires you to start with Django tenants for your SaaS projects. This tutorial does not. django-tenants was instrumental in designing this course. Once you finish the course, I encourage you to play around with django-tenants!

Definitions

Read the course-specific definitions on the GitHub discussions. This course has a number of definitions that are specific to multi-tenant, enterprise-ready, Django SaaS projects and specific to this course.

About

Build an Enterprise SaaS Service with Django. Learn how to isolate customer data by implementing multi-tenancy, subdomain-based auth, and more.

Topics

Resources

License

Stars

Watchers

Forks