> ## Documentation Index
> Fetch the complete documentation index at: https://docs.uselotus.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Contributing

> Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please
[fork the repo](https://github.com/uselotus/lotus) and
[create a pull request](https://makeapullrequest.com/). You can also simply
[request a feature](https://github.com/uselotus/lotus/issues/new?assignees=\&labels=\&template=feature%5Frequest.md\&title=).

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](https://github.com/uselotus/lotus/issues?q=is%3Aopen+is%3Aissue+label%3Aextensibility).

## 👷‍♂️ 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](https://www.docker.com/products/docker-desktop/)
2. Clone the repo and navigate to the project
   ```sh theme={null}
   git clone https://github.com/uselotus/lotus.git && cd lotus
   ```
3. Run the self-hosting script:
   ```sh theme={null}
   ./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/](http://localhost:8000/), and sign in using the `ADMIN_USERNAME` and `ADMIN_PASSWORD` you defined, or the default, which is:
   ```py theme={null}
   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](https://docs.uselotus.io/docs/overview/self-hosting).
* 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

```bash theme={null}
chmod +x ./backend/scripts/run-tests-docker.sh  && ./backend/scripts/run-tests-docker.sh
```

2. Check the python code style

```bash theme={null}
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/](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                                         | ✔       |
