Your Docusaurus site did not load properly.

A very common reason is a wrong site baseUrl configuration.

Current configured baseUrl = / (default value)

We suggest trying baseUrl =

Getting started with SaaS Boilerplate

The primary objective of this boilerplate is to give you a production ready code that reduces the amount of time you would normally have to spend on system infrastructure's configuration. It contains a number of services that a typical web application has (frontend, backend api, admin panel, workers) as well as their continuous deployment. Using this boilerplate you can deploy multiple environments, each representing a different stage in your pipeline.

We don't create any new CLIs or APIs that you need to learn. We use existing solutions, which you can extend or change however you like:

  • Make
  • CDK (TypeScript)
  • Serverless Framework
  • Docker

Prerequisites#

  • Install latest Node.js (with NPM >= 6)
  • Install Python 3.8

We recommend installing Python using pyenv

Installation#

We recommend cloning this repository instead of downloading the ZIP. This way you'll be able to merge latest changes without too much hassle by resolving conflicts using your favourite tools.

To setup the project and install local dependencies run following command:

./setup.sh

Running locally#

Setup the local environment#

make setup

Adjust .env files#

Files with environmental variables are ignored in GIT to avoid secret values being commited and shared with everyone. To make the app work as expected you need to initialize following .env files from .env.example files located in the same directories:

  • services/webapp/.env – variables loaded by webpack when you run the local dev server

  • services/workers/.env – variables loaded by docker-compose when you invoke worker functions locally

  • services/backend/.env – variables loaded by docker-compose when you run the backend server locally

tip

This should be actually done automatically as part of the make setup

Now, adjust the key values that have to be set in the services/backend/.env:

NameExampleDescription
DJANGO_DEBUGTruedocs
DJANGO_SECRET_KEYZs639zRcb5!9om2@tW2H6XG#Znj^TB^Idocs
HASHID_FIELD_SALTt5$^r*xsMRXn1xjzhRSl8I5Hb3BUW$4Udocs
ADMIN_EMAILadmin@exmaple.comWill be used to create first super admin user
ADMIN_DEFAULT_PASSWORDAvPZpabgj9Z8Will be used to create first super admin user
STRIPE_TEST_SECRET_KEYsk_test_1234you can get some here

Run backend services:#

make up

Backend is running on http://localhost:5000.

Backend endpoint docs are available on http://localhost:5000/doc.

Admin Panel is running on http://admin.localhost:5000.

Workers trigger server is running on http://localhost:3005.

Mailcatcher is running on http://localhost:1080. Check dedicated doc before using.

Run webapp service:#

cd services/webapp
yarn
yarn start