Flowork OS — Complete System Architecture Overview

📘 General javascript v2 Updated

Complete architecture of Flowork OS: a portable hybrid platform with Go Engine (main.go), Electron GUI (main.js), and Cloudflare Website. The engine communicates via REST API on Port 5000 and WebSocket on Port 5001.

What is Flowork OS?

Flowork OS is a portable hybrid automation platform that combines a compiled Go backend, an Electron desktop shell, and a Cloudflare-hosted web interface into a single ecosystem. It enables users to build apps, automate workflows, and control browser instances — all powered by an AI assistant.

The Three Layers

Layer 1: Go Engine (main.go)

The heart of Flowork. A single Go binary (flowork-engine.exe, 18MB) that:
  • Serves a REST API on Port 5000 using GoFiber
  • Manages file I/O for apps and nodes
  • Executes terminal commands
  • Orchestrates workflow DAGs
  • Packages apps into encrypted .flow containers
  • Handles licensing, auto-updates, and crash recovery

Layer 2: Electron GUI (main.js + gui.exe)

A Chromium-based desktop shell that:
  • Loads the Flowork website UI in a BrowserWindow
  • Exposes native OS APIs via preload.js (contextBridge)
  • Runs a WebSocket server on Port 5001 for AI browser automation
  • Manages multiple BrowserView instances for the browser farm
  • Supports system tray, splash screen, and log viewer

Layer 3: Cloudflare Website

A Vue 3 SPA deployed on Cloudflare Pages that:
  • Serves as the public marketing site AND the in-app UI
  • Uses Cloudflare Functions for SSR (SEO-optimized pages)
  • Stores data in Cloudflare KV (blog, KB, app registry)
  • Handles authentication, licensing, and payment

Communication Flow

User → Electron GUI → Website (Vue SPA) → Go Engine (Port 5000)
                    ↕                      ↕
              WebSocket (5001)        Cloudflare KV

The website runs inside Electron and communicates with the Go engine via HTTP requests to localhost:5000. The AI assistant connects via WebSocket on Port 5001 to control browser tabs.

Portability

Everything is portable. The engine locks its working directory to the .exe location using initEngineDir(). All user data lives in FloworkData/ next to the binary. No registry entries, no AppData dependencies.

Version History

Version Date Changes
v2 2026-04-01 Initial KB generation — comprehensive Flowork documentation