# ibrahimoyassin/aiui architecture

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

- Interactive diagram: https://gitdiagram.com/ibrahimoyassin/aiui
- Repository: https://github.com/ibrahimoyassin/aiui

## Overview

AIUI is a browser-based workflow and agent builder: users configure projects as visual steps, test them, and export runnable Python or C# projects. The map follows that path through the editor, project/run services, plugin catalog, and code generation, while retaining account, connections, marketplace, and administration capabilities documented in the README. Several UI and runtime modules are unsampled; uncertain links are omitted or marked dashed rather than inferred as calls.

Main entry points: [`apps/web/src/App.tsx`](https://github.com/ibrahimoyassin/aiui/blob/main/apps/web/src/App.tsx) (App routing), [`apps/server/src/http.ts`](https://github.com/ibrahimoyassin/aiui/blob/main/apps/server/src/http.ts) (HTTP application), [`apps/server/src/db.ts`](https://github.com/ibrahimoyassin/aiui/blob/main/apps/server/src/db.ts) (SQLite state), [`apps/server/src/routes/projects.ts`](https://github.com/ibrahimoyassin/aiui/blob/main/apps/server/src/routes/projects.ts) (Project service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Browser experience"]
  node_app["App routing<br/>[App.tsx]"]
  node_editor["Workflow editor<br/>[IdePage.tsx]"]
  node_editorstate["Editor state<br/>[editor.ts]"]
  node_appstate["Session and catalog<br/>[app.ts]"]
  node_api["Web API client<br/>[api.ts]"]
  node_authui["Account access<br/>[Auth.tsx]"]
  node_connectionsui["Connections UI<br/>[Connections.tsx]"]
  node_marketui["Marketplace UI<br/>[Marketplace.tsx]"]
  node_devui["Plugin publishing UI<br/>[PluginEditor.tsx]"]
  node_adminui["Admin interface<br/>[AdminPage.tsx]"]
end

subgraph group_services["Platform services"]
  node_http["HTTP application<br/>[http.ts]"]
  node_auth["Authentication<br/>[auth.ts]"]
  node_projects["Project service<br/>[projects.ts]"]
  node_connections["Connection service<br/>[connections.ts]"]
  node_admin["Administration<br/>[admin.ts]"]
  node_platform["Platform policy and activity<br/>[platform.ts]"]
end

subgraph group_extensions["Plugins and marketplace"]
  node_pluginregistry["Plugin registry<br/>[plugins.ts]"]
  node_market["Marketplace service<br/>[market.ts]"]
  node_pluginsteps["Built-in workflow steps"]
end

subgraph group_execution["Workflow execution"]
  node_codegen["Flow validation and planning<br/>[index.ts]"]
  node_pygen["Python generator<br/>[python.ts]"]
  node_csgen["C&#35; generator<br/>[csharp.ts]"]
  node_runner["Server-side runner<br/>[runner.ts]"]
  node_pyruntime["Python runtime<br/>[aiui_runtime.py]"]
  node_csruntime["C&#35; runtime<br/>[AiuiRuntime.cs]"]
end

subgraph group_persistence["Platform state"]
  node_database[("SQLite state<br/>[db.ts]")]
  node_security["Token and secret security<br/>[security.ts]"]
end

node_user(("Builder"))

node_user -->|"uses"| node_app
node_app -->|"routes to"| node_editor
node_app -->|"routes to"| node_authui
node_app -->|"routes to"| node_connectionsui
node_app -->|"routes to"| node_marketui
node_app -->|"routes to"| node_devui
node_app -->|"routes to"| node_adminui
node_editor -.->|"edits"| node_editorstate
node_editor -.->|"requests project actions"| node_api
node_authui -->|"submits credentials"| node_api
node_appstate -->|"loads catalog and connections"| node_api
node_api -.->|"sends HTTP requests"| node_http
node_http -.->|"mounts routes"| node_auth
node_http -.->|"mounts routes"| node_projects
node_http -.->|"mounts routes"| node_connections
node_http -.->|"mounts routes"| node_market
node_http -.->|"mounts routes"| node_admin
node_auth -->|"reads and writes"| node_database
node_auth -->|"hashes passwords"| node_security
node_auth -->|"records events"| node_platform
node_projects -->|"reads and writes"| node_database
node_projects -->|"generates exports"| node_codegen
node_projects -->|"runs projects"| node_runner
node_projects -.->|"resolves connections"| node_connections
node_connections -->|"reads and writes"| node_database
node_connections -->|"encrypts secrets"| node_security
node_connections -->|"uses connection definitions"| node_pluginregistry
node_admin -->|"reads and writes"| node_database
node_admin -->|"manages platform policy"| node_platform
node_admin -->|"uses marketplace operations"| node_market
node_market -->|"reads and writes"| node_database
node_market -->|"builds catalog"| node_pluginregistry
node_pluginregistry -->|"seeds plugin records"| node_database
node_pluginregistry -.->|"loads first-party plugins"| node_pluginsteps
node_codegen -->|"generates Python"| node_pygen
node_codegen -->|"generates C&#35;"| node_csgen
node_runner -.->|"launches runtime"| node_pyruntime
node_runner -.->|"launches runtime"| node_csruntime
node_user -->|"builds and tests flows"| node_editor
node_user -->|"installs extensions"| node_marketui
node_user -->|"publishes plugins"| node_devui
node_user -->|"configures services"| node_connectionsui

click node_app "https://github.com/ibrahimoyassin/aiui/blob/main/apps/web/src/App.tsx"
click node_editor "https://github.com/ibrahimoyassin/aiui/blob/main/apps/web/src/ide/IdePage.tsx"
click node_editorstate "https://github.com/ibrahimoyassin/aiui/blob/main/apps/web/src/stores/editor.ts"
click node_appstate "https://github.com/ibrahimoyassin/aiui/blob/main/apps/web/src/stores/app.ts"
click node_api "https://github.com/ibrahimoyassin/aiui/blob/main/apps/web/src/api.ts"
click node_authui "https://github.com/ibrahimoyassin/aiui/blob/main/apps/web/src/pages/Auth.tsx"
click node_connectionsui "https://github.com/ibrahimoyassin/aiui/blob/main/apps/web/src/pages/Connections.tsx"
click node_marketui "https://github.com/ibrahimoyassin/aiui/blob/main/apps/web/src/pages/Marketplace.tsx"
click node_devui "https://github.com/ibrahimoyassin/aiui/blob/main/apps/web/src/pages/PluginEditor.tsx"
click node_adminui "https://github.com/ibrahimoyassin/aiui/blob/main/apps/web/src/pages/admin/AdminPage.tsx"
click node_http "https://github.com/ibrahimoyassin/aiui/blob/main/apps/server/src/http.ts"
click node_auth "https://github.com/ibrahimoyassin/aiui/blob/main/apps/server/src/routes/auth.ts"
click node_projects "https://github.com/ibrahimoyassin/aiui/blob/main/apps/server/src/routes/projects.ts"
click node_connections "https://github.com/ibrahimoyassin/aiui/blob/main/apps/server/src/routes/connections.ts"
click node_admin "https://github.com/ibrahimoyassin/aiui/blob/main/apps/server/src/routes/admin.ts"
click node_platform "https://github.com/ibrahimoyassin/aiui/blob/main/apps/server/src/platform.ts"
click node_pluginregistry "https://github.com/ibrahimoyassin/aiui/blob/main/apps/server/src/plugins.ts"
click node_market "https://github.com/ibrahimoyassin/aiui/blob/main/apps/server/src/routes/market.ts"
click node_pluginsteps "https://github.com/ibrahimoyassin/aiui/tree/main/plugins"
click node_codegen "https://github.com/ibrahimoyassin/aiui/blob/main/apps/server/src/codegen/index.ts"
click node_pygen "https://github.com/ibrahimoyassin/aiui/blob/main/apps/server/src/codegen/python.ts"
click node_csgen "https://github.com/ibrahimoyassin/aiui/blob/main/apps/server/src/codegen/csharp.ts"
click node_runner "https://github.com/ibrahimoyassin/aiui/blob/main/apps/server/src/runner.ts"
click node_pyruntime "https://github.com/ibrahimoyassin/aiui/blob/main/runtime/python/aiui_runtime.py"
click node_csruntime "https://github.com/ibrahimoyassin/aiui/blob/main/runtime/csharp/AiuiRuntime.cs"
click node_database "https://github.com/ibrahimoyassin/aiui/blob/main/apps/server/src/db.ts"
click node_security "https://github.com/ibrahimoyassin/aiui/blob/main/apps/server/src/security.ts"

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_editor,node_editorstate,node_appstate,node_api,node_authui,node_connectionsui,node_marketui,node_devui,node_adminui toneBlue
class node_http,node_auth,node_projects,node_connections,node_admin,node_platform toneAmber
class node_pluginregistry,node_market,node_pluginsteps toneMint
class node_codegen,node_pygen,node_csgen,node_runner,node_pyruntime,node_csruntime toneRose
class node_database,node_security,node_user toneIndigo
```

## Components

### Browser experience

- [App routing](https://github.com/ibrahimoyassin/aiui/blob/main/apps/web/src/App.tsx): `apps/web/src/App.tsx`
- [Workflow editor](https://github.com/ibrahimoyassin/aiui/blob/main/apps/web/src/ide/IdePage.tsx): `apps/web/src/ide/IdePage.tsx`
- [Editor state](https://github.com/ibrahimoyassin/aiui/blob/main/apps/web/src/stores/editor.ts): `apps/web/src/stores/editor.ts`
- [Session and catalog](https://github.com/ibrahimoyassin/aiui/blob/main/apps/web/src/stores/app.ts): `apps/web/src/stores/app.ts`
- [Web API client](https://github.com/ibrahimoyassin/aiui/blob/main/apps/web/src/api.ts): `apps/web/src/api.ts`
- [Account access](https://github.com/ibrahimoyassin/aiui/blob/main/apps/web/src/pages/Auth.tsx): `apps/web/src/pages/Auth.tsx`
- [Connections UI](https://github.com/ibrahimoyassin/aiui/blob/main/apps/web/src/pages/Connections.tsx): `apps/web/src/pages/Connections.tsx`
- [Marketplace UI](https://github.com/ibrahimoyassin/aiui/blob/main/apps/web/src/pages/Marketplace.tsx): `apps/web/src/pages/Marketplace.tsx`
- [Plugin publishing UI](https://github.com/ibrahimoyassin/aiui/blob/main/apps/web/src/pages/PluginEditor.tsx): `apps/web/src/pages/PluginEditor.tsx`
- [Admin interface](https://github.com/ibrahimoyassin/aiui/blob/main/apps/web/src/pages/admin/AdminPage.tsx): `apps/web/src/pages/admin/AdminPage.tsx`

### Platform services

- [HTTP application](https://github.com/ibrahimoyassin/aiui/blob/main/apps/server/src/http.ts): `apps/server/src/http.ts`
- [Authentication](https://github.com/ibrahimoyassin/aiui/blob/main/apps/server/src/routes/auth.ts): `apps/server/src/routes/auth.ts`
- [Project service](https://github.com/ibrahimoyassin/aiui/blob/main/apps/server/src/routes/projects.ts): `apps/server/src/routes/projects.ts`
- [Connection service](https://github.com/ibrahimoyassin/aiui/blob/main/apps/server/src/routes/connections.ts): `apps/server/src/routes/connections.ts`
- [Administration](https://github.com/ibrahimoyassin/aiui/blob/main/apps/server/src/routes/admin.ts): `apps/server/src/routes/admin.ts`
- [Platform policy and activity](https://github.com/ibrahimoyassin/aiui/blob/main/apps/server/src/platform.ts): `apps/server/src/platform.ts`

### Plugins and marketplace

- [Plugin registry](https://github.com/ibrahimoyassin/aiui/blob/main/apps/server/src/plugins.ts): `apps/server/src/plugins.ts`
- [Marketplace service](https://github.com/ibrahimoyassin/aiui/blob/main/apps/server/src/routes/market.ts): `apps/server/src/routes/market.ts`
- [Built-in workflow steps](https://github.com/ibrahimoyassin/aiui/tree/main/plugins): `plugins`

### Workflow execution

- [Flow validation and planning](https://github.com/ibrahimoyassin/aiui/blob/main/apps/server/src/codegen/index.ts): `apps/server/src/codegen/index.ts`
- [Python generator](https://github.com/ibrahimoyassin/aiui/blob/main/apps/server/src/codegen/python.ts): `apps/server/src/codegen/python.ts`
- [C# generator](https://github.com/ibrahimoyassin/aiui/blob/main/apps/server/src/codegen/csharp.ts): `apps/server/src/codegen/csharp.ts`
- [Server-side runner](https://github.com/ibrahimoyassin/aiui/blob/main/apps/server/src/runner.ts): `apps/server/src/runner.ts`
- [Python runtime](https://github.com/ibrahimoyassin/aiui/blob/main/runtime/python/aiui_runtime.py): `runtime/python/aiui_runtime.py`
- [C# runtime](https://github.com/ibrahimoyassin/aiui/blob/main/runtime/csharp/AiuiRuntime.cs): `runtime/csharp/AiuiRuntime.cs`

### Platform state

- [SQLite state](https://github.com/ibrahimoyassin/aiui/blob/main/apps/server/src/db.ts): `apps/server/src/db.ts`
- [Token and secret security](https://github.com/ibrahimoyassin/aiui/blob/main/apps/server/src/security.ts): `apps/server/src/security.ts`

### Other components

- **Builder**

## Connections

- Builder → App routing: uses (evidence: `README.md`)
- App routing → Workflow editor: routes to (evidence: `apps/web/src/App.tsx`)
- App routing → Account access: routes to (evidence: `apps/web/src/App.tsx`)
- App routing → Connections UI: routes to (evidence: `apps/web/src/App.tsx`)
- App routing → Marketplace UI: routes to (evidence: `apps/web/src/App.tsx`)
- App routing → Plugin publishing UI: routes to (evidence: `apps/web/src/App.tsx`)
- App routing → Admin interface: routes to (evidence: `apps/web/src/App.tsx`)
- Workflow editor → Editor state: edits
- Workflow editor → Web API client: requests project actions
- Account access → Web API client: submits credentials (evidence: `apps/web/src/pages/Auth.tsx`)
- Session and catalog → Web API client: loads catalog and connections (evidence: `apps/web/src/stores/app.ts`)
- Web API client → HTTP application: sends HTTP requests
- HTTP application → Authentication: mounts routes (evidence: `apps/server/src/routes/auth.ts`)
- HTTP application → Project service: mounts routes (evidence: `apps/server/src/routes/projects.ts`)
- HTTP application → Connection service: mounts routes (evidence: `apps/server/src/routes/connections.ts`)
- HTTP application → Marketplace service: mounts routes (evidence: `apps/server/src/routes/market.ts`)
- HTTP application → Administration: mounts routes (evidence: `apps/server/src/routes/admin.ts`)
- Authentication → SQLite state: reads and writes (evidence: `apps/server/src/routes/auth.ts`)
- Authentication → Token and secret security: hashes passwords (evidence: `apps/server/src/routes/auth.ts`)
- Authentication → Platform policy and activity: records events (evidence: `apps/server/src/routes/auth.ts`)
- Project service → SQLite state: reads and writes (evidence: `apps/server/src/routes/projects.ts`)
- Project service → Flow validation and planning: generates exports (evidence: `apps/server/src/routes/projects.ts`)
- Project service → Server-side runner: runs projects (evidence: `apps/server/src/routes/projects.ts`)
- Project service → Connection service: resolves connections (evidence: `apps/server/src/routes/projects.ts`)
- Connection service → SQLite state: reads and writes (evidence: `apps/server/src/routes/connections.ts`)
- Connection service → Token and secret security: encrypts secrets (evidence: `apps/server/src/routes/connections.ts`)
- Connection service → Plugin registry: uses connection definitions (evidence: `apps/server/src/routes/connections.ts`)
- Administration → SQLite state: reads and writes (evidence: `apps/server/src/routes/admin.ts`)
- Administration → Platform policy and activity: manages platform policy (evidence: `apps/server/src/routes/admin.ts`)
- Administration → Marketplace service: uses marketplace operations (evidence: `apps/server/src/routes/admin.ts`)
- Marketplace service → SQLite state: reads and writes (evidence: `apps/server/src/routes/market.ts`)
- Marketplace service → Plugin registry: builds catalog (evidence: `apps/server/src/routes/market.ts`)
- Plugin registry → SQLite state: seeds plugin records (evidence: `apps/server/src/plugins.ts`)
- Plugin registry → Built-in workflow steps: loads first-party plugins
- Flow validation and planning → Python generator: generates Python (evidence: `apps/server/src/codegen/index.ts`)
- Flow validation and planning → C# generator: generates C# (evidence: `apps/server/src/codegen/index.ts`)
- Server-side runner → Python runtime: launches runtime
- Server-side runner → C# runtime: launches runtime
- Builder → Workflow editor: builds and tests flows (evidence: `README.md`)
- Builder → Marketplace UI: installs extensions (evidence: `README.md`)
- Builder → Plugin publishing UI: publishes plugins (evidence: `README.md`)
- Builder → Connections UI: configures services (evidence: `README.md`)
