# synopse/mormot2 architecture

> Architecture diagram of the GitHub repository synopse/mormot2, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-08). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/synopse/mormot2
- Repository: https://github.com/synopse/mormot2

## Overview

This tree is a partial view of mORMot 2: it exposes a React customer-management demo and several bundled native libraries, but not the framework’s main `src` implementation. The principal visible workflow is a user listing, creating, editing, or deleting customers through routed React views and an Axios REST client. The graph also captures distinct vendored runtime capabilities. Framework-wide capabilities are documented in the README, but their implementation paths are absent from this tree, so they are not mapped as source components.

Main entry points: [`ex/ThirdPartyDemos/dmvc-ai/51-react/frontend/src/Layout.js`](https://github.com/synopse/mormot2/blob/master/ex/ThirdPartyDemos/dmvc-ai/51-react/frontend/src/Layout.js) (Routes and layout), [`ex/ThirdPartyDemos/dmvc-ai/51-react/frontend/src/services/api.js`](https://github.com/synopse/mormot2/blob/master/ex/ThirdPartyDemos/dmvc-ai/51-react/frontend/src/services/api.js) (REST client), [`ex/ThirdPartyDemos/dmvc-ai/51-react/frontend/src/components/customers/Customers.js`](https://github.com/synopse/mormot2/blob/master/ex/ThirdPartyDemos/dmvc-ai/51-react/frontend/src/components/customers/Customers.js) (Customer list), [`ex/ThirdPartyDemos/dmvc-ai/51-react/frontend/src/components/customer/Customer.js`](https://github.com/synopse/mormot2/blob/master/ex/ThirdPartyDemos/dmvc-ai/51-react/frontend/src/components/customer/Customer.js) (Customer form)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_sample["React demo"]
  node_app["React app<br/>[App.js]"]
  node_routes["Routes and layout<br/>[Layout.js]"]
  node_customer_list["Customer list<br/>[Customers.js]"]
  node_customer_form["Customer form<br/>[Customer.js]"]
  node_about["About view<br/>[About.js]"]
  node_api_client["REST client<br/>[api.js]"]
  node_angular_demo["Angular demo<br/>[app.js]"]
end

subgraph group_compression["Compression libraries"]
  node_deflate["DEFLATE compressor<br/>[deflate_compress.c]"]
  node_matchfinders["Match finders<br/>[bt_matchfinder.h]"]
  node_deflate_api["libdeflate API<br/>[libdeflate.h]"]
  node_zlib_api["zlib API<br/>[zlib.h]"]
  node_zlib_deflate["zlib compressor<br/>[deflate.c]"]
  node_lizard_compress["Lizard compression<br/>[lizard_compress.c]"]
end

subgraph group_runtimes["Embedded runtimes"]
  node_quickjs["QuickJS engine<br/>[quickjs.c]"]
  node_quickjs_numbers["Big-number math<br/>[libbf.c]"]
  node_spidermonkey_bridge["SpiderMonkey bridge<br/>[synsm.cpp]"]
end

subgraph group_sqlite["SQLite extension"]
  node_sqlite_cipher_vfs["Cipher VFS<br/>[sqlite3mc_vfs.c]"]
end

node_user(("Browser user"))
node_rest_backend["mORMot REST backend"]
node_sqlite_database[("SQLite database")]

node_user -->|"navigates"| node_routes
node_app -->|"renders"| node_routes
node_routes -->|"routes to"| node_customer_list
node_routes -->|"routes to"| node_customer_form
node_routes -->|"routes to"| node_about
node_customer_list -->|"calls"| node_api_client
node_customer_form -->|"calls"| node_api_client
node_api_client -.->|"HTTP requests"| node_rest_backend
node_deflate -->|"uses"| node_matchfinders
node_deflate_api -.->|"exposes"| node_deflate
node_zlib_api -.->|"declares API"| node_zlib_deflate
node_quickjs -.->|"uses math"| node_quickjs_numbers
node_sqlite_cipher_vfs -->|"mediates file access"| node_sqlite_database

click node_app "https://github.com/synopse/mormot2/blob/master/ex/ThirdPartyDemos/dmvc-ai/51-react/frontend/src/App.js"
click node_routes "https://github.com/synopse/mormot2/blob/master/ex/ThirdPartyDemos/dmvc-ai/51-react/frontend/src/Layout.js"
click node_customer_list "https://github.com/synopse/mormot2/blob/master/ex/ThirdPartyDemos/dmvc-ai/51-react/frontend/src/components/customers/Customers.js"
click node_customer_form "https://github.com/synopse/mormot2/blob/master/ex/ThirdPartyDemos/dmvc-ai/51-react/frontend/src/components/customer/Customer.js"
click node_about "https://github.com/synopse/mormot2/blob/master/ex/ThirdPartyDemos/dmvc-ai/51-react/frontend/src/components/about/About.js"
click node_api_client "https://github.com/synopse/mormot2/blob/master/ex/ThirdPartyDemos/dmvc-ai/51-react/frontend/src/services/api.js"
click node_angular_demo "https://github.com/synopse/mormot2/blob/master/ex/ThirdPartyDemos/dmvc-ai/50-angular/frontend/app.js"
click node_deflate "https://github.com/synopse/mormot2/blob/master/res/static/libdeflate/lib/deflate_compress.c"
click node_matchfinders "https://github.com/synopse/mormot2/blob/master/res/static/libdeflate/lib/bt_matchfinder.h"
click node_deflate_api "https://github.com/synopse/mormot2/blob/master/res/static/libdeflate/libdeflate.h"
click node_zlib_api "https://github.com/synopse/mormot2/blob/master/res/static/libzlib/zlib.h"
click node_zlib_deflate "https://github.com/synopse/mormot2/blob/master/res/static/libzlib/deflate.c"
click node_lizard_compress "https://github.com/synopse/mormot2/blob/master/res/static/liblizard/lib/lizard_compress.c"
click node_quickjs "https://github.com/synopse/mormot2/blob/master/res/static/libquickjs/quickjs.c"
click node_quickjs_numbers "https://github.com/synopse/mormot2/blob/master/res/static/libquickjs/libbf.c"
click node_spidermonkey_bridge "https://github.com/synopse/mormot2/blob/master/res/static/libspidermonkey/synsm/synsm.cpp"
click node_sqlite_cipher_vfs "https://github.com/synopse/mormot2/blob/master/res/static/libsqlite3/sqlite3mc_vfs.c"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_routes,node_customer_list,node_customer_form,node_about,node_api_client,node_angular_demo,node_user toneBlue
class node_deflate,node_matchfinders,node_deflate_api,node_zlib_api,node_zlib_deflate,node_lizard_compress,node_sqlite_database toneAmber
class node_quickjs,node_quickjs_numbers,node_spidermonkey_bridge toneMint
class node_sqlite_cipher_vfs toneRose
class node_rest_backend toneIndigo
```

## Components

### React demo

- [React app](https://github.com/synopse/mormot2/blob/master/ex/ThirdPartyDemos/dmvc-ai/51-react/frontend/src/App.js): `ex/ThirdPartyDemos/dmvc-ai/51-react/frontend/src/App.js`
- [Routes and layout](https://github.com/synopse/mormot2/blob/master/ex/ThirdPartyDemos/dmvc-ai/51-react/frontend/src/Layout.js): `ex/ThirdPartyDemos/dmvc-ai/51-react/frontend/src/Layout.js`
- [Customer list](https://github.com/synopse/mormot2/blob/master/ex/ThirdPartyDemos/dmvc-ai/51-react/frontend/src/components/customers/Customers.js): `ex/ThirdPartyDemos/dmvc-ai/51-react/frontend/src/components/customers/Customers.js`
- [Customer form](https://github.com/synopse/mormot2/blob/master/ex/ThirdPartyDemos/dmvc-ai/51-react/frontend/src/components/customer/Customer.js): `ex/ThirdPartyDemos/dmvc-ai/51-react/frontend/src/components/customer/Customer.js`
- [About view](https://github.com/synopse/mormot2/blob/master/ex/ThirdPartyDemos/dmvc-ai/51-react/frontend/src/components/about/About.js): `ex/ThirdPartyDemos/dmvc-ai/51-react/frontend/src/components/about/About.js`
- [REST client](https://github.com/synopse/mormot2/blob/master/ex/ThirdPartyDemos/dmvc-ai/51-react/frontend/src/services/api.js): `ex/ThirdPartyDemos/dmvc-ai/51-react/frontend/src/services/api.js`
- [Angular demo](https://github.com/synopse/mormot2/blob/master/ex/ThirdPartyDemos/dmvc-ai/50-angular/frontend/app.js): `ex/ThirdPartyDemos/dmvc-ai/50-angular/frontend/app.js`

### Compression libraries

- [DEFLATE compressor](https://github.com/synopse/mormot2/blob/master/res/static/libdeflate/lib/deflate_compress.c): `res/static/libdeflate/lib/deflate_compress.c`
- [Match finders](https://github.com/synopse/mormot2/blob/master/res/static/libdeflate/lib/bt_matchfinder.h): `res/static/libdeflate/lib/bt_matchfinder.h`
- [libdeflate API](https://github.com/synopse/mormot2/blob/master/res/static/libdeflate/libdeflate.h): `res/static/libdeflate/libdeflate.h`
- [zlib API](https://github.com/synopse/mormot2/blob/master/res/static/libzlib/zlib.h): `res/static/libzlib/zlib.h`
- [zlib compressor](https://github.com/synopse/mormot2/blob/master/res/static/libzlib/deflate.c): `res/static/libzlib/deflate.c`
- [Lizard compression](https://github.com/synopse/mormot2/blob/master/res/static/liblizard/lib/lizard_compress.c): `res/static/liblizard/lib/lizard_compress.c`

### Embedded runtimes

- [QuickJS engine](https://github.com/synopse/mormot2/blob/master/res/static/libquickjs/quickjs.c): `res/static/libquickjs/quickjs.c`
- [Big-number math](https://github.com/synopse/mormot2/blob/master/res/static/libquickjs/libbf.c): `res/static/libquickjs/libbf.c`
- [SpiderMonkey bridge](https://github.com/synopse/mormot2/blob/master/res/static/libspidermonkey/synsm/synsm.cpp): `res/static/libspidermonkey/synsm/synsm.cpp`

### SQLite extension

- [Cipher VFS](https://github.com/synopse/mormot2/blob/master/res/static/libsqlite3/sqlite3mc_vfs.c): `res/static/libsqlite3/sqlite3mc_vfs.c`

### Other components

- **Browser user**
- **mORMot REST backend**
- **SQLite database**

## Connections

- Browser user → Routes and layout: navigates (evidence: `ex/ThirdPartyDemos/dmvc-ai/51-react/frontend/src/Layout.js`)
- React app → Routes and layout: renders (evidence: `ex/ThirdPartyDemos/dmvc-ai/51-react/frontend/src/App.js`)
- Routes and layout → Customer list: routes to (evidence: `ex/ThirdPartyDemos/dmvc-ai/51-react/frontend/src/Layout.js`)
- Routes and layout → Customer form: routes to (evidence: `ex/ThirdPartyDemos/dmvc-ai/51-react/frontend/src/Layout.js`)
- Routes and layout → About view: routes to (evidence: `ex/ThirdPartyDemos/dmvc-ai/51-react/frontend/src/Layout.js`)
- Customer list → REST client: calls (evidence: `ex/ThirdPartyDemos/dmvc-ai/51-react/frontend/src/components/customers/Customers.js`)
- Customer form → REST client: calls (evidence: `ex/ThirdPartyDemos/dmvc-ai/51-react/frontend/src/components/customer/Customer.js`)
- REST client → mORMot REST backend: HTTP requests (evidence: `ex/ThirdPartyDemos/dmvc-ai/51-react/frontend/src/services/api.js`)
- DEFLATE compressor → Match finders: uses (evidence: `res/static/libdeflate/lib/deflate_compress.c`)
- libdeflate API → DEFLATE compressor: exposes (evidence: `res/static/libdeflate/lib/deflate_compress.c`)
- zlib API → zlib compressor: declares API
- QuickJS engine → Big-number math: uses math
- Cipher VFS → SQLite database: mediates file access (evidence: `res/static/libsqlite3/sqlite3mc_vfs.c`)
