Turn any Mendix application into a comprehensive Developer Handbook β automatically.
A new developer joins your 3-year-old Mendix project on Monday. By Monday afternoon, they have a 50-page technical handbook covering every entity, microflow, integration, and security rule β auto-generated, AI-enriched, zero tribal knowledge required.
When developers join an existing Mendix project, they face weeks of painful onboarding:
- No documentation exists β or it's 18 months out of date.
- Domain models with 100+ entities and nested associations are impossible to grasp from Studio Pro alone.
- Microflows contain deeply nested business logic that nobody has ever written down.
- Security rules, role hierarchies, and module dependencies are pure tribal knowledge locked in one person's head.
Existing tools like MxDocGen produce static dumps β raw lists of entities and microflow names. They tell you what exists, but never why it exists.
MxAutoDoc goes beyond static dumps to produce intelligent narratives. By combining the Mendix Model SDK (to extract the raw AST) with a Large Language Model (to synthesize human-readable explanations), it explains the business purpose behind every microflow β not just its action list.
| Raw Model SDK Data | MxAutoDoc AI-Generated Output |
|---|---|
Type: RetrieveAction Β· Source: Database Β· Entity: Sales.Order Β· XPath: [Status = 'New'] |
Step 1: The system retrieves all Orders with a status of 'New' from the database. This ensures only unprocessed items are validated. |
Type: ExclusiveSplit Β· Expression: $Order/Total > 1000 |
Decision Point: A check is performed on the Order Total. If it exceeds $1,000, the flow triggers the 'Manager Approval' sub-flow. |
Type: MicroflowCallAction Β· Called: ACT_SendNotification |
Step 3: A notification microflow is invoked to alert the operations team via email that a high-value order requires review. |
Type: CommitAction Β· Entity: Sales.Order |
Step 4: The Order object is committed to the database, persisting all status changes made during this workflow. |
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β USER INPUT β
β Mendix App ID + PAT Token β
ββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββββββββ
β
ββββββββββββββΌββββββββββββββ
β LAYER 1: THE CONNECTOR β
β (Mendix Platform SDK) β
β β
β β’ Authenticate via PAT β
β β’ getApp(appId) β
β β’ createTemporary β
β WorkingCopy("main") β
β β’ openModel() β
ββββββββββββββ¬ββββββββββββββ
β
ββββββββββββββΌββββββββββββββ
β LAYER 2: THE AST PARSER β
β (Mendix Model SDK) β
β β
β β’ allDomainModels() β
β β’ allMicroflows() β
β β’ allPages() β
β β’ allEnumerations() β
β β’ allConstants() β
β β
β Deep .load() traversal β
β β Structured JSON IR β
ββββββββββββββ¬ββββββββββββββ
β
ββββββββββββββΌββββββββββββββ
β LAYER 3: AI SYNTHESIS β
β (Claude / OpenAI API) β
β β
β Persona: "Senior Mendix β
β Architect" β
β β
β β’ Business logic summaryβ
β β’ Pattern classification β
β β’ Anti-pattern detection β
β β’ Plain-English flow β
ββββββββββββββ¬ββββββββββββββ
β
ββββββββββββββΌββββββββββββββ
β LAYER 4: THE PUBLISHER β
β (Markdown / PDF / HTML) β
β β
β β’ Developer Handbook β
β β’ ERD diagrams (Mermaid)β
β β’ Security Matrix β
β β’ Microflow Catalog β
ββββββββββββββββββββββββββββ
You provide your Mendix App ID and a Personal Access Token (PAT). The tool uses mendixplatformsdk to create a temporary online working copy. No .mpr file download is needed β the model is opened in-memory via the Mendix cloud.
const client = new MendixPlatformClient();
const app = client.getApp("YOUR_APP_ID");
const workingCopy = await app.createTemporaryWorkingCopy("main");
const model = await workingCopy.openModel();Using the Mendix Model SDK's model.allXXX() functions, the tool traverses every metamodel element and serializes it into a structured Intermediate Representation (IR):
| SDK Function | What It Extracts |
|---|---|
model.allDomainModels() |
Entities, attributes, types, associations, validations, indexes |
model.allMicroflows() |
Full action chain: Retrieves, Creates, Splits, Commits, REST calls, loops |
model.allPages() |
Page layouts, widget trees, data views, data sources |
model.allModules() |
Module inventory, Marketplace module flags, dependencies |
model.allEnumerations() |
All enums with their values |
model.allConstants() |
App-wide and module-level constants |
Each element is fully loaded (via .load()) to access deep properties like XPath constraints, exclusive split expressions, and loop iterator variables.
For each extracted microflow, the raw action chain is serialized and sent to an LLM with a "Senior Mendix Architect" persona prompt:
You are a Senior Mendix Architect with 10+ years of experience.
Given this microflow's action chain (in JSON), explain:
1. The business process it implements β in plain English for a junior developer.
2. Classify it: CRUD | Validation | Integration | Scheduled | Navigation | Utility
3. Flag concerns: missing error handlers, uncommitted objects, retrieve-in-loop anti-patterns.
The IR + AI narratives are compiled into a structured Developer Handbook containing:
- Table of Contents with module-level navigation
- Entity-Relationship Diagrams (Mermaid.js auto-generated)
- Microflow Catalog with step-by-step action chains + AI explanations
- Security Matrix (Roles Γ Entities Γ CRUD operations)
- Integration Map (Published/Consumed REST, SOAP, OData)
- Constants & Configuration reference
| Layer | Technology |
|---|---|
| Runtime | Node.js / TypeScript |
| Connector | mendixplatformsdk |
| AST Parser | mendixmodelsdk |
| AI Synthesis | Anthropic Claude API / OpenAI API |
| Publisher | Markdown β PDF via md-to-pdf |
| CLI | commander.js |
# Clone the repository
git clone https://github.com/telltoamit/mendix-app-documenter.git
cd mendix-app-documenter
# Install dependencies
npm install
# Set environment variables
export MENDIX_TOKEN=your_personal_access_token
export ANTHROPIC_API_KEY=your_claude_api_key # optional, for AI layer
# Generate documentation
npx ts-node src/index.ts --appId "your-app-id" --branch main --ai --output ./outputmxautodoc --appId <APP_ID> [options]
Options:
--branch <branch> Git branch to analyze (default: "main")
--output <dir> Output directory (default: "./output")
--modules <names> Comma-separated module filter
--skip-marketplace Exclude Marketplace modules
--ai Enable AI-powered narratives (requires API key)
--format <type> Output format: "md" | "pdf" (default: "md")
--verbose Show extraction progress
output/
βββ developer-handbook.md # The full Developer Handbook
βββ domain-models/
β βββ OrderManagement.md # Per-module ERD + entity docs
β βββ Administration.md
βββ microflows/
β βββ OrderManagement.md # Per-module microflow catalog with AI narratives
β βββ Administration.md
βββ security-matrix.md # Role-based access audit
- Domain Model extraction (entities, attributes, associations)
- Microflow AST extraction (parameters, actions, XPath, splits, loops)
- AI Synthesis layer with Senior Architect persona
- Markdown Developer Handbook generation
- Mermaid.js ER diagram auto-generation
- Page structure extraction (layouts, widgets)
- Integration map (REST/SOAP/OData)
- PDF export with branded template
- Docusaurus static site generation
- VS Code extension for inline docs
No tool in the Mendix Marketplace or open-source ecosystem does this. Existing documentation generators produce static dumps β raw lists of entity names and microflow titles. MxAutoDoc produces intelligent narratives that explain why a microflow exists, classify its pattern, and flag anti-patterns like retrieve-in-loop or missing error handlers. It bridges the gap between low-code velocity and enterprise documentation standards.
Built by Amit Kumar β Senior Software Engineer specializing in distributed systems and AI automation.