{"id":21049472,"url":"https://github.com/PaulleDemon/Django-SAAS-Boilerplate","last_synced_at":"2025-05-15T20:31:39.907Z","repository":{"id":246670538,"uuid":"820879975","full_name":"PaulleDemon/Django-SAAS-Boilerplate","owner":"PaulleDemon","description":"Supercharge your SAAS development using the django SAAS Boilerplates","archived":false,"fork":false,"pushed_at":"2024-09-07T01:05:11.000Z","size":1897,"stargazers_count":44,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-09-07T03:35:36.864Z","etag":null,"topics":["django","django-saas-starter","django-saas-template","saas","saas-boilerplate"],"latest_commit_sha":null,"homepage":"https://django-saas-boilerplate.vercel.app","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PaulleDemon.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"License","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"ko_fi":"artpaul","buy_me_a_coffee":"artpaul"}},"created_at":"2024-06-27T11:11:26.000Z","updated_at":"2024-09-07T01:05:15.000Z","dependencies_parsed_at":"2024-06-29T15:21:21.328Z","dependency_job_id":"8d52777c-2d88-4215-b55b-26064f8145c3","html_url":"https://github.com/PaulleDemon/Django-SAAS-Boilerplate","commit_stats":null,"previous_names":["paulledemon/django-saas-boilerplate"],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PaulleDemon%2FDjango-SAAS-Boilerplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PaulleDemon%2FDjango-SAAS-Boilerplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PaulleDemon%2FDjango-SAAS-Boilerplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PaulleDemon%2FDjango-SAAS-Boilerplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PaulleDemon","download_url":"https://codeload.github.com/PaulleDemon/Django-SAAS-Boilerplate/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254418343,"owners_count":22068046,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["django","django-saas-starter","django-saas-template","saas","saas-boilerplate"],"created_at":"2024-11-19T15:12:21.431Z","updated_at":"2025-05-15T20:31:39.154Z","avatar_url":"https://github.com/PaulleDemon.png","language":"JavaScript","funding_links":["https://ko-fi.com/artpaul","https://buymeacoffee.com/artpaul","https://ko-fi.com/L3L612WN7K"],"categories":["Web Development","Django"],"sub_categories":["Django"],"readme":"# Django SaaS Boilerplate (production ready)\nFocus on building your core functionality, skip writing repetitive code. Comes packed with landing page, Payment integration, blog, User model, sitemap and more.\n\n### Why use Django SaaS boilerplate?\nUsing 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.\n\nThis 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.\n\n**#CodeLessShipMore**\n\n### Want me to help you supercharge your Django SaaS development?\nContact me [here](https://tally.so/r/woO0Kx)\n\n### Want to help me write more open-source?\n\nConsider buying me a coffee\n\n[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/L3L612WN7K)\n\n### who is this boilerplate suitable for?\n* Reduce repetitive parts and focus on functionality.\n* For people building an MVP(minimum viable product) and trying to ship as quickly as possible.\n* People looking to learn Django.\n* People who just finished building core functionality and are looking to integrate landing page, blog, payment etc.\n\n### What features does Django template include?\n- [x] **Production ready**: you can immediately deploy this to cloud such as Vercel, Railway.app, Render.com etc.\n- [x] Comes with a default landing page that you can modify, for more landing pages visit [Awesome landing pages](https://github.com/PaulleDemon/awesome-landing-pages).\n- [x] **Responsive design**: forget about making things responsive yourself, as it includes responsive `base.html`, you can extend from.\n- [x] **Pricing page**: Comes with a basic pricing page you can modify\n- [x] **Postgres DB ready**: Comes with postgres Db configuration for production\n- [x] **ESP**: use transactional emails at scale (sending email notifications)\n- [x] **Modern admin:** uses unfold admin module.\n- [x] **Payment integration:** Default Stripe integration, just add your stripe keys and get started\n- [x] Recurring charges\n- [x] **Custom user model:** Easily modify the user model.\n- [x] **Login and Signup flow:** Including, verification email, resend token, password reset.\n- [x] **Blog:** Has blog with Trix WYSIWYG editor built into the admin panel.\n- [x] **Contact us:** Contact page and model to manage customer enquires.\n- [x] 404 page\n- [x] Technical SEO optimization.\n- [x] Dynamic Sitemap.xml\n- [x] Robots.txt\n- [x] Google analytics\n- [x] **Django storages:** Storage integration for production (default Google Object storage)\n- [x] **Tailwind css:** setup for rapid development (note: the tailwind classes are prefixed with `tw-`, to differentiate them)\n- [ ] **CLI Wizard:** Customize your setup with CLI wizard (upcoming)\n\n### Demo\nVisit the demo site: [Django Demo website](https://django-saas-boilerplate.vercel.app/)\n\nFor admin and login use.\n```\ndemo@mail.com\ndemo123*\n```\n\u003e[!NOTE]\n\u003e You will not receive any confirmation email upon signup as its disabled, use the above account to login to admin dashboard\n\nFor testing stripe check out test cards: https://docs.stripe.com/testing\n\n### Other templates\n**Basic non-saas website template:** [Django boilerplate](https://github.com/PaulleDemon/Django-website-template)\n\n**Free and opensource landing pages:** [Free landing pages](https://github.com/PaulleDemon/awesome-landing-pages)\n\n### Table of contents\n\n- [Why use Django website boilerplate?](#why-use-django-website-boilerplate)\n- [What features does Django template include?](#what-features-does-django-template-include)\n\n- [Demo](#demo)\n\n- [Local development](#local-development)\n  - [Admin superuser](#admin-superuser)\n  - [changing example.com to localhost/yourdomain](#changing-examplecom-to-localhostyourdomain)\n- [Customizing](#customizing)\n  - [Adding title, description to page](#adding-title-description-to-page)\n- [Payment - Stripe](#payment---stripe)\n- [Deployment:](#deployment)\n  - [Create a firebase credential file](#create-a-firebase-credential-file)\n  - [Deploying credential file to production](#deploying-credential-file-to-production)\n- [Tutorials](#tutorials)\n\n## Local development\n\nfollow the below steps :\n1. Star the repo: https://github.com/PaulleDemon/Django-SAAS-Boilerplate\n   \n2. Clone the repo\n`git clone https://github.com/PaulleDemon/Django-SAAS-Boilerplate`\n\n3. Install python 3.8 or above.\nhttps://www.python.org/downloads/\n\n4. Open the template folder and from the terminal change the\ndirectory to the current working directory.\n`cd home/Template`\n\n5. Install dependencies in an environment (creating an\nenviornment is optional, but recommended)\n```\npip install -r requirements.txt\n```\n\n6. Add a `.env` file inside the `project` folder with the following\n```py\nDEBUG=1\nPYTHON_VERSION=3.10\nDOMAIN=\"\"\n\nALLOWED_HOSTS=\".up.railway.app\"\nALLOWED_CORS=\"\"\n\nSECRET_KEY=\"\"\nPORD_SECRET_KEY=\"\"\n\nDJANGO_SUPERUSER_EMAIL=\"\" # optonal use if you want to create supruser using --noinput\nDJANGO_SUPERUSER_PASSWORD=\"\" # optonal use if you want to create supruser using --noinput\n\nEMAIL_HOST=\"smtpout.server.net\"\nEMAIL_HOST_USER=\"\"\nEMAIL_HOST_PASSWORD=\"\"\n\nPOSTGRES_DATABASE=\"\"\nPOSTGRES_USER=\"\"\nPOSTGRES_PASSWORD=\"\"\nPOSTGRES_HOST=\"\"\n\nPOSTGRES_URL=\"\"\n\nPROJECT_ID=\"\" # firebase project id\nBUCKET_NAME=\".appspot.com\" # firebase storage name\nFIREBASE_CRED_PATH=\"project/firebase-cred.json\"\n\nFIREBASE_ENCODED=\"\"\nCLOUD_PLATFORM=\"RAILWAY\"\n\nGOOGLE_ANALYTICS=\"G-\"\n\nSTRIPE_TEST_API_KEY=\"\"\nSTRIPE_WEBHOOK_TEST_API_KEY=\"\"\nSTRIPE_PUB_TEST_KEY=\"\"\n\nSTRIPE_PROD_API_KEY=\"\"\nSTRIPE_WEBHOOK_PROD_API_KEY=\"\"\nSTRIPE_PUB_PROD_KEY=\"\"\n```\n\n7. Now in your terminal Create databases and Tables using\n```\npython manage.py migrate\n```\nYour database is created and ready to use.\n\n8. Now run the website from the terminal using.\n```py\npython manage.py runserver\n```\nYour website should be available at: http://localhost:8000/\n\n9. To run Tailwind CSS open a new terminal and run\n```py\npython manage.py tailwind start\n```\n\n**Note:** If you are facing problems starting this program in windows OS, remove logging from project/settings.py\n\n### Admin superuser\nTo create a admin superuser use the following in terminal\n```py\npython manage.py createsuperuser\n```\n\n### changing example.com to localhost/yourdomain\nIf you are sending reset email you may notice its being sent from example.com, inorder to \nchange that you need to go to admin dashboard and from sites, change to your domain\n\n![site name](demo/images/site-change.png)\n\n## Customizing\n\nAll html, css, js and assets lies inside the templates.\n- To modify the landing page, update `home.html`.\n- To add link to header and footer or modify head tags, check `base.html`.\n- extend `base.html` to have the same footer and header.\n\n### Adding title, description to page\nTo add title and meta tags to a page use the following tags\n```py\n{% block title %}lorem impsum {% endblock title %}\n{% block description %}lorem impsum{% endblock description %} #meta description\n\n{% block socialTitle %}{{blog.title}} | {% endblock socialTitle %} # open graph title, for socials\n{% block socialDescription %}{{blog.meta_description}}{% endblock socialDescription %} # open graph description, for socials\n{% block pageType %}article{% endblock pageType %}\n{% block pageImage %}{% endblock pageImage %} # social image\n```\n\nTo add additional head tags\n\n```py\n{% block head_tags %}lorem impsum {% endblock head_tags %}\n```\nTo add scripts at the end of the elements\n```\n{% block scripts %}\n    \u003cscript src=\"{% static \"\" %}\" /\u003e\n{% endblock scripts %}\n```\n\n### Payment - Stripe\nBy default it is set up to use Stripe you can however change this to use other \npayment gateways supported by django-payments. \n\n\u003e [!CAUTION]  \n\u003e Don't make payment to your self in production, as this goes against Stripe terms of use. Use only stripe test account for testing purposes.\n\nYou can get the stripe test account secret key, public key and webhook key from stripe dashboard.\n\n* To forward webhook request to local development follow the stripe guide: https://docs.stripe.com/webhooks#local-listener\n\n## Deployment:\n\nYou can make use of Railway to deploy your own instance. \n\n\u003ca href=\"https://railway.app?referralCode=BfMDHP\"\u003e\n  \u003cimg src=\"railway.png\" alt=\"railway icon\" height=\"50px\"/\u003e\n\u003c/a\u003e\n\nLink to deploy to [Railway.app](https://railway.app?referralCode=BfMDHP)\n\nonce you complete make sure to \n```\npython manage.py collectstatic\n```\nand set\n```\nDEBUG=0\n```\n**Generate secret key**\nTo generate secret key use `from django.core.management.utils import get_random_secret_key` then `get_random_secret_key()` in your python shell\n\n**Note:** Don't forget to set the sites to your domain instead of example.com in the admin panel\n\n\u003e [!NOTE]  \n\u003e Make sure to add webhook endpoint during production via stripe, other wise you may not get the confirmations\n\n### Create a firebase credential file\n\n\u003e [!NOTE] \nWe'll be using firebase for persistent storage, to upload user files. Firebase is pre-configured as there are other firebase services developers may want to use. \u003cbr\u003e\u003cbr\u003e You can also use any of the storage supported by [django-storages](https://github.com/jschneier/django-storages), if you don't want to use firebase.\n\nTo use Firebase\n\n1. We use Google storage for storing files. Go to firebase -\u003e storage -\u003e create (make it public)\n\n2. Now Go to firebase -\u003e project settings -\u003e service account -\u003e Generate new private key.\n\nRename the private as `firebase-cred.json`\n\nUse this private file as your credential file.\n\n#### Deploying credential file to production\nSometimes your cloud provider may not provide you with storage for secret files. \nSo convert the credential file to base64 using\n```\nbase64 firebase-cred.json \u003e encoded.txt\n```\nNow copy the contents of encoded.txt and paste it in `FIREBASE_ENCODED=\"wedde\"` variable\n\n### Tutorials\n  #### Looking to learn about adding payment to Django?\n  Check out this blog about [adding payment to django](https://dev.to/paul_freeman/adding-payment-to-django-app-4cc9). This should give you an overview about adding payments to Django.\n\n  #### Adding ESP\n  Check out this blog on adding ESP to help you supercharge [transactional emails](https://dev.to/paul_freeman/adding-esp-to-supercharge-your-django-email-4jkp)\n\n  #### Deploying to Vercel\n  Check out this blog for vercel deployment help [Django vercel deployment](https://dev.to/paul_freeman/deploying-django-website-to-vercel-19ed)\n\n## Images credits\nImages are taken from free to use sites such as \n1. unsplash - https://unsplash.com/\n2. Pexels - https://www.pexels.com/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPaulleDemon%2FDjango-SAAS-Boilerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FPaulleDemon%2FDjango-SAAS-Boilerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPaulleDemon%2FDjango-SAAS-Boilerplate/lists"}