If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply request a feature.

Don’t forget to give the project a star! Thanks again!

Extensibility

Lotus aims to serve as many use cases as possible! We want to make sure that you can extend the project to fit your needs. We have a special tag in our issues for features that already have a framework or template for you to use, allowing you to enhance the code to fit your needs seamlessly. For example, building a new integration with a payment processor, or hooking up a different CRM.

You can find these issues tagged with the extensibility label in our Github issues.

πŸ‘·β€β™‚οΈ Local Development

To develop locally, we recommend using Docker to set up the environment, which allows for hot reloading of both frontend and backend code.

  1. Install Docker Desktop
  2. Clone the repo and navigate to the project
    git clone https://github.com/uselotus/lotus.git && cd lotus
    
  3. Run the self-hosting script:
    ./scripts/dev.sh
    
    If you need to give the script permission to run, run chmod 755 ./scripts/dev.sh first.
  4. You should now be able to access the homepage at localhost:8000/, and sign in using the ADMIN_USERNAME and ADMIN_PASSWORD you defined, or the default, which is:
    username: change_me
    password: change_me
    

Optionally:

  • Change the environment variables located in env/.env.dev to suit your needs. For more details, check out this guide in our docs.
  • If the dev distirbution of Lotus is too heavy for your machine, you can use some flags to remove some optional lotus modules from the build:
    • --no-events to remove the entire event tracking infrastructure, including Kafka/Redpanda, the event service module, and the event ingestion service
    • no-webhooks to remove the webhook service module. This is useful if you don’t need to send webhooks to external services.
    • --no-beat to remove the celery-beat service module. This is useful if you don’t need to run scheduled tasks.
    • --force-recreate to force the docker containers to be recreated, even if they already exist. This is useful if you want to rebuild the containers with different flags.

If you make any changes to the backend settings or the environment variables, you might need to restart the Docker container.

πŸ” Before Committing

  1. Run tests
chmod +x ./backend/scripts/run-tests-docker.sh  && ./backend/scripts/run-tests-docker.sh
  1. Check the python code style
chmod +x ./backend/scripts/run-codestyle-docker.sh  && ./backend/scripts/run-codestyle-docker.sh

Local Development Env variables

Variable Name(Default) ValueChange?
POSTGRES_USERlotusβœ”
POSTGRES_DBlotusβœ”
POSTGRES_PASSWORDlotusβœ”
SECRET_KEYchange_meβœ”
ADMIN_USERNAMEchange_meβœ”
ADMIN_EMAILchange_meβœ”
ADMIN_PASSWORDchange_meβœ”
DEBUGTrue
SELF_HOSTEDTrue
DOCKERIZEDTrue
DJANGO_SETTINGS_MODULEβ€œlotus.settings”
NODE_ENVdevelopment
VITE_API_URL”http://localhost:8000/”
STRIPE_LIVE_SECRET_KEYsk_live_βœ”
STRIPE_LIVE_CLIENTca_βœ”
STRIPE_TEST_SECRET_KEYsk_test_βœ”
STRIPE_TEST_CLIENTca_βœ”
STRIPE_WEBHOOK_SECRETwhsec_βœ”
SVIX_JWT_SECRETchange_meβœ”