The Modern Django Framework for Enterprise Applications
Type-safe configuration β’ Real-time WebSockets β’ gRPC Streaming β’ OpenAPI client generation β’ AI-Native Docs β’ 8 Production Apps
Get Started β’ Live Demo β’ Documentation β’ MCP Server
Django-CFG is a next-generation Django framework that replaces settings.py with type-safe Pydantic v2 models. Catch configuration errors at startup, get full IDE autocomplete, and ship production-ready features in 30 seconds instead of weeks.
- β Type-safe config - Pydantic v2 validation catches errors before deployment
- β 90% less code - Replace 200+ line settings.py with 30 lines
- β Typed API clients - Generate TypeScript / Python / Go clients from your DRF OpenAPI schema
- β First-party analytics - Typed product events, goals, and ordered funnels without a third-party tracker
- β Real-time WebSockets - Centrifugo integration included
- β gRPC streaming - Bidirectional streaming with WebSocket bridge
- β AI-native docs - First Django framework with MCP server for AI assistants
- β
Stripe payments - Checkout, webhooks, refunds out of the box (
django-cfg[payments]) - β 8 enterprise apps - Save 18+ months of development
# macOS / Linux
curl -L https://djangocfg.com/install.sh | sh
# Windows (PowerShell)
powershell -c "iwr https://djangocfg.com/install.ps1 | iex"pip install 'django-cfg[full]'
django-cfg create-project my_app
cd my_app/projects/django
poetry run python manage.py runserverWhat you get instantly:
- π¨ Django Admin (Unfold) β
http://127.0.0.1:8000/admin/ - π‘ Real-time WebSockets β Live updates
- π Auto-generated API clients β TypeScript / Python / Go
- π³ Docker Ready β Production configs
- π₯οΈ Electron App β Desktop template
Before: settings.py
# 200+ lines of untyped configuration
DEBUG = os.getenv('DEBUG', 'False') == 'True' # β Bug waiting to happen
DATABASE_PORT = os.getenv('DB_PORT', '5432') # β Still a string!After: Django-CFG
from django_cfg import DjangoConfig, DatabaseConfig
class MyConfig(DjangoConfig):
project_name: str = "My App"
debug: bool = False # β
Type-safe
databases: dict[str, DatabaseConfig] = {
"default": DatabaseConfig(
name="${DB_NAME}", # β
Validated at startup
port=5432, # β
Correct type
)
}Full IDE autocomplete β’ Startup validation β’ Zero runtime errors
Pydantic v2 models replace error-prone settings.py - catch bugs before deployment.
Generate fully-typed TypeScript, Python, and Go clients straight from your DRF OpenAPI schema β no hand-written API code, no drift between backend and frontend.
python manage.py gen # generate clients from the live OpenAPI schema
python manage.py gen --ts # TypeScript onlyProduction-ready Centrifugo integration - live updates, notifications, presence tracking.
Bidirectional streaming with automatic WebSocket bridge - perfect for real-time architectures.
Stripe-first payments app, production-lifted from a live SaaS: one-time checkout with idempotency, signature-verified webhooks with replay, refunds, reconciliation, and an in-memory fake provider for tests. Host couplings are config seams (owner model, fulfillment hook) β plug in your own billing objects.
from django_cfg import DjangoConfig, PaymentsConfig
class MyConfig(DjangoConfig):
payments = PaymentsConfig(
fulfillment_hook="apps.orders.hooks.activate_order",
)pip install 'django-cfg[payments]' # adds the Stripe SDKFirst Django framework with MCP server - AI assistants can access docs instantly.
User auth β’ Support tickets β’ Newsletter β’ CRM β’ AI agents β’ Knowledge base β’ Payments β’ Multi-site
Time saved: 18+ months of development
Backend:
- Django 5.2+ with type-safe config
- PostgreSQL, Redis, Centrifugo
- gRPC server with streaming
- 8 production-ready apps
- Stripe payments engine (checkout, webhooks, refunds)
- AI agent framework
- REST API with auto TypeScript generation
Admin:
- Django Unfold for CRUD
- JWT authentication
- Dark theme by default
- Constance-backed dynamic settings
DevOps:
- Docker Compose setup
- Traefik reverse proxy
- Production-ready configs
- Cloudflare integration
AI Features:
- MCP server for AI assistants
- Pydantic AI integration
- Vector DB (ChromaDB)
- RAG support
- Getting Started - Quick setup guide
- Configuration - Type-safe config
- API Generation - Typed TS/Python/Go clients
- Real-Time - WebSockets setup
- gRPC - Microservices
- AI Agents - Automation
- Built-in Apps - 8 enterprise apps
- π djangocfg.com - Official website
- π― Live Demo - See it in action
- π GitHub - Source code
- π¬ Discussions - Get help
- π¦ PyPI - Package repository
MIT License - Free for commercial use
Django-CFG - Modern Django framework with type-safe configuration, AI-native docs, typed API client generation, gRPC streaming, real-time WebSockets, and 8 production-ready apps.
Made with β€οΈ for the Django community
Get Started β’ Live Demo β’ GitHub
