๐๏ธ Architecture
FlowyML Notebook is a full-stack application with a Python backend, React frontend, and a reactive execution engine at its core.
Live DAG visualization of cell dependencies with execution state indicators
System Overview
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Browser โ
โ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ
โ โ Editor โ โ Sidebar โ โ DataFrame โ โ DAG View โ โ
โ โ (Monaco) โ โ & Nav โ โ Explorer โ โ (ReactFlow) โ โ
โ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Tools Panel โ โ
โ โ Profile โ Benchmark โ Quality โ Lint โ History โ Env โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ React + Vite โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ WebSocket + REST API (157 endpoints)
โโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ FastAPI Server โ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Cell Mgmt โ โ File I/O โ โ GitHub Sync โ โ
โ โ API โ โ (notebooks) โ โ (Collaboration) โ โ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโ โ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโ โ
โ โ AI Assistant โ โ Recipes โ โ FlowyML Connector โ โ
โ โ API โ โ Store โ โ (Remote Exec) โ โ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Killer Features โ 13 modules โ โ
โ โ Profiler ยท Benchmark ยท DataValidator ยท CodeAnalyzer โ โ
โ โ ExecHistory ยท Lineage ยท Environment ยท PackageInstaller โ โ
โ โ IpynbConverter ยท Diff ยท Snippets ยท CellDeps ยท Search โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Core Engine โ
โ โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Python Kernel โ โ Reactive Graph (DAG) โ โ
โ โ (IPython-based) โ โ โโโโโโโ โโโโโโโ โโโโโโโ โ โ
โ โ โ โ โ A โโโโ B โโโโ C โ โ โ
โ โ - Cell exec โ โ โโโโโโโ โโโโฌโโโ โโโโโโโ โ โ
โ โ - Namespace โ โ โ โ โ
โ โ - Auto-imports โ โ โโโโโโโ โโโโดโโโ โ โ
โ โ - SQL engine โ โ โ D โโโโ E โ โ โ
โ โ โ โ โโโโโโโ โโโโโโโ โ โ
โ โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Reactive Execution Engine
The heart of FlowyML Notebook is the ReactiveGraph โ a DAG that tracks which cells read and write which variables.
How It Works
Parse : When a cell is created or modified, the engine performs AST analysis on the source code to detect variable reads and writes.
Graph Update : The dependency graph is updated with the new read/write sets.
Propagate : When a cell is executed, the engine identifies all downstream dependents via topological sort.
Execute : Dependent cells are re-executed in dependency order, skipping any cells whose inputs haven't changed.
Execution States
State
Meaning
idle
Cell is up-to-date
stale
An upstream dependency has changed; needs re-execution
running
Cell is currently executing
error
Last execution produced an error
disabled
Cell is excluded from the reactive graph
Notebooks are stored as standard Python files (.py) with metadata encoded in decorators and comments:
# FlowyML Notebook: my_analysis
# Version: 1
# Created: 2026-03-21
# @cell(id="imports", name="Setup")
import pandas as pd
import numpy as np
# @cell(id="load", name="Load Data", depends=["imports"])
df = pd . read_csv ( "data.csv" )
print ( f "Loaded { len ( df ) } rows" )
# @cell(id="clean", name="Clean Data", depends=["load"])
df_clean = df . dropna ()
Benefits
Version Control : Clean git diff output
Importable : from my_notebook import df_clean
Lintable : Works with ruff, flake8, mypy
IDE Support : Full syntax highlighting and autocompletion
Frontend Architecture
The frontend is a React application built with Vite:
Component
Purpose
App.jsx
Main layout with resizable panels
CellEditor
Monaco-based code editor per cell
CellOutput
Renders all output types (text, charts, DataFrames)
DataFrameExplorer
Interactive data profiling with tabs
PipelineDAG
ReactFlow-based dependency visualization
Sidebar
Navigation, file tree, recipes, settings
ToolsPanel
6-tab analysis toolkit (Profile, Benchmark, Quality, Lint, History, Env)
SmartPrepPanel
Preprocessing advisor with code generation
AlgorithmMatchPanel
ML algorithm recommendations
ConnectionConfig
FlowyML instance connection UI
Key Dependencies
Library
Purpose
React 18
UI framework
Vite
Build tool with HMR
ReactFlow
DAG visualization
Recharts
Chart rendering
Framer Motion
Animations
Lucide React
Icon system
Extension Points
Custom Cell Types
In addition to Python and SQL, the cell system can be extended with new types by implementing the CellType enum and registering a handler in the kernel.
Recipe Plugins
Custom recipes can be added to the recipes_store to provide domain-specific templates (e.g., NLP preprocessing, time series, computer vision).
AI Providers
The AI assistant supports multiple backends (OpenAI, Google Generative AI) and can be extended with custom providers.