Contributing
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.
- Install Docker Desktop
- Clone the repo and navigate to the project
git clone https://github.com/uselotus/lotus.git && cd lotus
- Run the self-hosting script:
If you need to give the script permission to run, run
./scripts/dev.sh
chmod 755 ./scripts/dev.sh
first. - You should now be able to access the homepage at localhost:8000/, and sign in using the
ADMIN_USERNAME
andADMIN_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 serviceno-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
- Run tests
chmod +x ./backend/scripts/run-tests-docker.sh && ./backend/scripts/run-tests-docker.sh
- 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) Value | Change? |
---|---|---|
POSTGRES_USER | lotus | β |
POSTGRES_DB | lotus | β |
POSTGRES_PASSWORD | lotus | β |
SECRET_KEY | change_me | β |
ADMIN_USERNAME | change_me | β |
ADMIN_EMAIL | change_me | β |
ADMIN_PASSWORD | change_me | β |
DEBUG | True | |
SELF_HOSTED | True | |
DOCKERIZED | True | |
DJANGO_SETTINGS_MODULE | βlotus.settingsβ | |
NODE_ENV | development | |
VITE_API_URL | βhttp://localhost:8000/β | |
STRIPE_LIVE_SECRET_KEY | sk_live_ | β |
STRIPE_LIVE_CLIENT | ca_ | β |
STRIPE_TEST_SECRET_KEY | sk_test_ | β |
STRIPE_TEST_CLIENT | ca_ | β |
STRIPE_WEBHOOK_SECRET | whsec_ | β |
SVIX_JWT_SECRET | change_me | β |