# molodecofficial/moloflow architecture

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

- Interactive diagram: https://gitdiagram.com/molodecofficial/moloflow
- Repository: https://github.com/molodecofficial/moloflow

## Overview

MoloFlow appears to be a Nuxt-based enterprise workspace with a windowed desktop, dynamic modules, document storage, and a companion Telegram bot for code-file previews and animations. The main user flow is opening a window, resolving its content, and—when it is a dynamic module—loading module data for display. Workspace documents and enterprise administration form additional product areas. The graph also shows module compilation and the bot’s animation path. Several subsystems are represented from the file tree alone; those are not connected where the excerpts do not establish runtime calls.

Main entry points: [`bot/handlers/animate.py`](https://github.com/molodecofficial/moloflow/blob/master/bot/handlers/animate.py) (Animation handler), [`app/composables/window/useWindowManager.ts`](https://github.com/molodecofficial/moloflow/blob/master/app/composables/window/useWindowManager.ts) (Window manager), [`app/components/window/WindowsManager.vue`](https://github.com/molodecofficial/moloflow/blob/master/app/components/window/WindowsManager.vue) (Window rendering), [`app/composables/compiler/useModuleService.ts`](https://github.com/molodecofficial/moloflow/blob/master/app/composables/compiler/useModuleService.ts) (Module loader)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop and windows"]
  node_app["Nuxt app shell<br/>[app.vue]"]
  node_window_manager["Window manager"]
  node_windows_ui["Window rendering<br/>[WindowsManager.vue]"]
  node_window_frame["Window frame<br/>[MoloWindow.vue]"]
  node_window_content["Window content<br/>[WindowsContent.vue]"]
  node_pinned["Pinned items<br/>[usePinnedItems.ts]"]
  node_window_state["Window state types<br/>[window.ts]"]
end

subgraph group_modules["Dynamic modules and tools"]
  node_module_service["Module loader"]
  node_module_compiler["Module compiler"]
  node_module_cache[("Module cache<br/>[useModuleCache.ts]")]
  node_module_browser["Module browser<br/>[Browser.vue]"]
  node_module_editor["Style editor"]
  node_monaco_files["Editor files<br/>[useMonacoFiles.ts]"]
end

subgraph group_workspace["Workspace and enterprise"]
  node_workspace_ui["Enterprise workspace<br/>[Workspace.vue]"]
  node_workspace_store["Document state<br/>[workspaceStore.ts]"]
end

subgraph group_backend["Server capabilities"]
  node_module_api["Module endpoints<br/>[index.get.ts]"]
  node_workspace_api["Workspace endpoints<br/>[index.get.ts]"]
  node_directory_api["Directory endpoints<br/>[items.get.ts]"]
  node_enterprise_api["Enterprise endpoints<br/>[index.get.ts]"]
end

subgraph group_bot["Telegram assistant"]
  node_bot["Telegram bot<br/>[main.py]"]
  node_animation_handler["Animation handler<br/>[animate.py]"]
  node_ui_ai["UI storyboard AI<br/>[ui_ai.py]"]
  node_renderer["Browser renderer"]
  node_file_store[("Bot file store<br/>[config.py]")]
end

node_user(("User"))

node_user -->|"uses"| node_app
node_window_manager -->|"manages pins"| node_pinned
node_window_manager -->|"uses types"| node_window_state
node_window_manager -.->|"provides windows"| node_windows_ui
node_windows_ui -->|"renders"| node_window_frame
node_windows_ui -->|"renders"| node_window_content
node_module_service -->|"caches data"| node_module_cache
node_module_service -->|"fetches module"| node_module_api
node_module_compiler -->|"uses cache"| node_module_cache
node_module_browser -.->|"loads modules"| node_module_service
node_module_editor -.->|"edits files"| node_monaco_files
node_workspace_store -->|"loads and saves"| node_workspace_api
node_workspace_ui -.->|"uses documents"| node_workspace_store
node_user -.->|"uses"| node_workspace_ui
node_user -.->|"browses modules"| node_module_browser
node_bot -->|"registers handler"| node_animation_handler
node_animation_handler -->|"reads files"| node_file_store
node_animation_handler -->|"generates storyboard"| node_ui_ai
node_animation_handler -->|"renders video"| node_renderer

click node_app "https://github.com/molodecofficial/moloflow/blob/master/app/app.vue"
click node_window_manager "https://github.com/molodecofficial/moloflow/blob/master/app/composables/window/useWindowManager.ts"
click node_windows_ui "https://github.com/molodecofficial/moloflow/blob/master/app/components/window/WindowsManager.vue"
click node_window_frame "https://github.com/molodecofficial/moloflow/blob/master/app/components/window/MoloWindow.vue"
click node_window_content "https://github.com/molodecofficial/moloflow/blob/master/app/components/window/WindowsContent.vue"
click node_pinned "https://github.com/molodecofficial/moloflow/blob/master/app/composables/window/usePinnedItems.ts"
click node_window_state "https://github.com/molodecofficial/moloflow/blob/master/types/window.ts"
click node_module_service "https://github.com/molodecofficial/moloflow/blob/master/app/composables/compiler/useModuleService.ts"
click node_module_api "https://github.com/molodecofficial/moloflow/blob/master/server/api/enterprises/%5Bid%5D/dynamicModules/%5BmoduleId%5D/index.get.ts"
click node_module_compiler "https://github.com/molodecofficial/moloflow/blob/master/app/composables/compiler/useModuleCompiler.ts"
click node_module_cache "https://github.com/molodecofficial/moloflow/blob/master/app/composables/compiler/useModuleCache.ts"
click node_module_browser "https://github.com/molodecofficial/moloflow/blob/master/app/layouts/modules/Browser.vue"
click node_module_editor "https://github.com/molodecofficial/moloflow/blob/master/app/components/MoloStyleEditor.vue"
click node_monaco_files "https://github.com/molodecofficial/moloflow/blob/master/app/composables/useMonacoFiles.ts"
click node_workspace_ui "https://github.com/molodecofficial/moloflow/blob/master/app/layouts/company/enterprise/Workspace.vue"
click node_workspace_store "https://github.com/molodecofficial/moloflow/blob/master/stores/workspaceStore.ts"
click node_workspace_api "https://github.com/molodecofficial/moloflow/blob/master/server/api/workspace/documents/index.get.ts"
click node_directory_api "https://github.com/molodecofficial/moloflow/blob/master/server/api/directory/items.get.ts"
click node_enterprise_api "https://github.com/molodecofficial/moloflow/blob/master/server/api/enterprises/index.get.ts"
click node_bot "https://github.com/molodecofficial/moloflow/blob/master/bot/main.py"
click node_animation_handler "https://github.com/molodecofficial/moloflow/blob/master/bot/handlers/animate.py"
click node_ui_ai "https://github.com/molodecofficial/moloflow/blob/master/bot/services/ui_ai.py"
click node_renderer "https://github.com/molodecofficial/moloflow/blob/master/bot/services/browser_animator.py"
click node_file_store "https://github.com/molodecofficial/moloflow/blob/master/bot/config.py"

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_window_manager,node_windows_ui,node_window_frame,node_window_content,node_pinned,node_window_state,node_user toneBlue
class node_module_service,node_module_compiler,node_module_cache,node_module_browser,node_module_editor,node_monaco_files toneAmber
class node_workspace_ui,node_workspace_store toneMint
class node_module_api,node_workspace_api,node_directory_api,node_enterprise_api toneRose
class node_bot,node_animation_handler,node_ui_ai,node_renderer,node_file_store toneIndigo
```

## Components

### Desktop and windows

- [Nuxt app shell](https://github.com/molodecofficial/moloflow/blob/master/app/app.vue): `app/app.vue`
- [Window manager](https://github.com/molodecofficial/moloflow/blob/master/app/composables/window/useWindowManager.ts): `app/composables/window/useWindowManager.ts`
- [Window rendering](https://github.com/molodecofficial/moloflow/blob/master/app/components/window/WindowsManager.vue): `app/components/window/WindowsManager.vue`
- [Window frame](https://github.com/molodecofficial/moloflow/blob/master/app/components/window/MoloWindow.vue): `app/components/window/MoloWindow.vue`
- [Window content](https://github.com/molodecofficial/moloflow/blob/master/app/components/window/WindowsContent.vue): `app/components/window/WindowsContent.vue`
- [Pinned items](https://github.com/molodecofficial/moloflow/blob/master/app/composables/window/usePinnedItems.ts): `app/composables/window/usePinnedItems.ts`
- [Window state types](https://github.com/molodecofficial/moloflow/blob/master/types/window.ts): `types/window.ts`

### Dynamic modules and tools

- [Module loader](https://github.com/molodecofficial/moloflow/blob/master/app/composables/compiler/useModuleService.ts): `app/composables/compiler/useModuleService.ts`
- [Module compiler](https://github.com/molodecofficial/moloflow/blob/master/app/composables/compiler/useModuleCompiler.ts): `app/composables/compiler/useModuleCompiler.ts`
- [Module cache](https://github.com/molodecofficial/moloflow/blob/master/app/composables/compiler/useModuleCache.ts): `app/composables/compiler/useModuleCache.ts`
- [Module browser](https://github.com/molodecofficial/moloflow/blob/master/app/layouts/modules/Browser.vue): `app/layouts/modules/Browser.vue`
- [Style editor](https://github.com/molodecofficial/moloflow/blob/master/app/components/MoloStyleEditor.vue): `app/components/MoloStyleEditor.vue`
- [Editor files](https://github.com/molodecofficial/moloflow/blob/master/app/composables/useMonacoFiles.ts): `app/composables/useMonacoFiles.ts`

### Workspace and enterprise

- [Enterprise workspace](https://github.com/molodecofficial/moloflow/blob/master/app/layouts/company/enterprise/Workspace.vue): `app/layouts/company/enterprise/Workspace.vue`
- [Document state](https://github.com/molodecofficial/moloflow/blob/master/stores/workspaceStore.ts): `stores/workspaceStore.ts`

### Server capabilities

- [Module endpoints](https://github.com/molodecofficial/moloflow/blob/master/server/api/enterprises/%5Bid%5D/dynamicModules/%5BmoduleId%5D/index.get.ts): `server/api/enterprises/[id]/dynamicModules/[moduleId]/index.get.ts`
- [Workspace endpoints](https://github.com/molodecofficial/moloflow/blob/master/server/api/workspace/documents/index.get.ts): `server/api/workspace/documents/index.get.ts`
- [Directory endpoints](https://github.com/molodecofficial/moloflow/blob/master/server/api/directory/items.get.ts): `server/api/directory/items.get.ts`
- [Enterprise endpoints](https://github.com/molodecofficial/moloflow/blob/master/server/api/enterprises/index.get.ts): `server/api/enterprises/index.get.ts`

### Telegram assistant

- [Telegram bot](https://github.com/molodecofficial/moloflow/blob/master/bot/main.py): `bot/main.py`
- [Animation handler](https://github.com/molodecofficial/moloflow/blob/master/bot/handlers/animate.py): `bot/handlers/animate.py`
- [UI storyboard AI](https://github.com/molodecofficial/moloflow/blob/master/bot/services/ui_ai.py): `bot/services/ui_ai.py`
- [Browser renderer](https://github.com/molodecofficial/moloflow/blob/master/bot/services/browser_animator.py): `bot/services/browser_animator.py`
- [Bot file store](https://github.com/molodecofficial/moloflow/blob/master/bot/config.py): `bot/config.py`

### Other components

- **User**

## Connections

- User → Nuxt app shell: uses
- Window manager → Pinned items: manages pins (evidence: `app/composables/window/useWindowManager.ts`)
- Window manager → Window state types: uses types (evidence: `app/composables/window/useWindowManager.ts`)
- Window manager → Window rendering: provides windows
- Window rendering → Window frame: renders (evidence: `app/components/window/WindowsManager.vue`)
- Window rendering → Window content: renders (evidence: `app/components/window/WindowsManager.vue`)
- Module loader → Module cache: caches data (evidence: `app/composables/compiler/useModuleService.ts`)
- Module loader → Module endpoints: fetches module (evidence: `app/composables/compiler/useModuleService.ts`)
- Module compiler → Module cache: uses cache (evidence: `app/composables/compiler/useModuleCompiler.ts`)
- Module browser → Module loader: loads modules
- Style editor → Editor files: edits files
- Document state → Workspace endpoints: loads and saves (evidence: `stores/workspaceStore.ts`)
- Enterprise workspace → Document state: uses documents
- User → Enterprise workspace: uses
- User → Module browser: browses modules
- Telegram bot → Animation handler: registers handler (evidence: `bot/main.py`)
- Animation handler → Bot file store: reads files (evidence: `bot/handlers/animate.py`)
- Animation handler → UI storyboard AI: generates storyboard (evidence: `bot/handlers/animate.py`)
- Animation handler → Browser renderer: renders video (evidence: `bot/handlers/animate.py`)
