EDE Framework¶
Enterprise Domain Enabler — a Domain-Driven Design ERP platform kernel for Python enterprise systems. Build pluggable business domains (Logistics, CRM, HR, Finance, Procurement…) on top of one shared platform: cross-cutting masters, command/event bus, multi-tenant persistence, declarative views, lifecycle hooks, RBAC, and a React web client — all wired together by an explicit module registry, never by auto-discovery.
Where to start¶
-
New here?
Install the framework, boot the server, and build your first module in under an hour.
-
Designing a feature?
Read the architecture: five-layer model, command/event flow, ORM, tenancy, presentation DSL.
-
Looking up an engine?
Browse the built-in foundation features: auth, approval, workflow, dataset, dashboard, storage, gateway, and more.
What EDE is¶
EDE is the platform on which multiple business domains are enabled as pluggable modules. Two layers, one strict dependency direction:
┌─────────────────────────────────────────────────────────────┐
│ DOMAIN LAYER (src/domains/) │
│ logistics.*, crm.*, hr.*, finance.*, procurement.* │
│ Domain-specific models, business logic, workflows │
│ CAN reference foundation.base — CANNOT reference each other│
└────────────────────┬────────────────────────────────────────┘
│ depends on
┌────────────────────▼────────────────────────────────────────┐
│ PLATFORM LAYER (src/ede/foundation/) │
│ res.*, ir.*, foundation.* │
│ Cross-cutting masters, shared engines, platform services │
│ CANNOT reference any domain package │
└─────────────────────────────────────────────────────────────┘
Domains depend on the platform. The platform never depends on a domain. Domains never depend on each other — if two domains need the same concept, it belongs in the platform.
Architecture at a glance¶
EDE separates a request into five layers, each replaceable without touching the others:
- Experience & Access — FastAPI HTTP adapter, route controllers, middleware (JWT, tenancy resolution, web-push SSE).
- Application — synchronous
CommandBusdispatches typedCommandobjects to model handlers; emitsEvents downstream. - Domain —
DomainModelsubclasses with declarative kernel fields,@api.on_command/@api.on_event/@api.on_hookhandlers. - Platform Capability — persistence, eventing, tenancy, presentation, RBAC — all contract-driven (swap SQLAlchemy for another store without touching domain code).
- Infrastructure Adapters — concrete implementations: FastAPI, SQLAlchemy, Kafka, Redis, Traefik.
Why EDE¶
- Dependencies flow downward only — Domain never imports from HTTP or Persistence.
- Explicit activation — no auto-discovery; every app must be listed in
ACTIVE_MODULES/ACTIVE_DOMAINS. - Protocol-driven infrastructure — persistence, events, and auth are contracts, not implementations.
- Immutable
Envpropagation — per-request context is a shallow clone of the base Env; no global mutable state. - Per-tenant isolation — each tenant has its own database; no shared state between tenants.
- Command → Event flow — mutations are synchronous commands; notifications are asynchronous events with retry.
- Registry as single source of truth — all models, commands, events, and providers are indexed at boot; nothing discovered at runtime.
Quick install¶
# 1. Obtain a copy of the framework source.
cd ede-framework
pip install -e ".[dev]"
cp ede.conf.example ede.conf
ede migrate upgrade -t system
ede serve --with-worker
Open http://localhost:8000 — the React web client boots against the in-process server.
Full walk-through with explanations: Installation tutorial.
Pick your reading order¶
| You are… | Start with |
|---|---|
| New developer onboarding to the platform | Tutorial: Getting Started → Your First Module |
| Adding a new domain or feature | Developer Guide → App Structure & Loading |
| Investigating the request path | Architecture: Overview → Command & Event Bus → HTTP Layer |
| Wiring permissions or record rules | Permissions → Record Rules → Security & Authorization |
| Writing a foundation engine | Foundation Apps → browse the Features section |
| Building the UI / presentation | Presentation DSL → Features: Presentation |