> ## Documentation Index
> Fetch the complete documentation index at: https://sourcebot-whoisthey-language-model-input-modalities.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Architecture

Sourcebot is shipped as a single docker container that runs a collection of services using [supervisord](https://supervisord.org/):

<img src="https://mintcdn.com/sourcebot-whoisthey-language-model-input-modalities/UI3at4lP3VZBMCMb/images/architecture_diagram.png?fit=max&auto=format&n=UI3at4lP3VZBMCMb&q=85&s=fe019d1a757ecd5cf3543d8c615ebd03" alt="architecture diagram" width="5777" height="3534" data-path="images/architecture_diagram.png" />

Sourcebot consists of the following components:

* **Web Server** : main Next.js web application serving the Sourcebot UI.
* **Backend Worker** : Node.js process that incrementally syncs with code hosts (e.g., GitHub, GitLab etc.) and asynchronously indexes configured repositories.
* **Zoekt** : the [open-source](https://github.com/sourcegraph/zoekt), trigram indexing code search engine that powers Sourcebot under the hood.
* **Postgres** : transactional database for storing business-logic data.
* **Redis Job Queue** : fast in-memory store. Used with [BullMQ](https://docs.bullmq.io/) for queuing asynchronous work.
* **`.sourcebot/` cache** : file-system cache where persistent data is written.

You can use managed Redis / Postgres services that run outside of the Sourcebot container by providing the `REDIS_URL` and `DATABASE_URL` environment variables, respectively. See the [environment variables](/docs/configuration/environment-variables) doc for more configuration options.
