mxrb 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (237) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +21 -0
  3. data/README.de-DE.md +108 -0
  4. data/README.md +172 -0
  5. data/README.pt-BR.md +109 -0
  6. data/bin/mxrb +1613 -0
  7. data/docs/README.md +10 -0
  8. data/docs/de-DE/README.md +24 -0
  9. data/docs/de-DE/architectural-patterns.md +26 -0
  10. data/docs/de-DE/architectural-standard.md +48 -0
  11. data/docs/de-DE/architecture.md +76 -0
  12. data/docs/de-DE/compiler.md +162 -0
  13. data/docs/de-DE/conventions.md +19 -0
  14. data/docs/de-DE/design-system.md +52 -0
  15. data/docs/de-DE/entity-dsl.md +53 -0
  16. data/docs/de-DE/native-runtime-quality-report.md +74 -0
  17. data/docs/de-DE/oql-sql.md +211 -0
  18. data/docs/de-DE/platform-api-integration.md +36 -0
  19. data/docs/de-DE/platform-operations.md +243 -0
  20. data/docs/de-DE/project-structure.md +32 -0
  21. data/docs/de-DE/ruby-first-roadmap.md +116 -0
  22. data/docs/de-DE/scaffolds.md +59 -0
  23. data/docs/de-DE/semantic-refactoring.md +56 -0
  24. data/docs/de-DE/team-server.md +33 -0
  25. data/docs/de-DE/validation-matrix.md +64 -0
  26. data/docs/de-DE/vetclinic-acceptance.md +24 -0
  27. data/docs/de-DE/writing.md +138 -0
  28. data/docs/en-US/README.md +24 -0
  29. data/docs/en-US/architectural-patterns.md +151 -0
  30. data/docs/en-US/architectural-standard.md +89 -0
  31. data/docs/en-US/architecture.md +170 -0
  32. data/docs/en-US/compiler.md +157 -0
  33. data/docs/en-US/conventions.md +82 -0
  34. data/docs/en-US/design-system.md +163 -0
  35. data/docs/en-US/entity-dsl.md +53 -0
  36. data/docs/en-US/native-runtime-quality-report.md +73 -0
  37. data/docs/en-US/oql-sql.md +201 -0
  38. data/docs/en-US/platform-api-integration.md +36 -0
  39. data/docs/en-US/platform-operations.md +244 -0
  40. data/docs/en-US/project-structure.md +49 -0
  41. data/docs/en-US/ruby-first-roadmap.md +186 -0
  42. data/docs/en-US/scaffolds.md +57 -0
  43. data/docs/en-US/semantic-refactoring.md +198 -0
  44. data/docs/en-US/team-server.md +32 -0
  45. data/docs/en-US/validation-matrix.md +257 -0
  46. data/docs/en-US/vetclinic-acceptance.md +23 -0
  47. data/docs/en-US/writing.md +655 -0
  48. data/docs/pt-BR/README.md +24 -0
  49. data/docs/pt-BR/architectural-patterns.md +25 -0
  50. data/docs/pt-BR/architectural-standard.md +533 -0
  51. data/docs/pt-BR/architecture.md +300 -0
  52. data/docs/pt-BR/compiler.md +162 -0
  53. data/docs/pt-BR/conventions.md +19 -0
  54. data/docs/pt-BR/design-system.md +65 -0
  55. data/docs/pt-BR/entity-dsl.md +116 -0
  56. data/docs/pt-BR/native-runtime-quality-report.md +73 -0
  57. data/docs/pt-BR/oql-sql.md +208 -0
  58. data/docs/pt-BR/platform-api-integration.md +36 -0
  59. data/docs/pt-BR/platform-operations.md +260 -0
  60. data/docs/pt-BR/project-structure.md +32 -0
  61. data/docs/pt-BR/ruby-first-roadmap.md +239 -0
  62. data/docs/pt-BR/scaffolds.md +104 -0
  63. data/docs/pt-BR/semantic-refactoring.md +55 -0
  64. data/docs/pt-BR/team-server.md +59 -0
  65. data/docs/pt-BR/validation-matrix.md +86 -0
  66. data/docs/pt-BR/vetclinic-acceptance.md +50 -0
  67. data/docs/pt-BR/writing.md +177 -0
  68. data/examples/sudoku_evaluation.rb +14 -0
  69. data/examples/sudoku_functional_test.rb +28 -0
  70. data/lib/mxrb/architecture/graph.rb +124 -0
  71. data/lib/mxrb/architecture/validator.rb +98 -0
  72. data/lib/mxrb/benchmark.rb +33 -0
  73. data/lib/mxrb/compare.rb +390 -0
  74. data/lib/mxrb/compiler/adapter.rb +96 -0
  75. data/lib/mxrb/compiler/artifact_document_compiler.rb +102 -0
  76. data/lib/mxrb/compiler/artifact_materializer.rb +53 -0
  77. data/lib/mxrb/compiler/client_model_materializer.rb +42 -0
  78. data/lib/mxrb/compiler/code_action_document_compiler.rb +64 -0
  79. data/lib/mxrb/compiler/code_action_materializer.rb +35 -0
  80. data/lib/mxrb/compiler/code_action_type_compiler.rb +32 -0
  81. data/lib/mxrb/compiler/combo_box_bundle_compiler.rb +314 -0
  82. data/lib/mxrb/compiler/compatibility_analyzer.rb +169 -0
  83. data/lib/mxrb/compiler/constants_materializer.rb +111 -0
  84. data/lib/mxrb/compiler/data_grid_bundle_compiler.rb +290 -0
  85. data/lib/mxrb/compiler/database_connector_action_compiler.rb +280 -0
  86. data/lib/mxrb/compiler/deployment_asset_copier.rb +60 -0
  87. data/lib/mxrb/compiler/deployment_bootstrapper.rb +208 -0
  88. data/lib/mxrb/compiler/deployment_materializer.rb +43 -0
  89. data/lib/mxrb/compiler/deployment_metadata.rb +64 -0
  90. data/lib/mxrb/compiler/domain_document_compiler.rb +153 -0
  91. data/lib/mxrb/compiler/domain_model_materializer.rb +35 -0
  92. data/lib/mxrb/compiler/domain_security_compiler.rb +82 -0
  93. data/lib/mxrb/compiler/gallery_bundle_compiler.rb +190 -0
  94. data/lib/mxrb/compiler/generic_widget_bundle_compiler.rb +281 -0
  95. data/lib/mxrb/compiler/image_bundle_compiler.rb +216 -0
  96. data/lib/mxrb/compiler/java_proxy_generator.rb +509 -0
  97. data/lib/mxrb/compiler/legacy_data_grid_compiler.rb +267 -0
  98. data/lib/mxrb/compiler/legacy_page_builder.rb +287 -0
  99. data/lib/mxrb/compiler/mda.rb +99 -0
  100. data/lib/mxrb/compiler/microflow_document_compiler.rb +85 -0
  101. data/lib/mxrb/compiler/microflow_materializer.rb +48 -0
  102. data/lib/mxrb/compiler/microflow_node_compiler.rb +250 -0
  103. data/lib/mxrb/compiler/model_package.rb +116 -0
  104. data/lib/mxrb/compiler/model_values.rb +67 -0
  105. data/lib/mxrb/compiler/nanoflow_program_compiler.rb +483 -0
  106. data/lib/mxrb/compiler/navigation_document_compiler.rb +93 -0
  107. data/lib/mxrb/compiler/packager.rb +100 -0
  108. data/lib/mxrb/compiler/page_bundle_builder.rb +56 -0
  109. data/lib/mxrb/compiler/page_bundle_compiler.rb +2004 -0
  110. data/lib/mxrb/compiler/page_document_compiler.rb +77 -0
  111. data/lib/mxrb/compiler/portable_packager.rb +356 -0
  112. data/lib/mxrb/compiler/project_jar_archive.rb +84 -0
  113. data/lib/mxrb/compiler/project_jar_builder.rb +121 -0
  114. data/lib/mxrb/compiler/project_materializer.rb +139 -0
  115. data/lib/mxrb/compiler/project_model_orderer.rb +52 -0
  116. data/lib/mxrb/compiler/runtime_data_types.rb +31 -0
  117. data/lib/mxrb/compiler/runtime_model_schema.rb +90 -0
  118. data/lib/mxrb/compiler/schemas/runtime-10.24.0.73019.json +1052 -0
  119. data/lib/mxrb/compiler/schemas/runtime-11.json +1215 -0
  120. data/lib/mxrb/compiler/schemas/runtime-6.10.8.json +1148 -0
  121. data/lib/mxrb/compiler/schemas/runtime-7.17.0.json +1144 -0
  122. data/lib/mxrb/compiler/schemas/runtime-7.5.0.json +1215 -0
  123. data/lib/mxrb/compiler/schemas/runtime-9.6.1.29396.json +868 -0
  124. data/lib/mxrb/compiler/schemas/system-model-10.24.0.73019.b64 +1135 -0
  125. data/lib/mxrb/compiler/schemas/system-model-11.12.1.b64 +815 -0
  126. data/lib/mxrb/compiler/schemas/system-model-6.10.8.b64 +497 -0
  127. data/lib/mxrb/compiler/schemas/system-model-7.17.0.b64 +519 -0
  128. data/lib/mxrb/compiler/schemas/system-model-7.5.0.b64 +504 -0
  129. data/lib/mxrb/compiler/schemas/system-model-9.6.1.29396.b64 +816 -0
  130. data/lib/mxrb/compiler/security_materializer.rb +104 -0
  131. data/lib/mxrb/compiler/settings_document_compiler.rb +45 -0
  132. data/lib/mxrb/compiler/settings_materializer.rb +25 -0
  133. data/lib/mxrb/compiler/source_model.rb +128 -0
  134. data/lib/mxrb/compiler/system_model_seed.rb +88 -0
  135. data/lib/mxrb/compiler/system_queue_materializer.rb +54 -0
  136. data/lib/mxrb/compiler/system_text_materializer.rb +49 -0
  137. data/lib/mxrb/compiler/translation_materializer.rb +95 -0
  138. data/lib/mxrb/compiler/web_bundle_builder.rb +155 -0
  139. data/lib/mxrb/compiler/web_list_data_source.rb +139 -0
  140. data/lib/mxrb/compiler/web_operation_compiler.rb +614 -0
  141. data/lib/mxrb/compiler/web_shell_materializer.rb +194 -0
  142. data/lib/mxrb/compiler/widget_package_extractor.rb +63 -0
  143. data/lib/mxrb/doctor.rb +116 -0
  144. data/lib/mxrb/dsl/builder.rb +1636 -0
  145. data/lib/mxrb/errors.rb +18 -0
  146. data/lib/mxrb/evaluation.rb +131 -0
  147. data/lib/mxrb/exporter.rb +1716 -0
  148. data/lib/mxrb/frontend/migrator.rb +775 -0
  149. data/lib/mxrb/functional.rb +307 -0
  150. data/lib/mxrb/github/annotator.rb +161 -0
  151. data/lib/mxrb/initializer.rb +257 -0
  152. data/lib/mxrb/integrity/validator.rb +136 -0
  153. data/lib/mxrb/io/bson_codec.rb +145 -0
  154. data/lib/mxrb/io/mpr_file.rb +558 -0
  155. data/lib/mxrb/io/mxunit_codec.rb +42 -0
  156. data/lib/mxrb/marketplace.rb +380 -0
  157. data/lib/mxrb/model/association.rb +98 -0
  158. data/lib/mxrb/model/attribute.rb +100 -0
  159. data/lib/mxrb/model/connector.rb +17 -0
  160. data/lib/mxrb/model/design_materializer.rb +133 -0
  161. data/lib/mxrb/model/design_migration.rb +126 -0
  162. data/lib/mxrb/model/design_system.rb +111 -0
  163. data/lib/mxrb/model/domain_model.rb +51 -0
  164. data/lib/mxrb/model/entity.rb +180 -0
  165. data/lib/mxrb/model/menu.rb +38 -0
  166. data/lib/mxrb/model/microflow.rb +100 -0
  167. data/lib/mxrb/model/module.rb +142 -0
  168. data/lib/mxrb/model/navigation.rb +127 -0
  169. data/lib/mxrb/model/page.rb +410 -0
  170. data/lib/mxrb/model/project.rb +187 -0
  171. data/lib/mxrb/model/unit.rb +48 -0
  172. data/lib/mxrb/module_initializer.rb +75 -0
  173. data/lib/mxrb/official_marketplace/content_api.rb +292 -0
  174. data/lib/mxrb/official_marketplace/dependency_resolver.rb +329 -0
  175. data/lib/mxrb/official_marketplace/lifecycle.rb +367 -0
  176. data/lib/mxrb/official_marketplace/module_package_importer.rb +318 -0
  177. data/lib/mxrb/official_marketplace/widget_package_installer.rb +414 -0
  178. data/lib/mxrb/official_marketplace.rb +720 -0
  179. data/lib/mxrb/oql/analyzer.rb +155 -0
  180. data/lib/mxrb/oql/index_advisor.rb +85 -0
  181. data/lib/mxrb/oql/plan_analyzer.rb +185 -0
  182. data/lib/mxrb/oql/server.rb +132 -0
  183. data/lib/mxrb/oql/sql_server_plan_analyzer.rb +190 -0
  184. data/lib/mxrb/oql/sql_server_workload_analyzer.rb +80 -0
  185. data/lib/mxrb/oql/workload_analyzer.rb +175 -0
  186. data/lib/mxrb/oql/workload_baseline.rb +60 -0
  187. data/lib/mxrb/oql.rb +424 -0
  188. data/lib/mxrb/project_lifecycle.rb +76 -0
  189. data/lib/mxrb/protocols/plan.rb +86 -0
  190. data/lib/mxrb/protocols.rb +123 -0
  191. data/lib/mxrb/runtime/database_workspace.rb +677 -0
  192. data/lib/mxrb/runtime/docker_executor.rb +41 -0
  193. data/lib/mxrb/runtime/docker_workspace.rb +29 -0
  194. data/lib/mxrb/runtime/executor.rb +169 -0
  195. data/lib/mxrb/runtime/java_locator.rb +26 -0
  196. data/lib/mxrb/runtime/native.rb +474 -0
  197. data/lib/mxrb/runtime/sql_server_database.rb +146 -0
  198. data/lib/mxrb/runtime/toolchain.rb +82 -0
  199. data/lib/mxrb/scaffold/cli.rb +113 -0
  200. data/lib/mxrb/scaffold/generator.rb +246 -0
  201. data/lib/mxrb/scaffold/help.rb +80 -0
  202. data/lib/mxrb/scaffold/page_templates.rb +54 -0
  203. data/lib/mxrb/scaffold/recipes.rb +198 -0
  204. data/lib/mxrb/scaffold/registry.rb +82 -0
  205. data/lib/mxrb/scaffold/templates.rb +723 -0
  206. data/lib/mxrb/scaffold/transaction.rb +84 -0
  207. data/lib/mxrb/schema/tables.rb +55 -0
  208. data/lib/mxrb/semantic/analyzer.rb +473 -0
  209. data/lib/mxrb/semantic/batch_plan.rb +68 -0
  210. data/lib/mxrb/semantic/domain_mutator.rb +419 -0
  211. data/lib/mxrb/semantic/embedder.rb +51 -0
  212. data/lib/mxrb/semantic/extractor.rb +290 -0
  213. data/lib/mxrb/semantic/index.rb +623 -0
  214. data/lib/mxrb/semantic/inliner.rb +216 -0
  215. data/lib/mxrb/semantic/mover.rb +153 -0
  216. data/lib/mxrb/semantic/onnx_embedder.rb +34 -0
  217. data/lib/mxrb/semantic/remover.rb +70 -0
  218. data/lib/mxrb/semantic/renamer.rb +211 -0
  219. data/lib/mxrb/semantic/tfidf_embedder.rb +46 -0
  220. data/lib/mxrb/semantic/vec_store.rb +75 -0
  221. data/lib/mxrb/team_server.rb +390 -0
  222. data/lib/mxrb/templates/project/10.24.0.73019.json +32 -0
  223. data/lib/mxrb/templates/project/11.12.1.json +32 -0
  224. data/lib/mxrb/templates/project/6.10.8.json +50 -0
  225. data/lib/mxrb/templates/project/7.17.0.json +50 -0
  226. data/lib/mxrb/templates/project/7.5.0.json +50 -0
  227. data/lib/mxrb/templates/project/9.6.1.29396.json +50 -0
  228. data/lib/mxrb/version.rb +5 -0
  229. data/lib/mxrb/widget_package.rb +338 -0
  230. data/lib/mxrb/widget_synchronizer.rb +31 -0
  231. data/lib/mxrb/writer.rb +3775 -0
  232. data/lib/mxrb.rb +188 -0
  233. data/marketplace/catalog.json +10 -0
  234. data/marketplace/modules/shared-kernel/domain/README.md +4 -0
  235. data/marketplace/modules/shared-kernel/module.rb +5 -0
  236. data/marketplace/modules/shared-kernel/mxrb-module.json +9 -0
  237. metadata +447 -0
@@ -0,0 +1,59 @@
1
+ # Projekt-Scaffolds
2
+
3
+ [Português](../pt-BR/scaffolds.md) · [English](../en-US/scaffolds.md) · **Deutsch**
4
+
5
+ Alle Befehle akzeptieren `--target DIR`, überschreiben keine Dateien und
6
+ verbinden `evaluate`/`evaluate_dir`-Aggregatoren automatisch. Mit
7
+ `mxrb <Befehl> --help` werden Verwendung, Ziel und Optionen angezeigt.
8
+
9
+ Verfügbar sind Projekt/Modul (`init`, `module new`), Domäne (`entity`,
10
+ `enumeration`, `constant`), Anwendung (`use-case`, `validation`, `query`,
11
+ `repository`, `scheduled-event`), Präsentation (`presentation init`, `page`,
12
+ `nanoflow`), Sicherheit, Infrastruktur (`integration`, `published-rest`,
13
+ `consumed-rest`, `java-action`), Prüfung (`functional-test`, `evaluation`),
14
+ Design und GitHub-CI. `mxrb page new Modul.Seite` erzeugt weiterhin eine
15
+ minimale Seite. Mit `--chain` entsteht ein ausführbarer vertikaler Schnitt mit
16
+ Beispielentität, Data-Source-Microflow, editierbarer Seite, Aktionen und
17
+ Responsive-Menüeintrag. Drei echte Mendix-Aktionsketten stehen zur Verfügung:
18
+
19
+ ```sh
20
+ mxrb page new App.Order --chain page:microflow
21
+ mxrb page generate App.Order --chain page:nanoflow
22
+ mxrb page g App.Order --chain page:nanoflow:microflow
23
+ ```
24
+
25
+ `page:microflow` ruft die Runtime direkt auf; `page:nanoflow` hält die Aktion
26
+ auf dem Client; `page:nanoflow:microflow` verwendet den Client-Flow zur
27
+ Orchestrierung eines Runtime-Aufrufs. Alle Modi erzeugen `ACT_LoadOrder` als
28
+ Data Source. Ketten, die mit einem Microflow enden, erzeugen zusätzlich
29
+ `ACT_RefreshOrder`. `page generate` und `page g` sind Aliase von `page new`.
30
+ Jede erzeugte Kette wird als gültiges MPR materialisiert und durch den
31
+ Compiler-Preflight geprüft.
32
+
33
+ ## Seitenvorlagen
34
+
35
+ In Mendix sind Page Templates Ausgangspunkte, deren Struktur zu einer normalen,
36
+ editierbaren Seite wird. MXRB listet nur durch Compiler und Runtime auditierte
37
+ Muster:
38
+
39
+ ```sh
40
+ mxrb page templates
41
+ mxrb page templates --json
42
+ mxrb page new App.Landing --template starter
43
+ mxrb page new App.Empty --template blank
44
+ mxrb page new App.Operations --template dashboard
45
+ mxrb page new App.Order_NewEdit --template form-vertical
46
+ ```
47
+
48
+ `form-vertical` erzeugt zusätzlich eine Beispielentität und eine
49
+ `ACT_Load...`-DataView-Quelle. Jede Vorlage lässt sich mit `--chain`
50
+ kombinieren; `--template dashboard --chain page:nanoflow` ergänzt zum Beispiel
51
+ eine Client-Aktion. Diese Namen sind stabile, von Mendix-Mustern inspirierte
52
+ MXRB-Verträge; sie behaupten nicht, alle installierten Atlas- oder Marketplace-
53
+ Vorlagen still zu importieren. Siehe die [offizielle Seitendokumentation](https://docs.mendix.com/refguide/pages/).
54
+
55
+ Artefaktbefehle verwenden `new Modul.Name`; Projektbefehle verwenden
56
+ `design init` und `ci init github`. Alle unterstützten Entitätstypen und
57
+ Assoziationen stehen in der [Entitäten-DSL](entity-dsl.md). Published REST und
58
+ Java Action erzeugen editierbare Ruby-Adapter; das native Dokument bzw. die
59
+ Aktion muss weiterhin aus einem exportierten Baseline oder Studio Pro stammen.
@@ -0,0 +1,56 @@
1
+ # Semantisches Refactoring
2
+
3
+ [Português](../pt-BR/semantic-refactoring.md) · [English](../en-US/semantic-refactoring.md) · **Deutsch**
4
+
5
+ Der semantische Index kombiniert typisierte Artefakte und BSON-Referenzen.
6
+ `Project.Navigation` nimmt an Auswirkungsanalyse, Rename und Löschschutz teil.
7
+
8
+ ```ruby
9
+ Mxrb.open("Shop.mpr", readonly: false) do |project|
10
+ plan = project.plan_rename("Sales.Home", to: "Landing")
11
+ plan.changes.each { puts _1.inspect }
12
+ plan.apply!
13
+ end
14
+ ```
15
+
16
+ Jedes Refactoring folgt Plan, Vorschau und `apply!`. Rename aktualisiert BSON
17
+ und `_MxrbArchitecture` in derselben Transaktion. Remove blockiert Referenzen
18
+ und Kind-Units; Move, Extract, Inline und Domänenmutationen zeigen Änderungen
19
+ vor dem Schreiben.
20
+
21
+ Der Analyzer findet fehlende Ziele, Profile ohne Startziel, doppelte Namen,
22
+ unbekannte Benutzerrollen, Ziele ohne Zugriff, nicht aufgelöste Tokens und
23
+ unzureichenden Kontrast. Der semantische Cache nutzt Unit-Fingerprints;
24
+ `mxrb cache status`, `warm` und `clear` liefern Metriken und Wartung.
25
+
26
+ `project.semantic_search_artifacts("Bestellung erstellen", limit: 5)` bietet
27
+ deterministisches Ranking in Ruby. Das optionale Gem `sqlite-vec` beschleunigt
28
+ die Suche in schreibbaren MPRs mit einem KNN-Index aus Backend, Dimension und
29
+ Modell-Fingerprint. Der erste Aufruf füllt die Vektoren, bevor der Index als
30
+ bereit markiert wird; schreibgeschützte Projekte und Plattformen ohne native
31
+ Erweiterung behalten dieselbe In-Memory-API. Der bisherige CLI-Adapter lautet
32
+ `mxrb find app.mpr "Bestellung erstellen" --semantic`. Der eigene Befehl
33
+ stellt zusätzlich Backend, Ergebnislimit und Kosinusdistanz bereit:
34
+
35
+ ```sh
36
+ bundle exec mxrb search "Zahlung" App.mpr
37
+ bundle exec mxrb search "Bestellung erstellen" App.mpr --backend onnx --limit 5
38
+ ```
39
+
40
+ Die Tabelle enthält Rang, Distanz, qualifizierten Namen und Typ; `--json`
41
+ liefert dieselben Felder für Automatisierung.
42
+
43
+ Für lokale ONNX-Entwicklung aktiviert `BUNDLE_WITH=onnx bundle install` die
44
+ optionale Gruppe. `backend: :onnx` und das automatische Backend verwenden dann
45
+ die dokumentierte Informers-`embedding`-Pipeline mit
46
+ `sentence-transformers/all-MiniLM-L6-v2`. Ein eigener CI-Job setzt
47
+ `MXRB_ONNX=1` und führt einen echten Smoke-Test mit 384 Dimensionen aus; die
48
+ normale Installation und Testsuite laden das Modell nicht herunter.
49
+
50
+ Der native sqlite-vec-Smoke-Test verwendet eine eigene Abhängigkeitsdatei für
51
+ unterstützte Plattformen: `BUNDLE_GEMFILE=Gemfile.sqlite-vec bundle install`
52
+ und danach `MXRB_SQLITE_VEC=1 BUNDLE_GEMFILE=Gemfile.sqlite-vec bundle exec
53
+ rspec spec/semantic_search_spec.rb`. So bleibt das Haupt-Lockfile portabel,
54
+ während CI die echte Erweiterung prüft.
55
+
56
+ [Zurück zum Index](README.md)
@@ -0,0 +1,33 @@
1
+ # Team Server
2
+
3
+ MXRB verbindet sich ohne `mx`, Studio Pro oder Model SDK direkt mit offiziellen
4
+ Team-Server-Git-Repositories und der App Repository API:
5
+
6
+ ```sh
7
+ mxrb team-server login --pat-file /secure/team-server.env
8
+ mxrb team-server projects --pat-file /secure/team-server.env
9
+ mxrb team-server clone APP_ID ./app
10
+ mxrb team-server branches APP_ID
11
+ mxrb team-server pull ./app
12
+ ```
13
+
14
+ `projects` paginiert die offizielle Projects API und liefert alle Projekte des
15
+ Unternehmens. Anmeldedaten bleiben auf denselben HTTPS-Host begrenzt; ein vom
16
+ Dienst gemeldeter HTTP-Redirect wird nur für genau denselben HSTS-Host auf HTTPS
17
+ angehoben.
18
+
19
+ Im empfohlenen Modus wird nur der absolute Pfad zur PAT-Datei gespeichert.
20
+ Unterstützt werden Klartext, JSON und `.env` mit `MXRB_TEAM_SERVER_PAT`. Der PAT
21
+ wird nur für Anfragen gelesen und Git über einen temporären `GIT_ASKPASS`-Helfer
22
+ übergeben; er erscheint nie in URLs, Argumenten oder `.git/config`.
23
+
24
+ Lesen benötigt `mx:modelrepository:repo:read`, Push zusätzlich
25
+ `mx:modelrepository:repo:write`. Laut Mendix erhalten externe Klone nicht die
26
+ gesamte Studio-Pro-Nachbearbeitung und Revisionsmetadaten. MXRB validiert
27
+ MPR-Dateien nach Clone und Pull, kann aber keine Mendix-Cloud-Revisionsmetadaten
28
+ erzeugen.
29
+
30
+ Das Repository `a9e4af8a-2776-4b10-a471-8c42df8f5f43` wurde über die App
31
+ Repository API abgefragt und per HTTPS geklont. MXRB validierte
32
+ `MyFirstModule.mpr`, erkannte `main` und bestätigte eine Remote-URL ohne PAT.
33
+ Die temporäre Zugangsdaten-Datei wurde anschließend zerstört.
@@ -0,0 +1,64 @@
1
+ # MXRB-Validierungsmatrix
2
+
3
+ [Português](../pt-BR/validation-matrix.md) · [English](../en-US/validation-matrix.md) · **Deutsch**
4
+
5
+ Stand: 5. August 2026.
6
+
7
+ ```text
8
+ Original-MPR → validate → export → generate → validate → compare
9
+ ```
10
+
11
+ | Projekt | Mendix | Format | Ergebnis |
12
+ |---|---:|---|---|
13
+ | QueryApiBlogPost | 7.17.0-rc5 | v1 | bestanden |
14
+ | Sudoku | 11.12.1 | v2 | bestanden; 409 `.mxunit` |
15
+ | MendixApp | 9.6.1 | v1 | bestanden |
16
+ | ConnectorKitDemo | 7.5.0 | v1 | bestanden |
17
+ | TreeviewDemo | 5.21.4 | v1 | bestanden |
18
+ | GridViewPlayground | 6.10.8 | v1 | bestanden |
19
+
20
+ ## Tiefe Abdeckung
21
+
22
+ Der Vergleich umfasst Metadaten, Security, Unit-Baum, Entitäten,
23
+ Zugriffsregeln, Beziehungen, Seiten, Widgets, Events, Menüs und vollständige
24
+ Microflow-/Nanoflow-Körper. 264 Flow-Körper und 1.304 Seitenknoten aus 25 Typen
25
+ sind als bearbeitbares Ruby repräsentiert. Jede native Unit besitzt zusätzlich
26
+ einen vollständigen bearbeitbaren Eintrag in `.mxrb/native_units.rb`.
27
+
28
+ ## Offizielle Gates
29
+
30
+ Sudoku 11.12.1: **0 Fehler** in `mx check`, identische 23 Warnungen,
31
+ 1 Deprecation und 6 Empfehlungen; MxBuild erfolgreich. Mendix 6.10 baute
32
+ Original und Rekonstruktion erfolgreich. 7.x und 9.6 zeigten diagnostische
33
+ Parität. Die exakte 5.21-Prüfung bleibt wegen WPF auf Windows/Studio Pro eine
34
+ ausdrückliche MXRB-Einschränkung und gehört nicht zum direkten automatischen
35
+ Gate.
36
+
37
+ ## Semantik, Tests und Runtime
38
+
39
+ - 1.778 Artefakte und 3.387 Referenzen;
40
+ - 1.039 Beispiele, keine Fehler;
41
+ - 100 % Zeilenabdeckung (17.224/17.224);
42
+ - 100 % Branch-Abdeckung (6.811/6.811);
43
+ - Sudoku-Modellbewertung: 7/7;
44
+ - funktionale Runtime-Tests: 3/3 lokal und 3/3 in Docker.
45
+
46
+ Ruby-Assertions prüfen Rückgabewerte und persistierte XPath-Anzahlen. Der
47
+ Docker-Lauf bestätigte Games 1/2/3 und Cells 81/162/243; JUnit XML ist nur ein
48
+ in Ruby erzeugtes CI-Format.
49
+
50
+ Das 11.12.1-Gate enthält nun zusätzlich ein authentifiziertes Chromium-Szenario
51
+ mit Login, Home-/Orders-Navigation, deterministischen DOM/Layout/Style/ARIA-
52
+ Snapshots, Screenshots, explizitem SHA-256-Baseline-Vergleich, Fehlererkennung
53
+ und echtem Logout. Alle drei `page --chain`-Pfade werden als gültiges MPR
54
+ materialisiert und durch den Compiler-Preflight geprüft. Die mit
55
+ `page --template` erzeugten Dashboard- und vertikalen Formularseiten wurden
56
+ zusätzlich in der Runtime mit geprüftem berechnetem CSS ausgeführt.
57
+
58
+ `script/validate_matrix` prüfte 1.506 Units in sechs Round-Trips in 14,760 s.
59
+ `script/benchmark` maß 6,8463 s für die vollständige Sudoku-Pipeline.
60
+ Deterministisches Fuzzing deckt 250 BSON-Dokumente und 50 atomare
61
+ `.mxunit`-Dateien einschließlich Binärwerten ab.
62
+
63
+ Die Matrix beweist die geprüften Szenarien, nicht universelle Kompatibilität
64
+ mit jedem Mendix-Metamodell. Unbekannte `.mxunit`-Kodierungen werden abgelehnt.
@@ -0,0 +1,24 @@
1
+ # VetClinic-End-to-End-Abnahme
2
+
3
+ Das Abnahmeprojekt wurde gelöscht, mit `mxrb init` neu erstellt und durchlief
4
+ vor den Geschäftsregeln jeden Scaffold. Das Mendix-11.12.1-MPR bestand
5
+ MXRB-Validierung und Lint, Architekturauswertung, offizielles `mx check`,
6
+ `mxbuild` sowie einen Funktionstest im synchronisierten Runtime.
7
+
8
+ Die Regression bestand 622 Beispiele mit 100 % Zeilen- und Branch-Abdeckung;
9
+ RuboCop meldete keine Verstöße. Das Modell enthält Enumerationen, sechs
10
+ Geschäftsentitäten, `System.User`-Generalisierung, Systemmitglieder,
11
+ Zugriffsregeln, Indizes, N:1-, N:N- und 1:1-Beziehungen, Flows, Seite,
12
+ Navigation und Scheduled Event.
13
+
14
+ Scaffolds liefern Struktur, nicht die Geschäftsanforderungen. Attribute,
15
+ Flow-Verhalten, Widgets, Rechte, Endpunkte, Tests und Auswertungen bleiben
16
+ Projektarbeit. Beim abgenommenen VetClinic wurde die Navigation in `project.rb`
17
+ ergänzt; `init` erzeugt nun Profil, Layout und Home-Seite minimal, während
18
+ weitere Menüeinträge noch keinen eigenen Befehl haben.
19
+ Published REST, Consumed REST und Java Action erzeugen baubare
20
+ Microflow-Adapter; native Dokumente benötigen weiterhin ein exportiertes
21
+ Baseline-Projekt oder Studio Pro.
22
+
23
+ Ein unabhängiger Leerscaffold bestand ohne manuelle Änderung `mxrb validate`,
24
+ das offizielle `mx check` und MxBuild.
@@ -0,0 +1,138 @@
1
+ # Projekte erstellen und bearbeiten
2
+
3
+ [Português](../pt-BR/writing.md) · [English](../en-US/writing.md) · **Deutsch**
4
+
5
+ `mxrb generate` wertet Ruby aus und erstellt oder aktualisiert ein MPR
6
+ idempotent anhand stabiler Mendix-Namen.
7
+
8
+ Ein leeres Verzeichnis kann direkt initialisiert werden:
9
+
10
+ ```sh
11
+ mxrb init vet_clinic
12
+ cd vet_clinic
13
+ bundle install
14
+ bundle exec mxrb generate project.rb
15
+ bundle exec mxrb validate VetClinic.mpr
16
+ ```
17
+
18
+ `init` akzeptiert snake_case oder PascalCase und erstellt `Gemfile`,
19
+ `project.rb` sowie das Hauptmodul unter `modules/VetClinic`. Das Scaffold
20
+ enthält nur Anwendungscode: `System` ist im Runtime implizit, Administration
21
+ und Atlas sind Marketplace-Module. Bei einem vorhandenen Verzeichnis bricht
22
+ der Befehl ohne Änderungen ab.
23
+
24
+ Ein weiteres Anwendungsmodul wird im Projektstamm so hinzugefügt:
25
+
26
+ ```sh
27
+ mxrb module new appointments
28
+ ```
29
+
30
+ Der Befehl erstellt `modules/Appointments`, verwendet dasselbe Domain- und
31
+ Application-Scaffold und bindet dessen `module.rb` in `project.rb` ein. Wenn
32
+ das Modul bereits existiert oder die Projektdatei nicht sicher aktualisiert
33
+ werden kann, wird der Vorgang atomar abgebrochen. Außerhalb des Projektstamms
34
+ kann `--target DIR` verwendet werden.
35
+
36
+ Artefakt-, Präsentations-, Infrastruktur-, Test-, Design- und CI-Generatoren
37
+ sind im [Scaffold-Katalog](scaffolds.md) aufgeführt. Für Entitäten gilt die
38
+ vollständige [Entitäten-DSL](entity-dsl.md).
39
+
40
+ ```ruby
41
+ Mxrb.define("Shop.mpr") do
42
+ mendix_version "11.12.1"
43
+ self.module :Sales do
44
+ entity :Order do
45
+ string :Number, documentation: "Stabile Bestellnummer"
46
+ decimal :Total, default: 0
47
+ end
48
+ end
49
+ end
50
+ ```
51
+
52
+ ```sh
53
+ bundle exec mxrb generate shop.rb
54
+ bundle exec mxrb validate Shop.mpr
55
+ bundle exec mxrb export Shop.mpr exported-shop
56
+ bundle exec mxrb compare original.mpr rebuilt.mpr
57
+ ```
58
+
59
+ ## Modellbewertungen und Funktionstests
60
+
61
+ Bewertungen sind Ruby mit Checks wie `artifact`, `no_call_cycles` und eigenen
62
+ Blöcken. Funktionstests verwenden ebenfalls Ruby:
63
+
64
+ ```ruby
65
+ microflow "erstellt Bestellung",
66
+ call: "Sales.ACT_CreateOrder",
67
+ before: { call: "Sales.TEST_Prepare" },
68
+ after: { call: "Sales.TEST_Cleanup" },
69
+ expect: {
70
+ return: "true",
71
+ count: { entity: "Sales.Order", xpath: "[Status = 'Open']", equals: 1 }
72
+ }
73
+ ```
74
+
75
+ `mxrb test App.mpr functional_test.rb --docker` führt Check, Build und Runtime
76
+ in wegwerfbaren Containern aus. JUnit und MDL sind nicht nötig; das Original-MPR
77
+ wird nie verändert.
78
+ `--json ergebnis.json` und `--junit ergebnis.xml` erzeugen CI-Berichte. JUnit
79
+ ist hier nur das XML-Austauschformat; MXRB schreibt es direkt in Ruby und
80
+ installiert oder startet kein Java-JUnit-Framework.
81
+
82
+ ## Native Baseline
83
+
84
+ Der Export schreibt `.mxrb/native_units.json` als verlustfreie Baseline und
85
+ `.mxrb/native_units.rb` mit jedem BSON-Payload als bearbeitbaren Ruby-Hash.
86
+ `native_unit`, `deep_structure` und `bson_binary` machen auch Bilder,
87
+ Konstanten, Datensätze, Dienste, Einstellungen, Vorlagen und neue Mendix-Typen
88
+ direkt bearbeitbar. Ruby-Änderungen überlagern die Baseline vor den typisierten
89
+ Writes. `body_fingerprint` verwendet unveränderte native Graphen exakt wieder
90
+ und regeneriert sie nach Ruby-Änderungen.
91
+
92
+ ## Ruby-Modul-Marketplace
93
+
94
+ ```sh
95
+ mxrb module search
96
+ mxrb module search security
97
+ mxrb module add shared-kernel
98
+ mxrb module add ./lokales-paket --target ./exportiertes-projekt
99
+ ```
100
+
101
+ JSON-Kataloge kommen aus der Gem, von einem lokalen Pfad oder über HTTPS mit
102
+ `--registry`. Pakete besitzen `mxrb-module.json` und können eingebaut, lokal
103
+ oder Git-basiert sein. Die Installation nutzt Staging, lehnt unsichere Pfade ab
104
+ und schreibt Version, Quelle, Ref und SHA-256 nach
105
+ `.mxrb/modules.lock.json`.
106
+
107
+ ## Seiten, Navigation, Security und MPR v2
108
+
109
+ Core-Widgets haben kompakte Methoden, einschließlich `text_area` und Widgets
110
+ innerhalb einer `tab_page`. Sie verwenden das moderne Forms-Modell von Mendix
111
+ 11. `data_grid` erzeugt Data Grid 2; `drop_down` und `reference_selector`
112
+ erzeugen Combo Box Widgets.
113
+
114
+ Pluggable Widgets benötigen ihre `.mpk`-Pakete im Projektverzeichnis
115
+ `widgets/`. Danach synchronisiert
116
+ `bundle exec mxrb widgets sync project.rb MeineApp.mpr` das versionsabhängige
117
+ Schema und wendet die Ruby-Eigenschaften an. Weitere MPKs lassen sich mit
118
+ `pluggable_widget` deklarieren. Unbekannte importierte Widgets bleiben als
119
+ `native_widget` mit editierbarer `deep_structure` vollständig erhalten.
120
+ Importierte Seiten bieten ebenfalls `deep_structure({...})`. Menüs und
121
+ Security sind bearbeitbar. Bei MPR v2 erzeugt MXRB automatisch
122
+ `mprcontents/*.mxunit`.
123
+
124
+ ## Semantische Werkzeuge
125
+
126
+ CLI-Befehle: `refs`, `callers`, `callees`, `impact`, `rename`, `remove`,
127
+ `move`, `lint`, `report`, `diff`, `find`, `describe` und `tree`. Das eingebaute
128
+ Lint prüft Zugriffsregeln persistenter Entitäten, Rollen von Seiten/Flows,
129
+ Dokumentation öffentlicher Verträge, Navigationsziele und doppelte
130
+ Modulrollenzuordnungen. `mxrb cache status|warm|clear app.mpr` liefert
131
+ Cache-Metriken und Wartung.
132
+ Refactorings schreiben erst mit `--apply`; Verschiebungen bleiben im selben
133
+ Modul und verhindern Ordnerzyklen.
134
+
135
+ Bei `readonly: false` speichert der erste Aufbau einen kompakten,
136
+ fingerprint-basierten semantischen Index im MPR. Spätere Öffnungen verwenden
137
+ ihn nur, solange Inhalte und Containment unverändert sind. Schreibgeschützte
138
+ Projekte können einen vorhandenen Cache lesen, erstellen ihn aber nicht.
@@ -0,0 +1,24 @@
1
+ # MXRB documentation
2
+
3
+ [Português](../pt-BR/README.md) · **English** · [Deutsch](../de-DE/README.md)
4
+
5
+ - [Project architecture](architecture.md)
6
+ - [Architectural standard](architectural-standard.md)
7
+ - [Project structure](project-structure.md)
8
+ - [Architectural patterns](architectural-patterns.md)
9
+ - [Semantic refactoring](semantic-refactoring.md)
10
+ - [Navigation and design system](design-system.md)
11
+ - [OQL, SQL views, and the local database](oql-sql.md)
12
+ - [Conventions](conventions.md)
13
+ - [Ruby-first roadmap](ruby-first-roadmap.md)
14
+ - [Validation matrix](validation-matrix.md)
15
+ - [Native compiler and Runtime](compiler.md)
16
+ - [Native build and Runtime quality report](native-runtime-quality-report.md)
17
+ - [Writing projects](writing.md)
18
+ - [Project scaffolds](scaffolds.md)
19
+ - [Entity DSL](entity-dsl.md)
20
+ - [Operations, lifecycle, and Marketplace](platform-operations.md)
21
+ - [Mendix API integration assessment](platform-api-integration.md)
22
+ - [VetClinic end-to-end acceptance](vetclinic-acceptance.md)
23
+
24
+ [Back to the project README](../../README.md)
@@ -0,0 +1,151 @@
1
+ # Architectural patterns
2
+
3
+ [Português](../pt-BR/architectural-patterns.md) · **English** · [Deutsch](../de-DE/architectural-patterns.md)
4
+
5
+ This page collects the engineering patterns MXRB applies consistently. They
6
+ explain *why* the public API looks the way it does and what guarantees each
7
+ pattern buys. For the module layout itself, see
8
+ [project structure](project-structure.md).
9
+
10
+ ## 1. Ruby-first, single public interface
11
+
12
+ Ruby is the only public language. Everything MXRB can do is reachable from
13
+ `Mxrb` module functions and the `Project` object they return:
14
+
15
+ ```ruby
16
+ Mxrb.open("Shop.mpr", readonly: false) do |project|
17
+ project.find_artifact("Sales.Order")
18
+ project.plan_rename("Sales.Order", to: "Invoice").apply!
19
+ end
20
+ ```
21
+
22
+ There is no MDL, no parallel query language and no second configuration
23
+ syntax. Project-specific lint rules, evaluations and functional tests are
24
+ ordinary Ruby files too. External Mendix tools (`mx`, MxBuild, the Runtime)
25
+ are optional compatibility gates executed afterwards — never a runtime
26
+ dependency of the Ruby core.
27
+
28
+ ## 2. The CLI is a thin adapter
29
+
30
+ `bin/mxrb` parses arguments, calls the Ruby API and prints results. It holds
31
+ no logic of its own. Every command is a one-line delegation:
32
+
33
+ - `mxrb generate` → `Mxrb.define`
34
+ - `mxrb export` → `Mxrb::Exporter`
35
+ - `mxrb validate` → `Mxrb::Integrity::Validator`
36
+ - `mxrb compare` / `mxrb diff` → `Mxrb.compare`
37
+ - `mxrb rename|remove|move ... [--apply]` → `project.plan_*` (+ `apply!`)
38
+ - `mxrb refs|callers|callees|impact` → the semantic index
39
+ - `mxrb lint` / `mxrb report` → `project.analyze`
40
+ - `mxrb evaluate` → `Evaluation::Suite`
41
+ - `mxrb test` → the functional runtime executor
42
+ - `mxrb module search|add` → the marketplace catalog and installer
43
+
44
+ A consequence: anything shown in this documentation as a CLI command has an
45
+ equivalent, more expressive Ruby form. When in doubt, trust the Ruby API.
46
+
47
+ ## 3. Typed DSLs over a lossless baseline
48
+
49
+ MXRB never discards what it cannot yet express concisely. Export writes two
50
+ baseline files beside the project:
51
+
52
+ - `.mxrb/native_units.json` — the original BSON payloads, lossless.
53
+ - `.mxrb/native_units.rb` — every payload expanded as editable Ruby
54
+ (`native_unit` + `deep_structure` hashes, binary values as `bson_binary`).
55
+
56
+ Generation restores the baseline first, then overlays the typed structures
57
+ that Ruby explicitly owns. Editing the deep Ruby hash overrides the baseline
58
+ before typed writers run. Images, constants, datasets, services, project
59
+ settings, templates and even unit types introduced by future Mendix versions
60
+ therefore survive round trips and stay editable, without waiting for a typed
61
+ abstraction to exist.
62
+
63
+ ## 4. Fingerprint-based flow reuse
64
+
65
+ Every exported flow body carries a canonical `body_fingerprint`:
66
+
67
+ - Body unchanged → the exact native graph is reused byte-for-byte.
68
+ - Body edited → the fingerprint no longer matches and the writer regenerates
69
+ that flow graph.
70
+
71
+ This keeps round trips stable while making edits deterministic: a change in
72
+ Ruby always wins over the stored native form, and untouched flows are never
73
+ accidentally rewritten.
74
+
75
+ ## 5. Plan / preview / apply! for every mutation
76
+
77
+ No semantic operation writes on first contact. Each one builds a plan:
78
+
79
+ ```ruby
80
+ Mxrb.open("app.mpr", readonly: false) do |project|
81
+ plan = project.plan_rename("Sales.Order", to: "Invoice")
82
+ plan.changes.each { puts "#{_1.path.join(".")}: #{_1.before} -> #{_1.after}" }
83
+ plan.apply! # the only line that writes
84
+ end
85
+ ```
86
+
87
+ Guarantees shared by rename, remove, move, extract, inline and domain
88
+ mutation plans:
89
+
90
+ - full preview of changes and affected units before anything is written;
91
+ - validation up front (name rules, collisions, references, child units,
92
+ container legality);
93
+ - `apply!` writes inside an MPR transaction, so a failure mid-apply leaves
94
+ the database unchanged;
95
+ - the semantic index is rebuilt after applying;
96
+ - re-applying an already-applied plan is blocked;
97
+ - the CLI previews by default and only writes with `--apply`.
98
+
99
+ See [semantic refactoring](semantic-refactoring.md) for each operation.
100
+
101
+ ## 6. Atomic `.mxunit` writes (MPR v2)
102
+
103
+ In v2 projects, unit contents live in
104
+ `mprcontents/aa/bb/<uuid>.mxunit`. Writes go to a temporary file in the same
105
+ directory followed by an atomic rename; SQLite keeps `Contents` null and
106
+ stores only the content hash. Readers never observe a half-written payload.
107
+ Non-BSON `.mxunit` encodings are rejected explicitly — MXRB raises rather
108
+ than guessing.
109
+
110
+ ## 7. Transactions and rollback at the storage boundary
111
+
112
+ `apply!` implementations wrap their mutations in the MPR transaction. The
113
+ marketplace installer follows the same philosophy on the file system: it
114
+ installs into a staging directory, moves the previous module to a backup
115
+ location during update, and restores it if the final move fails.
116
+
117
+ ## 8. Marketplace: catalog → staging → lockfile
118
+
119
+ Module installation is deliberately boring and auditable:
120
+
121
+ 1. A JSON catalog (built-in, local path or HTTPS via `--registry`) resolves a
122
+ name to a package source: built-in, local directory or Git repository.
123
+ 2. Files are copied into a staging directory; path traversal outside the
124
+ target is rejected.
125
+ 3. Dependency and Mendix-version requirements from `mxrb-module.json` are
126
+ checked before writing.
127
+ 4. `.mxrb/modules.lock.json` records version, source, ref and a SHA-256
128
+ digest of the installed files.
129
+
130
+ ```sh
131
+ bundle exec mxrb module search security
132
+ bundle exec mxrb module add shared-kernel --target ./my-project
133
+ ```
134
+
135
+ ## 9. Errors are typed and explicit
136
+
137
+ The `Mxrb::Error` hierarchy separates storage problems (`NotMprError`,
138
+ `SchemaError`, `SerializationError`) from usage problems (`ReadOnlyError`,
139
+ `ValidationError`) and from toolchain/marketplace failures. Unknown encodings
140
+ and corrupt structures raise; they are never silently repaired or dropped.
141
+ Preservation of an unknown structure is a compatibility mechanism, not data
142
+ loss — but rejection of an unknown *encoding* is a hard stop, because writing
143
+ back a guess would corrupt the project.
144
+
145
+ ## 10. Coverage as a gate, not a metric
146
+
147
+ CI enforces 100% line and 100% branch coverage through Ruby's native
148
+ `Coverage` API. The local helper defaults to 100/100 when no threshold
149
+ variables are supplied.
150
+ The gate measures every executable library line and branch; comments such as
151
+ `:nocov:` do not remove code from the denominator. See [conventions](conventions.md).
@@ -0,0 +1,89 @@
1
+ # MXRB architectural standard
2
+
3
+ [Português](../pt-BR/architectural-standard.md) · **English** · [Deutsch](../de-DE/architectural-standard.md)
4
+
5
+ ## 1. Central principle
6
+
7
+ Ruby is the canonical representation of architecture. Mendix remains the
8
+ execution platform and native model; MXRB must preserve compatibility without
9
+ forcing platform internals into application code.
10
+
11
+ ## 2. Complete structure
12
+
13
+ Applications are split into app-level security/navigation and modules with
14
+ `domain`, `application`, `presentation`, `infrastructure` and module security.
15
+ Large presentation areas use vertical feature slices.
16
+
17
+ ## 3. Flow mapping
18
+
19
+ - Domain rules express entity-level invariants.
20
+ - Application microflows implement use cases, queries, validations and jobs.
21
+ - Presentation nanoflows implement client interaction.
22
+ - Infrastructure flows implement services, adapters and integrations.
23
+ - Events and callbacks point to these responsibilities instead of defining a
24
+ second architecture.
25
+ - `uses_repository`, `calls`, lifecycle and data-source declarations feed the
26
+ semantic dependency graph.
27
+
28
+ A microflow is classified by responsibility, not by being a microflow.
29
+
30
+ ## 4. Allowed dependencies
31
+
32
+ `presentation` and `infrastructure` may depend on `application`; application
33
+ may depend on domain. Domain does not depend on outer layers. Cross-module
34
+ access should use a declared public API.
35
+
36
+ ## 4.1 Queries, repositories and Mendix persistence
37
+
38
+ Direct Mendix retrieval is appropriate for ordinary CRUD. A repository is
39
+ introduced when it represents a meaningful port: external storage, a complex
40
+ query contract, test isolation or an architectural boundary.
41
+
42
+ ## 5. Public module API
43
+
44
+ Artifacts intended for other modules are explicitly public. Internal
45
+ microflows and entities are not treated as contracts merely because their
46
+ qualified names are discoverable.
47
+
48
+ ## 6. Security
49
+
50
+ App security owns user roles and project-wide policy. Module security owns
51
+ module roles. Pages, microflows and nanoflows declare allowed module roles.
52
+ Unknown native security settings are preserved until they have a typed Ruby
53
+ representation.
54
+
55
+ ## 7. Navigation
56
+
57
+ Navigation is application-level. Menus preserve translations, nested items and
58
+ native actions through concise DSL plus authoritative deep structures.
59
+
60
+ ## 8. Design system
61
+
62
+ Semantic Ruby tokens describe intent; Mendix resources implement it. Native
63
+ themes, images and design properties remain preserved even when no concise DSL
64
+ exists yet.
65
+
66
+ ## 9. Design patterns
67
+
68
+ Use-case, query, adapter, strategy and policy objects are encouraged when they
69
+ clarify a boundary. Avoid ceremonial layers around native Mendix behavior.
70
+
71
+ ## 10. Naming
72
+
73
+ Mendix-qualified names are canonical. Ruby files use `snake_case`; classes and
74
+ symbols may adapt names without changing Mendix identity.
75
+
76
+ ## 11. Automatable quality rules
77
+
78
+ MXRB can enforce missing references, forbidden dependencies, cycles, access
79
+ boundaries, naming policy, unreferenced-artifact thresholds and custom Ruby
80
+ checks. Official `mx check` and MxBuild remain final platform gates.
81
+
82
+ ## 12. Current support boundary
83
+
84
+ Typed domain, microflow and nanoflow, page, menu, security, and native
85
+ navigation surfaces are editable. Theme and code assets use a checksummed
86
+ manifest; design-system tokens and policies have a typed Ruby contract.
87
+ Workflows, integrations, published APIs, and widgets without a concise API
88
+ remain editable through deep Ruby and the native baseline, but still need
89
+ specific typed DSLs.