โณLocal setup in 3 minutes...
Last updated
Last updated
Follow these steps to set up your local environment for Ready SaaS. This will prepare your development environment to run the application locally.
Once you get Ready SaaS, you'll receive an invite to our private Github Repo.
Once you access the repo, grab the repo address and clone it
clone the repo running the following command in your terminal:
To install dependencies, we recommend using a virtual environment. A virtual environment isolates your Python/Django setup on a per-project basis, ensuring dependencies are kept separate from other projects.
In this guide we're using venv to manage our virtual environment.
Run each of these commands in order to create a virtual environment, and install all dependencies in it. You can replace .ready_saas
with the name of your project if you prefer.
Notice that the pip install -r requirements/local.txt
command installs all requirements listed in requirements/local.txt
. Ready SaaS let's you specify which dependencies should be included in each environment.
To run Ready SaaS locally, you'll first need to create a Postgres DB and reference it within the project.
In order to do that, make sure you have Postgres installed.
To create a new db for your project, run the following command:
The above command expects you to provide your own postgres username
and your desired db_name
Within the project you'll find a .env-sample
file. You can rename it to .env
or copy it to create a new .env
file:
Use the db_name
from the previous step to populate the DATABASE_URL
. Also include your Postgres credentials: db_user
and db_password
The following command will create the necessary tables in your local database.
This optional step populates your local database with sample subscription plans, useful for development and testing. If you don't run this command, you will likely see an error when accessing pages that require a subscription plan to exist.
Creating an admin user allows you to access Django's admin interface to manage application data.
To create an admin user run the following command:
Now you're ready to start Djangoโs development server, making the application accessible on your local machine.
you can optionally specify the port number you'd like it to run on:
If you followed all the steps up to this point, you should have an identical instance of this page running in your local machine.
Yay! ๐ You're done with the basic local setup!
If you want to change the content of that page right now, open and edit the following file:
ready_saas/templates/landing.html