Skip to content

Customize your view

Choose what you want to see and adjust the look, motion, or sound. Changes apply as you go.

class Ansh(DocType):

audience =
theme =
motion =
sound =
sections =
# locked

Read only for guests.

Your choices are remembered in this browser.

All work

(01) work

Build once. Scale forever.

What it is

Framework M is an open-source Python framework for building multi-tenant enterprise applications. You describe your data as DocTypes, and the framework generates the REST API, validation, role-based permissions, database schema and CRUD UI from that one definition. The M stands for modular, multi-tenant and metadata-driven. It is in beta and released under the Apache 2.0 licence.

The problem it solves

Batteries-included frameworks make the first months fast. The trouble starts later, when an application needs multi-tenancy, enterprise sign-in, or a deployment that spans more than one service. The project calls this the productivity cliff, and its answer is a "zero cliff" architecture: keep the fast start of DocTypes, automatic CRUD, permissions and workflows, but build it on enterprise-grade foundations from day one.

How it is built

The core uses hexagonal architecture, also called ports and adapters. Business logic talks to ports; adapters plug real infrastructure into them. That lets an application start as a modular monolith and split into microservices later without a rewrite.

The core in a hexagon, with ports for Database (PostgreSQL), Storage (Local disk), Identity (SQL auth), Events (Redis Pub/Sub), Cache (Redis).CoreDocTypes, permissions, workflowsDatabasePostgreSQLStorageLocal diskIdentitySQL authEventsRedis Pub/SubCacheRedis
Swap an adapter. The core does not change.
Business logic talks to ports; adapters plug real infrastructure into them. Swapping one is a configuration change, and the same split lets an app start as a modular monolith and become microservices later.
  • Runtime: async Python 3.12+, Litestar, SQLAlchemy 2.0 and Pydantic v2, with PostgreSQL by default.
  • Adapters: events on Redis, NATS, Kafka or RabbitMQ; storage on local disk, S3, MinIO or Azure Blob; identity through SQL auth, JWT, Keycloak, Okta or Azure AD.
  • Desk UI: React, TypeScript and Refine, generated from the DocTypes and updated in real time over WebSockets.
  • Quality: strict typing with mypy, test-driven development, and 19 recorded architecture decisions.

Everyday work happens through the m command:

m new app
m new doctype
m migrate
m dev
m prod

What I built

  • Architected the async, metadata-driven core on hexagonal architecture, so apps can start as a modular monolith and split into microservices without a rewrite.
  • Implemented DocType-driven development with Pydantic: one model definition generates the REST API, validation, role-based permissions, database schema and CRUD UI.
  • Designed pluggable adapters for storage, authentication (OIDC and Keycloak), events (Kafka), caching and multi-tenancy, on a Kubernetes-ready, PostgreSQL-backed async runtime.
  • Enforced strict typing and test-driven development, and shipped the docs, a browser playground and one-click dev environments.

How it compares

What Framework M adds compared with other frameworks
Compared withWhat Framework M adds
Frappe / ERPNextAdds an async runtime, hexagonal architecture, native multi-tenancy, OIDC-ready auth and Kubernetes-native deployment. Built on lessons learned from Frappe.
Django + DRFAdds the DocType abstraction, automatic CRUD, built-in permissions, a workflow engine and multi-tenancy without building them from scratch.
FastAPI / LitestarAdds a business application layer (DocTypes, controllers, permissions, reporting, workflows) on top of an async framework.
OdooFully open source under Apache 2.0, with a modern Python stack and cloud-native architecture.
Low-code platformsFull code ownership, on-premise deployment, no vendor lock-in, and extensible with standard Python.

Source: Framework M README

If you know Frappe

Frappe commands and their Framework M equivalents
FrappeFramework M
bench new-appm new app
bench new-doctypem new doctype
bench migratem migrate
bench startm prod

Outcome and links

test coverage, backend and frontend combined
98.51%
type hints
100%
architecture decision records, all implemented
19
Python
3.12+