Local Setup

After cloning the repo, follow these steps to set up your local environment for Ready SaaS. This will prepare your development environment to run the application locally.

1. Create a virtual environment to install all dependencies

A virtual environment isolates your Python/Django setup on a per-project basis, ensuring dependencies are kept separate from other projects.

Run each of these commands in order and replace .ready_saas with the env name you prefer

python -m venv .ready_saas
source .ready_saas/bin/activate
pip install -r requirements/local.txt

2. Apply migrations

This will create the necessary tables in your local database.

python manage.py migrate

3. (optional) Seed sample subscription plans

This optional step populates your local database with sample subscription plans, useful for development and testing.

python manage.py loaddata orders/fixtures/plans.json

4. Create Admin user

Creating an admin user allows you to access Django's admin interface to manage application data.

python manage.py createsuperuser

5. Run local server

Starts Django’s development server, making the application accessible on your local machine.

python manage.py runserver

6. install Redis and start Redis Server

Redis is used as a message broker for Celery, handling tasks such as sending emails in the background.

brew install redis
redis-server

7. Start Celery worker and celery beat

Celery is used to run background tasks such as sending emails, processing payments, and more.

Run the following commands in separate terminal windows to start the Celery worker and beat processes.

python -m celery -A config worker -l info
python -m celery -A config beat -l info

Ready to deploy?

Follow these instructions to Deploy your app to Heroku!

Deploy to Heroku docs