Skip to main content

Visual design collaboration layer for djust / Django — point at the page, edit the source.

Project description

djust-designer

⚠️ Contributors: read docs/HANDOFF.md before starting new work — the scope is being reconsidered (Framer-style no-code builder vs. current class editor), and the feat/regions branch is local-only.

Visual design collaboration layer for djust / Django apps. Point at any element on your running page → see its source template + line → edit its Tailwind classes with automatic write-back → undo with one click. No terminal, no code editor. Ships with a Claude Code MCP bridge so an AI assistant can act on whatever the designer just clicked.

Runs on DEBUG=True only. No traces in production.

Install

Plain Django project:

pip install djust-designer

With Claude Code MCP bridge:

pip install 'djust-designer[mcp]'

Targeting a djust app (pulls djust too):

pip install 'djust-designer[djust,mcp]'

Local development:

pip install -e '.[dev,mcp]'

Wire it up

Distribution name is djust-designer (hyphen) on PyPI; the Python module is djust_designer (underscore) — standard Django-package convention.

# settings.py
INSTALLED_APPS = [..., "djust_designer"]
MIDDLEWARE = ["djust_designer.middleware.DjustDesignerMiddleware", ...]

TEMPLATES = [{
    "BACKEND": "django.template.backends.django.DjangoTemplates",
    "DIRS": [BASE_DIR / "templates"],
    "APP_DIRS": False,
    "OPTIONS": {"loaders": [(
        "djust_designer.instrument.loader.InstrumentedFilesystemLoader",
        [str(BASE_DIR / "templates")],
    )]},
}]
# urls.py
urlpatterns += [path("", include("djust_designer.urls"))]

Using APP_DIRS = True

If your project relies on per-app templates/ directories, use InstrumentedAppDirsLoader instead (or in addition to) the filesystem loader:

TEMPLATES = [{
    "BACKEND": "django.template.backends.django.DjangoTemplates",
    "DIRS": [BASE_DIR / "templates"],
    "APP_DIRS": False,
    "OPTIONS": {"loaders": [
        ("djust_designer.instrument.loader.InstrumentedFilesystemLoader",
         [str(BASE_DIR / "templates")]),
        "djust_designer.instrument.loader.InstrumentedAppDirsLoader",
    ]},
}]

Every template — whether from DIRS or an installed app — is edit-eligible.

Try the demo

cd demo && python manage.py runserver 8737
# open http://localhost:8737

Hover → highlight. Click → panel. Edit class → Apply → source rewritten → hot-reloaded. Undo → previous state.

Panel niceties

  • Tailwind autocomplete — the class input suggests ~1,600 common Tailwind utilities as you type. Arrow keys navigate, Enter/Tab inserts.
  • Tag label — the panel header shows the selected element's tag name (e.g. <button>) so you always know what you're editing.
  • Toast — Apply/Undo produce a small feedback toast so failures are visible.

Claude Code (MCP)

The overlay mirrors the designer's current selection to the server so an MCP client can act on it. Install and register:

pip install -e '.[mcp]'
claude mcp add djust-designer python -m djust_designer.mcp

Then, with the demo (or any djust-designer-wired app) running, ask Claude Code:

"Restyle whatever I just clicked to be rounder with a dark background."

Claude Code calls the MCP tools:

  • get_current_selection() — what the designer just clicked (zd_id, file, line, tag, class)
  • resolve_id(zd_id) — source location for any data-zd-id visible in the DOM
  • edit_class(zd_id, new_class) — rewrite the class attribute (backup-safe)
  • undo_last() — restore the most recent snapshot

If the app is on a non-default port, set DJUST_DESIGNER_URL or pass --url when registering:

claude mcp add djust-designer -- python -m djust_designer.mcp --url http://127.0.0.1:9000

Publishing to PyPI

Sanity check first, then build and upload:

pip install -e '.[dev]'
pytest -q && ruff check . && ruff format --check . && ty check
rm -rf dist/
python -m build         # produces dist/*.whl and dist/*.tar.gz
twine check dist/*
twine upload dist/*     # or `twine upload --repository testpypi dist/*` first

Version bumps live in pyproject.toml ([project].version). Tag the release in git before uploading (git tag v0.1.0 && git push --tags).

License

MIT — see LICENSE.

Design docs

  • Design: docs/superpowers/specs/2026-07-09-djust-designer-design.md
  • Plan: docs/superpowers/plans/2026-07-09-djust-designer-p1-mvp.md

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

djust_designer-0.1.0.tar.gz (28.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

djust_designer-0.1.0-py3-none-any.whl (25.6 kB view details)

Uploaded Python 3

File details

Details for the file djust_designer-0.1.0.tar.gz.

File metadata

  • Download URL: djust_designer-0.1.0.tar.gz
  • Upload date:
  • Size: 28.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.9

File hashes

Hashes for djust_designer-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2e48fca1edd5b4ba9e0e5f756ebdfef403bb96901f96043e501b86131b4c40f4
MD5 15194052495bf82f46f1fd9c4d467a8d
BLAKE2b-256 e384d890fb165864471dc11fe2128a67f54999d7f832d7373451e1e6d87c288d

See more details on using hashes here.

File details

Details for the file djust_designer-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: djust_designer-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 25.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.9

File hashes

Hashes for djust_designer-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cce576fcfcde97eedb053e96c10b9d54ec170ed6dc7f55afe350ef7129dbed93
MD5 80d9839f5bea6d34049c1d326e4a3bc2
BLAKE2b-256 07987f4a9c6cdcce67764fa35192d58d7b7da1faa1088ccbb43647e2d9130173

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page