Files
upstream-zulip/docs/subsystems/directory-structure.md
upstream-mirror 64898b2c79
Some checks failed
Code scanning / CodeQL (push) Failing after 15s
Zulip production suite / Ubuntu 22.04 production build (push) Failing after 26s
Zulip production suite / Debian 12 production install with custom db name and user (push) Has been skipped
Zulip production suite / Ubuntu 22.04 production install and PostgreSQL upgrade with pgroonga (push) Has been skipped
Zulip production suite / Ubuntu 24.04 production install (push) Has been skipped
Zulip production suite / Ubuntu 26.04 production install (push) Has been skipped
Zulip production suite / Debian 13 production install (push) Has been skipped
Zulip production suite / 7.0 Version Upgrade (push) Has been skipped
Zulip production suite / 8.0 Version Upgrade (push) Has been skipped
Zulip production suite / 6.0 Version Upgrade (push) Has been skipped
Zulip production suite / 10.0 Version Upgrade (push) Has been skipped
Zulip production suite / 9.0 Version Upgrade (push) Has been skipped
Zulip production suite / 12.0 Version Upgrade (push) Has been skipped
Zulip production suite / 11.0 Version Upgrade (push) Has been skipped
GitHub Actions Security Analysis with zizmor / zizmor (push) Failing after 3s
Zulip CI / Debian 12 (Python 3.11, backend + documentation) (push) Failing after 26s
Zulip CI / Ubuntu 22.04 (Python 3.10, backend + frontend) (push) Failing after 3s
Zulip CI / Ubuntu 24.04 (Python 3.12, backend) (push) Failing after 25s
Zulip CI / Ubuntu 26.04 (Python 3.14, backend) (push) Failing after 25s
Zulip CI / Debian 13 (Python 3.13, backend) (push) Failing after 28s
Zulip production suite / Required jobs (push) Has been cancelled
Zulip CI / Required jobs (push) Has been cancelled
API Documentation Update Check / check-feature-level-updated (push) Has been cancelled
API Documentation Update Check / notify-if-api-docs-changed (push) Has been cancelled
snapshot of https://github.com/zulip/zulip.git @ 48c69911c7dd4e03b20552eb3bd77ad8151c1357 (2026-09-15)
2026-09-15 15:05:30 +05:00

5.5 KiB

Directory structure

This page documents the directory structure of the Zulip server and web app project. You may also find the new application feature tutorial helpful for understanding the flow through these files.

Core Python files

Zulip uses the Django web framework, so a lot of these paths will be familiar to Django developers.


HTML templates

See our docs for details on Zulip's templating systems.

  • templates/zerver/ For Jinja2 templates for the backend (for zerver app; logged-in content is in templates/zerver/app).

  • web/templates/ Handlebars templates for the frontend.


JavaScript, TypeScript, and other frontend assets

  • web/src/ Zulip's own JavaScript and TypeScript sources.

  • web/styles/ Zulip's own CSS.

  • web/images/ Images bundled with webpack.

  • static/images/ Images served directly to the web.

  • web/third/ Third-party JavaScript and CSS that has been vendored.

  • node_modules/ Third-party JavaScript installed via pnpm.

  • web/icons/ Icons placed in this directory are compiled into an icon font.


Tests

  • zerver/tests/ Backend tests.

  • web/tests/ Node Frontend unit tests.

  • web/e2e-tests/ Puppeteer frontend integration tests.

  • tools/test-* Developer-facing test runner scripts.


Management commands

These are distinguished from scripts, below, by needing to run a Django context (i.e. with database access).

  • zerver/management/commands/ Management commands one might run at a production deployment site (e.g., scripts to change a value or deactivate a user properly).

  • zilencer/management/commands/ includes some dev-specific commands such as populate_db, which are not included in the production distribution.


Scripts

  • scripts/ Scripts that production deployments might run manually (e.g., restart-server).

  • scripts/lib/ Scripts that are needed on production deployments but humans should never run directly.

  • scripts/setup/ Scripts that production deployments will only run once, during installation.

  • tools/ Scripts used only in a Zulip development environment. These are not included in production release tarballs for Zulip, so that we can include scripts here one wouldn't want someone to run in production accidentally (e.g., things that delete the Zulip database without prompting).

  • tools/setup/ Subdirectory of tools/ for things only used during the development environment setup process.

  • tools/ci/ Subdirectory of tools/ for things only used to set up and run our tests in CI. Actual test suites should go in tools/.


API and bots

  • See the Zulip API repository. Zulip's Python API bindings, a number of Zulip integrations and bots, and a framework for running and testing Zulip bots, used to be developed in the main Zulip server repo but are now in their own repo.

  • templates/zerver/integrations/ (within templates/zerver/, above). Documentation for these integrations.


Production Puppet configuration

This is used to deploy essentially all configuration in production.

  • puppet/zulip/ For configuration for production deployments.

  • puppet/zulip/manifests/profile/standalone.pp Main manifest for Zulip standalone deployments.


Additional Django apps

  • confirmation Email confirmation system.

  • analytics Analytics for the Zulip server administrator (needs work to be useful to normal Zulip sites).

  • corporate The old Zulip.com website. Not included in production distribution.

  • zilencer Primarily used to hold management commands that aren't used in production. Not included in production distribution.


Jinja2 compatibility files

  • zproject/jinja2/__init__.py Jinja2 environment.

Translation files

  • locale/ Backend (Django) and frontend translation data files.

Documentation

  • docs/ Source for this documentation.

You can consult the repository's .gitattributes file to see exactly which components are excluded from production releases (release tarballs are generated using tools/build-release-tarball).