Hey there! We are so excited that you're interested in Danswer.
As an open source project in a rapidly changing space, we welcome all contributions.
The GitHub issues page is a great place to start for contribution ideas.
Issues that have been explicitly approved by the maintainers (aligned with the direction of the project)
will be marked with the approved by maintainers label.
Issues marked good first issue are an especially great place to start.
Connectors to other tools are another great place to contribute, the required interfaces are outlined
here
and many examples can be found under the danswer/backend/danswer/connectors directory.
If you have a new contribution in mind, we'd love to hear about it! Your input is vital to making sure that Danswer moves in the right direction. Before starting on implementation, please raise a GitHub issue.
And always feel free to message us (Chris Weaver / Yuhong Sun) on Slack / Discord directly about anything at all.
To contribute to this project, please follow the "fork and pull request" workflow. When opening a pull request, mention related issues and feel free to tag relevant maintainers.
Before creating a pull request please make sure that the new changes conform to the formatting and linting requirements. See the Formatting and Linting section for how to run these checks locally.
Our goal is to make contributing as easy as possible. If you run into any issues please don't hesitate to reach out. That way we can help future contributors and users can avoid the same issue.
We also have support channels and generally interesting discussions on our Slack and Discord.
We would love to see you there!
Danswer being a fully functional app, relies on several external pieces of software, specifically:
This guide provides instructions to set up the Danswer specific services outside of Docker because it's easier for
development purposes but also feel free to just use the containers and update with local changes by providing the
--build flag.
We've tested primarily with Python versions >= 3.11 but the code should work with Python >= 3.9.
This guide skips a few optional features for simplicity, reach out if you need any of these:
- User Authentication feature
- File Connector background job
Currently, we use pip and recommend creating a virtual environment.
For convenience here's a command for it:
python -m venv .venv
source .venv/bin/activateInstall the required python dependencies:
pip install -r danswer/backend/requirements/default.txt
pip install -r danswer/backend/requirements/dev.txtInstall Node.js and npm for the frontend.
Once the above is done, navigate to danswer/web run:
npm iInstall Playwright (required by the Web Connector)
playwright installFirst navigate to danswer/deployment/docker_compose, then start up the containers with:
Postgres:
docker compose -f docker-compose.dev.yml -p danswer-stack up -d relational_dbQdrant:
docker compose -f docker-compose.dev.yml -p danswer-stack up -d vector_dbTypesense:
docker compose -f docker-compose.dev.yml -p danswer-stack up -d search_engineSetup a folder to store config. Navigate to danswer/backend and run:
mkdir dynamic_config_storageTo start the frontend, navigate to danswer/web and run:
DISABLE_AUTH=true npm run devThe first time running Danswer, you will need to run the migrations. Navigate to danswer/backend and run:
alembic upgrade headTo run the backend api server, navigate to danswer/backend and run:
DISABLE_AUTH=True TYPESENSE_API_KEY=local_dev_typesense DYNAMIC_CONFIG_DIR_PATH=./dynamic_config_storage uvicorn danswer.main:app --reload --port 8080To run the background job to check for connector updates and index documents, navigate to danswer/backend and run:
PYTHONPATH=. TYPESENSE_API_KEY=local_dev_typesense DYNAMIC_CONFIG_DIR_PATH=./dynamic_config_storage python danswer/background/update.pyFor the backend, you'll need to setup pre-commit hooks (black / reorder-python-imports).
First, install pre-commit (if you don't have it already) following the instructions
here.
Then, from the danswer/backend directory, run:
pre-commit installAdditionally, we use mypy for static type checking.
Danswer is fully type-annotated, and we would like to keep it that way!
Right now, there is no automated type checking at the moment (coming soon), but we ask you to manually run it before
creating a pull requests with python -m mypy . from the danswer/backend directory.
We use prettier for formatting. Follow the guide here to install, and run
npx prettier --write . from the danswer/web directory to automatically format.
Like mypy, we have no automated formatting yet (coming soon), but we request that, for now,
you run this manually before creating a pull request.
Danswer follows the semver versioning standard. A set of Docker containers will be pushed automatically to DockerHub with every tag. You can see the containers here.
As pre-1.0 software, even patch releases may contain breaking or non-backwards-compatible changes.