Djinn UI — The first true shadcn/ui equivalent for Django. It's an AI-assisted, registry-driven platform featuring a visual component workbench, an AI Forge for real-time generative UI, and a Python CLI that ejects fully-owned │ code directly into your monolith.

By (@josephjbassey) · · For Developers

Djinn UI — The first true shadcn/ui equivalent for Django. It's an AI-assisted, registry-driven platform featuring a visual component workbench, an AI Forge for real-time generative UI, and a Python CLI that ejects fully-owned │ code directly into your monolith. - image 1 Djinn UI — The first true shadcn/ui equivalent for Django. It's an AI-assisted, registry-driven platform featuring a visual component workbench, an AI Forge for real-time generative UI, and a Python CLI that ejects fully-owned │ code directly into your monolith. - image 2

Djinn bridges the gap between modern, copy-and-own frontends and backend-heavy Python workflows. Dissatisfied with bloated component libraries and restrictive lock-ins, I engineered a serverless, registry-driven system that allows

developers to visually configure atomic UI categories (built with Tailwind CSS and Alpine.js/HTMX) and "eject" the raw source code straight into their local Django applications.

The platform consists of a visual web dashboard, an AI MCP server for real-time natural language component generation, a backend registry engine, and a live Python package distributed on PyPI ( djinn-ui ).

Instead of publishing a traditional UI component library, I wanted developers to own their components. By utilizing a custom management CLI, you can seamlessly pull templates and component logic files into your codebase—giving you

100% ownership of your UI layer. Throughout development, AI served as an architectural collaborator rather than just a code generator—helping me to iterate on the architecture, redesign the registry system, and build the fallback

Tech stack

  • ChatGPT
  • Claude
  • Claude Code
  • Gemini
  • Vercel

Prompt steps

  1. Step 1

    I want to build a CLI tool for Django called 'Djinn UI' that acts exactly like shadcn/ui does for Next.js. It shouldn't be a runtime dependency; it should use a CLI to scaffold Tailwind CSS-styled HTML components directly into a Django project's template directory. I also want it to include an MCP (Model Context Protocol) server so AI agents can read the local registry and add components automatically. Let's start by structuring the Python CLI using Typer or Click, and setting up the basic  init  and  add  commands.
  2. Step 2

    Build a 'Django Component Workbench' web application named "djinn" using React, Tailwind CSS, and Lucide-React icons. The design must be heavily inspired by daisyui.com/components, utilizing a high-density, minimalist Cyber-Noir dark theme (#0f172a backgrounds, sharp borders, with electric blue accents). Implement a scrollable left sidebar categorizing atomic UI components, a large central preview stage, a right inspector panel with Radix-style minimalist property toggles/sliders, and a bottom code panel rendering dynamic Django template syntax alongside a raw structural JSON registry block.
  3. Step 3

    Refactor the core management command file inside our PyPI package code at djinn/management/commands/djinn.py to support a Hybrid Fetch Architecture. The CLI must balance dynamic DB components from our live API URL (https://djinn-backend.vercel.app/api/v1) and static repository defaults from our GitHub open-source repo. Fire a requests.get() to check the database endpoint first. If it returns a 200, extract the dynamic payload files and write them locally. If it yields an HTTP 404 or a network timeout, gracefully fallback to fetching registry.json via raw.githubusercontent.com to process core static assets. Prevent duplication by writing an isolated disk-writing utility helper that automatically scaffolds directory paths.

Comments (3)

  1. Evan Wadsworth · · 2 likes

    Django needed this lane bad. Copy and own UI makes way more sense for backend-heavy teams than trying to bend a whole React stack around one app.

  2. Logan · · 1 like

    <p>Exactly what Django needed. Nice work!</p>

  3. Praise · · 1 like

    <p>AI-assisted UI for monoliths is smart. Saving this.</p>

14 likes · 3 comments · 26 views

Explore more on Prompted