Karni
Django + React framework for building with AI coding agents
The story
Overview
Karni is an open-source Django and React framework designed specifically for building applications with AI coding agents. Unlike traditional approaches where agents rewrite boilerplate code in every project, Karni packages common functionality like authentication, admin panels, permissions, REST APIs, and React components as versioned, upgradeable packages. This means your AI agent focuses only on domain-specific logic while Karni handles the repetitive setup work that every web project needs: user models, sign-in, CRUD endpoints, tables, forms, and Docker configuration.
The framework works without any language model integration, functioning equally well for manual development. Karni enforces consistency through AGENTS.md, a single rule set that every coding agent reads, and includes karni check to fail builds when agents hand-write code that Karni already provides. Developers declare models and access rules, and Karni automatically generates the REST API, admin interface, role-based access control, React screens, tests, and demo data.
Karni includes six pre-built recipes (shop, booking, CRM, LMS, marketplace, data-portal) that can be scaffolded with a single command, and provides modular packages for payments, approvals, impersonation, charts, reports, and storage. The framework supports Python 3.12-3.14, Django 5.2 LTS, React 18 with TypeScript, and PostgreSQL by default, with SQLite available for local development.
Key features
Versioned Packages
Common code ships as upgradeable packages (karni, @karni/ui) so fixes reach every project automatically without maintaining separate copies.
One Rule Set
AGENTS.md defines conventions and procedures for all coding agents, eliminating separate instruction sets for different tools.
Automatic API Generation
Declare a model and access rule; Karni generates the REST API, serializers, filters, pagination, search and N+1-free query plans.
Schema-Driven Components
React components read the OpenAPI schema to render ResourceTable, ResourceForm and ResourceDetail with correct columns, inputs and validation.
Build Validation
karni check fails the build when agents hand-write what Karni ships, ensuring consistency and preventing duplicated generated code.
Pre-Built Recipes
Six complete application templates (shop, booking, CRM, LMS, marketplace, data-portal) scaffold a full project with one command.
Use cases
- 1
AI Agent Development
Provide AI coding agents with a consistent framework that prevents them from rewriting boilerplate and focuses them on domain logic.
- 2
Rapid Prototyping
Use recipes to scaffold complete applications in minutes with authentication, admin, and demo data already configured.
- 3
Team Consistency
Ensure all projects follow the same patterns and conventions through shared, versioned packages and a single rule set.
- 4
Boilerplate Elimination
Replace copy-paste boilerplate across projects with upgradeable packages that automatically propagate fixes and improvements.
FAQ
Does Karni require an AI tool or language model?
No. Nothing in Karni calls a language model. Every generator like karni make model is a command you run yourself. It works the same without any AI tool.
How do I start a new project with Karni?
Run karni new with an optional recipe flag (shop, booking, crm, lms, marketplace, data-portal) to scaffold a complete Django + React project with authentication, admin, and demo data.
What databases does Karni support?
PostgreSQL is the default. SQLite works for local development and trying Karni without Docker.
How does karni upgrade work?
karni upgrade moves a project to the next release, applying mechanical code changes and listing any changes that require manual intervention.
What Python and Django versions does Karni support?
Karni runs on Python 3.12 to 3.14 with Django 5.2 LTS and Django REST Framework, React 18 with TypeScript on the frontend.
Tech stack & tags
Feedback & Discussion
Discussion
Sign in to leave a comment or rating.
No comments yet. Be the first.






