# dimah98/dxdsf architecture

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

- Interactive diagram: https://gitdiagram.com/dimah98/dxdsf
- Repository: https://github.com/dimah98/dxdsf
- Video tour (about a minute): https://gitdiagram.com/dimah98/dxdsf/video

## Overview

This repository is an automation platform for Sunflower Land: users build node-based projects, save or schedule them, and run them through browser automation; a web UI and Android companion expose monitoring and management features. The graph emphasizes the project-save and run path, plus scheduling and game-state capabilities visible in the tree. The README is empty and source excerpts are partial, so uncertain route registration, service wiring, and Android-to-backend calls are omitted.

Main entry points: [`backend/src/controllers/projectsController.ts`](https://github.com/dimah98/dxdsf/blob/main/backend/src/controllers/projectsController.ts) (Project API), [`backend/src/routes/scheduleRoutes.ts`](https://github.com/dimah98/dxdsf/blob/main/backend/src/routes/scheduleRoutes.ts) (Schedule API), [`sl-bot-remote/app/src/main/java/ua/diperon/slbotremote/BotApiService.kt`](https://github.com/dimah98/dxdsf/blob/main/sl-bot-remote/app/src/main/java/ua/diperon/slbotremote/BotApiService.kt) (Android companion), [`frontend/src/hooks/useProjectManager.ts`](https://github.com/dimah98/dxdsf/blob/main/frontend/src/hooks/useProjectManager.ts) (Project manager hook)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_authoring["Project authoring"]
  node_editor["Flow editor<br/>[NodeEditor.tsx]"]
  node_projectui["Project manager"]
  node_projecthook["Project manager hook"]
  node_projectcontroller["Project API"]
  node_projectfiles[("Project files<br/>[constants.ts]")]
  node_scheduleui["Schedule manager"]
  node_scheduleroutes["Schedule API<br/>[scheduleRoutes.ts]"]
end

subgraph group_runtime["Bot runtime"]
  node_projectrunner["Project runner<br/>[ProjectRunner.ts]"]
  node_browser["Browser sessions<br/>[browserManager.ts]"]
  node_engine["Bot engine<br/>[BotEngine.ts]"]
  node_nodehandlers["Automation nodes<br/>[index.ts]"]
end

subgraph group_operations["Operations"]
  node_scheduler["Scheduler service"]
  node_websocket["Live updates<br/>[wsHandlers.ts]"]
  node_inventory["Inventory overview<br/>[InventoryReader.ts]"]
  node_notifications["Notifications"]
  node_masslaunch["Mass launches"]
end

subgraph group_clients["Remote clients"]
  node_android["Android companion<br/>[BotApiService.kt]"]
  node_androiddash["Remote dashboard<br/>[DashboardScreen.kt]"]
end

node_user(("User"))
node_game(("Sunflower Land"))

node_user -->|"edits flows"| node_editor
node_user -->|"manages projects"| node_projectui
node_editor -->|"edits project"| node_projecthook
node_projectui -->|"saves or loads"| node_projecthook
node_projecthook -->|"HTTP requests"| node_projectcontroller
node_projectcontroller -->|"reads and writes"| node_projectfiles
node_projectcontroller -->|"starts or stops"| node_projectrunner
node_projectrunner -->|"obtains session"| node_browser
node_engine -->|"dispatches nodes"| node_nodehandlers
node_nodehandlers -->|"automates browser"| node_game
node_browser -->|"controls page"| node_game
node_scheduleui -->|"HTTP requests"| node_scheduleroutes
node_scheduleroutes -->|"manages scheduled runs"| node_scheduler
node_scheduleroutes -->|"updates settings"| node_projectfiles
node_android -->|"provides API client"| node_androiddash
node_android -.->|"calls project API"| node_projectcontroller
node_android -.->|"calls schedule API"| node_scheduleroutes
node_masslaunch -->|"launches projects"| node_projectrunner

click node_editor "https://github.com/dimah98/dxdsf/blob/main/frontend/src/components/NodeEditor.tsx"
click node_projectui "https://github.com/dimah98/dxdsf/blob/main/frontend/src/components/ProjectManagerModal.tsx"
click node_projecthook "https://github.com/dimah98/dxdsf/blob/main/frontend/src/hooks/useProjectManager.ts"
click node_projectcontroller "https://github.com/dimah98/dxdsf/blob/main/backend/src/controllers/projectsController.ts"
click node_projectfiles "https://github.com/dimah98/dxdsf/blob/main/backend/src/constants.ts"
click node_scheduleui "https://github.com/dimah98/dxdsf/blob/main/frontend/src/components/ScheduleManager.tsx"
click node_scheduleroutes "https://github.com/dimah98/dxdsf/blob/main/backend/src/routes/scheduleRoutes.ts"
click node_scheduler "https://github.com/dimah98/dxdsf/blob/main/backend/src/scheduler/SchedulerService.ts"
click node_projectrunner "https://github.com/dimah98/dxdsf/blob/main/backend/src/runner/ProjectRunner.ts"
click node_browser "https://github.com/dimah98/dxdsf/blob/main/backend/src/browserManager.ts"
click node_engine "https://github.com/dimah98/dxdsf/blob/main/backend/src/engine/BotEngine.ts"
click node_nodehandlers "https://github.com/dimah98/dxdsf/blob/main/backend/src/nodes/index.ts"
click node_websocket "https://github.com/dimah98/dxdsf/blob/main/backend/src/websocket/wsHandlers.ts"
click node_inventory "https://github.com/dimah98/dxdsf/blob/main/backend/src/inventory-overview/InventoryReader.ts"
click node_notifications "https://github.com/dimah98/dxdsf/blob/main/backend/src/notifications/NotificationService.ts"
click node_android "https://github.com/dimah98/dxdsf/blob/main/sl-bot-remote/app/src/main/java/ua/diperon/slbotremote/BotApiService.kt"
click node_androiddash "https://github.com/dimah98/dxdsf/blob/main/sl-bot-remote/app/src/main/java/ua/diperon/slbotremote/DashboardScreen.kt"
click node_masslaunch "https://github.com/dimah98/dxdsf/blob/main/backend/src/runner/MassLaunchRunner.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_editor,node_projectui,node_projecthook,node_projectcontroller,node_projectfiles,node_scheduleui,node_scheduleroutes,node_user toneBlue
class node_projectrunner,node_browser,node_engine,node_nodehandlers toneAmber
class node_scheduler,node_websocket,node_inventory,node_notifications,node_masslaunch toneMint
class node_android,node_androiddash toneRose
class node_game toneIndigo
```

## Components

### Project authoring

- [Flow editor](https://github.com/dimah98/dxdsf/blob/main/frontend/src/components/NodeEditor.tsx): `frontend/src/components/NodeEditor.tsx`
- [Project manager](https://github.com/dimah98/dxdsf/blob/main/frontend/src/components/ProjectManagerModal.tsx): `frontend/src/components/ProjectManagerModal.tsx`
- [Project manager hook](https://github.com/dimah98/dxdsf/blob/main/frontend/src/hooks/useProjectManager.ts): `frontend/src/hooks/useProjectManager.ts`
- [Project API](https://github.com/dimah98/dxdsf/blob/main/backend/src/controllers/projectsController.ts): `backend/src/controllers/projectsController.ts`
- [Project files](https://github.com/dimah98/dxdsf/blob/main/backend/src/constants.ts): `backend/src/constants.ts`
- [Schedule manager](https://github.com/dimah98/dxdsf/blob/main/frontend/src/components/ScheduleManager.tsx): `frontend/src/components/ScheduleManager.tsx`
- [Schedule API](https://github.com/dimah98/dxdsf/blob/main/backend/src/routes/scheduleRoutes.ts): `backend/src/routes/scheduleRoutes.ts`

### Bot runtime

- [Project runner](https://github.com/dimah98/dxdsf/blob/main/backend/src/runner/ProjectRunner.ts): `backend/src/runner/ProjectRunner.ts`
- [Browser sessions](https://github.com/dimah98/dxdsf/blob/main/backend/src/browserManager.ts): `backend/src/browserManager.ts`
- [Bot engine](https://github.com/dimah98/dxdsf/blob/main/backend/src/engine/BotEngine.ts): `backend/src/engine/BotEngine.ts`
- [Automation nodes](https://github.com/dimah98/dxdsf/blob/main/backend/src/nodes/index.ts): `backend/src/nodes/index.ts`

### Operations

- [Scheduler service](https://github.com/dimah98/dxdsf/blob/main/backend/src/scheduler/SchedulerService.ts): `backend/src/scheduler/SchedulerService.ts`
- [Live updates](https://github.com/dimah98/dxdsf/blob/main/backend/src/websocket/wsHandlers.ts): `backend/src/websocket/wsHandlers.ts`
- [Inventory overview](https://github.com/dimah98/dxdsf/blob/main/backend/src/inventory-overview/InventoryReader.ts): `backend/src/inventory-overview/InventoryReader.ts`
- [Notifications](https://github.com/dimah98/dxdsf/blob/main/backend/src/notifications/NotificationService.ts): `backend/src/notifications/NotificationService.ts`
- [Mass launches](https://github.com/dimah98/dxdsf/blob/main/backend/src/runner/MassLaunchRunner.ts): `backend/src/runner/MassLaunchRunner.ts`

### Remote clients

- [Android companion](https://github.com/dimah98/dxdsf/blob/main/sl-bot-remote/app/src/main/java/ua/diperon/slbotremote/BotApiService.kt): `sl-bot-remote/app/src/main/java/ua/diperon/slbotremote/BotApiService.kt`
- [Remote dashboard](https://github.com/dimah98/dxdsf/blob/main/sl-bot-remote/app/src/main/java/ua/diperon/slbotremote/DashboardScreen.kt): `sl-bot-remote/app/src/main/java/ua/diperon/slbotremote/DashboardScreen.kt`

### Other components

- **User**
- **Sunflower Land**

## Connections

- User → Flow editor: edits flows
- User → Project manager: manages projects
- Flow editor → Project manager hook: edits project
- Project manager → Project manager hook: saves or loads
- Project manager hook → Project API: HTTP requests
- Project API → Project files: reads and writes
- Project API → Project runner: starts or stops
- Project runner → Browser sessions: obtains session
- Bot engine → Automation nodes: dispatches nodes
- Automation nodes → Sunflower Land: automates browser
- Browser sessions → Sunflower Land: controls page
- Schedule manager → Schedule API: HTTP requests
- Schedule API → Scheduler service: manages scheduled runs
- Schedule API → Project files: updates settings
- Android companion → Remote dashboard: provides API client
- Android companion → Project API: calls project API
- Android companion → Schedule API: calls schedule API
- Mass launches → Project runner: launches projects
