# totaljs/framework5 architecture

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

- Interactive diagram: https://gitdiagram.com/totaljs/framework5
- Repository: https://github.com/totaljs/framework5

## Overview

Total.js v5 is a Node.js application framework for web, desktop, service, and IoT applications. The principal web workflow begins with an incoming request, then uses routing and controller capabilities to produce a response; the supplied excerpts do not show the runtime dispatch between those stages, so that path is not asserted here. The graph also preserves the framework’s major content, data, workflow, and integration capabilities. Relationships are limited to documented framework entry-point imports and the FlowStream and NoSQL module references in the source index.

Main entry points: [`index.js`](https://github.com/totaljs/framework5/blob/main/index.js) (Framework runtime), [`flow-flowstream.js`](https://github.com/totaljs/framework5/blob/main/flow-flowstream.js) (FlowStream integration), [`nosql.js`](https://github.com/totaljs/framework5/blob/main/nosql.js) (NoSQL access), [`routing.js`](https://github.com/totaljs/framework5/blob/main/routing.js) (Route matching)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web runtime"]
  node_framework["Framework runtime<br/>[index.js]"]
  node_http["HTTP support<br/>[http.js]"]
  node_routing["Route matching<br/>[routing.js]"]
  node_controller["Request controller<br/>[controller.js]"]
  node_websocket["WebSocket transport<br/>[websocket.js]"]
  node_api["API support<br/>[api.js]"]
end

subgraph group_content["Content and assets"]
  node_views["View rendering<br/>[viewengine.js]"]
  node_cms["Content management<br/>[cms.js]"]
  node_markdown["Markdown rendering<br/>[markdown.js]"]
  node_images["Image handling<br/>[images.js]"]
  node_minifiers["Asset minification<br/>[minificators.js]"]
  node_file_storage[("File storage<br/>[filestorage.js]")]
end

subgraph group_data["Data access"]
  node_query_builder["SQL query builder<br/>[querybuilder.js]"]
  node_nosql["NoSQL access<br/>[nosql.js]"]
  node_nosql_query["NoSQL query builder"]
end

subgraph group_workflow["Workflow and AI"]
  node_ai["AI models<br/>[aimodel.js]"]
  node_flow["FlowStream runtime<br/>[flowstream.js]"]
  node_flow_framework["FlowStream integration<br/>[flow-flowstream.js]"]
end

subgraph group_integrations["Integrations"]
  node_ldap["LDAP integration<br/>[ldap.js]"]
  node_mail["Mail delivery<br/>[mail.js]"]
  node_openclient["OpenClient<br/>[openclient.js]"]
end

node_user(("Application user"))

node_user -->|"uses"| node_framework
node_framework -->|"loads"| node_api
node_framework -->|"loads"| node_routing
node_framework -->|"loads"| node_controller
node_framework -->|"loads"| node_websocket
node_framework -->|"loads"| node_views
node_framework -->|"loads"| node_cms
node_framework -->|"loads"| node_markdown
node_framework -->|"loads"| node_images
node_framework -->|"loads"| node_minifiers
node_framework -->|"loads"| node_file_storage
node_framework -->|"loads"| node_query_builder
node_framework -->|"loads"| node_ai
node_framework -->|"loads"| node_flow_framework
node_framework -->|"loads"| node_ldap
node_framework -->|"loads"| node_mail
node_framework -->|"loads"| node_openclient
node_flow_framework -->|"uses"| node_flow
node_nosql -->|"uses"| node_nosql_query

click node_framework "https://github.com/totaljs/framework5/blob/main/index.js"
click node_http "https://github.com/totaljs/framework5/blob/main/http.js"
click node_routing "https://github.com/totaljs/framework5/blob/main/routing.js"
click node_controller "https://github.com/totaljs/framework5/blob/main/controller.js"
click node_websocket "https://github.com/totaljs/framework5/blob/main/websocket.js"
click node_api "https://github.com/totaljs/framework5/blob/main/api.js"
click node_views "https://github.com/totaljs/framework5/blob/main/viewengine.js"
click node_cms "https://github.com/totaljs/framework5/blob/main/cms.js"
click node_markdown "https://github.com/totaljs/framework5/blob/main/markdown.js"
click node_images "https://github.com/totaljs/framework5/blob/main/images.js"
click node_minifiers "https://github.com/totaljs/framework5/blob/main/minificators.js"
click node_file_storage "https://github.com/totaljs/framework5/blob/main/filestorage.js"
click node_query_builder "https://github.com/totaljs/framework5/blob/main/querybuilder.js"
click node_nosql "https://github.com/totaljs/framework5/blob/main/nosql.js"
click node_nosql_query "https://github.com/totaljs/framework5/blob/main/nosql-querybuilder.js"
click node_ai "https://github.com/totaljs/framework5/blob/main/aimodel.js"
click node_flow "https://github.com/totaljs/framework5/blob/main/flowstream.js"
click node_flow_framework "https://github.com/totaljs/framework5/blob/main/flow-flowstream.js"
click node_ldap "https://github.com/totaljs/framework5/blob/main/ldap.js"
click node_mail "https://github.com/totaljs/framework5/blob/main/mail.js"
click node_openclient "https://github.com/totaljs/framework5/blob/main/openclient.js"

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_framework,node_http,node_routing,node_controller,node_websocket,node_api,node_user toneBlue
class node_views,node_cms,node_markdown,node_images,node_minifiers,node_file_storage toneAmber
class node_query_builder,node_nosql,node_nosql_query toneMint
class node_ai,node_flow,node_flow_framework toneRose
class node_ldap,node_mail,node_openclient toneIndigo
```

## Components

### Web runtime

- [Framework runtime](https://github.com/totaljs/framework5/blob/main/index.js): `index.js`
- [HTTP support](https://github.com/totaljs/framework5/blob/main/http.js): `http.js`
- [Route matching](https://github.com/totaljs/framework5/blob/main/routing.js): `routing.js`
- [Request controller](https://github.com/totaljs/framework5/blob/main/controller.js): `controller.js`
- [WebSocket transport](https://github.com/totaljs/framework5/blob/main/websocket.js): `websocket.js`
- [API support](https://github.com/totaljs/framework5/blob/main/api.js): `api.js`

### Content and assets

- [View rendering](https://github.com/totaljs/framework5/blob/main/viewengine.js): `viewengine.js`
- [Content management](https://github.com/totaljs/framework5/blob/main/cms.js): `cms.js`
- [Markdown rendering](https://github.com/totaljs/framework5/blob/main/markdown.js): `markdown.js`
- [Image handling](https://github.com/totaljs/framework5/blob/main/images.js): `images.js`
- [Asset minification](https://github.com/totaljs/framework5/blob/main/minificators.js): `minificators.js`
- [File storage](https://github.com/totaljs/framework5/blob/main/filestorage.js): `filestorage.js`

### Data access

- [SQL query builder](https://github.com/totaljs/framework5/blob/main/querybuilder.js): `querybuilder.js`
- [NoSQL access](https://github.com/totaljs/framework5/blob/main/nosql.js): `nosql.js`
- [NoSQL query builder](https://github.com/totaljs/framework5/blob/main/nosql-querybuilder.js): `nosql-querybuilder.js`

### Workflow and AI

- [AI models](https://github.com/totaljs/framework5/blob/main/aimodel.js): `aimodel.js`
- [FlowStream runtime](https://github.com/totaljs/framework5/blob/main/flowstream.js): `flowstream.js`
- [FlowStream integration](https://github.com/totaljs/framework5/blob/main/flow-flowstream.js): `flow-flowstream.js`

### Integrations

- [LDAP integration](https://github.com/totaljs/framework5/blob/main/ldap.js): `ldap.js`
- [Mail delivery](https://github.com/totaljs/framework5/blob/main/mail.js): `mail.js`
- [OpenClient](https://github.com/totaljs/framework5/blob/main/openclient.js): `openclient.js`

### Other components

- **Application user**

## Connections

- Application user → Framework runtime: uses
- Framework runtime → API support: loads (evidence: `index.js`)
- Framework runtime → Route matching: loads (evidence: `index.js`)
- Framework runtime → Request controller: loads (evidence: `index.js`)
- Framework runtime → WebSocket transport: loads (evidence: `index.js`)
- Framework runtime → View rendering: loads (evidence: `index.js`)
- Framework runtime → Content management: loads (evidence: `index.js`)
- Framework runtime → Markdown rendering: loads (evidence: `index.js`)
- Framework runtime → Image handling: loads (evidence: `index.js`)
- Framework runtime → Asset minification: loads (evidence: `index.js`)
- Framework runtime → File storage: loads (evidence: `index.js`)
- Framework runtime → SQL query builder: loads (evidence: `index.js`)
- Framework runtime → AI models: loads (evidence: `index.js`)
- Framework runtime → FlowStream integration: loads (evidence: `index.js`)
- Framework runtime → LDAP integration: loads (evidence: `index.js`)
- Framework runtime → Mail delivery: loads (evidence: `index.js`)
- Framework runtime → OpenClient: loads (evidence: `index.js`)
- FlowStream integration → FlowStream runtime: uses (evidence: `flow-flowstream.js`)
- NoSQL access → NoSQL query builder: uses (evidence: `nosql.js`)
