Skip to content

Latest commit

ย 

History

97 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation


โšก Nodus

The Next-Gen Autonomous AI Workflow & Browser Orchestration Platform

The power of n8n & Zapier, supercharged with autonomous AI browser agents, multi-language cloud sandboxes, durable DAG execution, encrypted credential vaulting, and real-time multiplayer collaboration.

Core Pillarsย ย โ€ขย ย  Comparisonย ย โ€ขย ย  Credential Vaultย ย โ€ขย ย  Node Ecosystemย ย โ€ขย ย  Command Paletteย ย โ€ขย ย  Architectureย ย โ€ขย ย  Engineeringย ย โ€ขย ย  Quick Start


Next.js 16ย  React 19ย  TypeScriptย  Trigger.devย  E2Bย  Stagehandย  Browserbaseย  Liveblocksย  Neonย  Drizzleย  Clerkย  Sentry


Nodus Visual Workflow Canvas

Design complex automations together on a real-time multiplayer canvas, execute isolated Python/JS scripts in secure cloud sandboxes, manage encrypted API keys in the Credential Vault, and observe step-by-step video replays.



๐ŸŒŸ The Vision

Traditional automation tools like Zapier and Make excel at standard API webhooks, but break whenever a website lacks a public API or requires custom code and human-like interactions. On the other hand, classic browser automation scripts (Puppeteer, Playwright) break the moment a CSS selector changes and lack visual workflow management.

Nodus bridges this gap completely.

It combines:

  1. Visual DAG Flow Control & Data Routing (like n8n)
  2. Universal Triggers & Webhook Integrations (like Zapier)
  3. Isolated Multi-Language Cloud Sandboxes (E2B Python & JavaScript)
  4. Encrypted Zero-Trust Credential Vault (AES-256-GCM Secret Store)
  5. Autonomous AI-Driven Browser Infrastructure (Stagehand + Browserbase)
  6. Real-time Multiplayer Collaboration (Figma for Automations)
  7. Fault-Tolerant Background Execution (Trigger.dev v4)

Whether you are scraping dynamic SPAs behind logins, running data processing scripts in isolated sandboxes, automating enterprise SaaS workflows without APIs, or orchestrating multi-step AI pipelinesโ€”Nodus provides a single, unified visual platform.


๐Ÿ’Ž The 5 Pillars of Nodus

mindmap
  root((โšก NODUS))
    Visual DAG Engine (n8n)
      Multi-branch Parallel Forks
      Diamond Convergence (Merge/Join)
      Loop & Iteration Control (forEach/while/until)
      Winner-Takes-All Branch Pruning
      Multi-Condition If/Else & Switch
    Cloud Code & Sandbox Execution (E2B)
      JavaScript & TypeScript Sandbox
      Python 3 Data Processing
      Real-Time Infinite Loop Detection
      Custom Theme-Matched CodeMirror
    Encrypted Credential Vault
      AES-256-GCM Ciphertext Storage
      Organization-Scoped Key-Value Secrets
      Dynamic {{ secrets.KEY }} Token Chips
      Pre-flight Missing Secret Validation
      Automatic E2B Sandbox Env Injection
    Autonomous AI Browser Agents
      Natural Language Browser Actions
      Schema-Driven AI Extraction
      Dynamic Element Observation
      Full Video Session Replays
    Multiplayer Realtime Collaboration
      Live Collaborative Canvas (Liveblocks)
      Real-Time Cursors & Presence
      Instant State Conflict Resolution
      Multi-Tenant Org Isolation (Clerk)
Loading

๐Ÿ“Š Nodus vs. Traditional Platforms

Capability Zapier / Make n8n Raw Selenium / Playwright โšก Nodus
Visual Flow Canvas โœ… โœ… โŒ ๐ŸŸข Yes (React Flow)
Real-time Multiplayer Collaboration โŒ โŒ โŒ ๐ŸŸข Yes (Liveblocks Cursors & Sync)
Encrypted Credential Vault โš ๏ธ Global only โš ๏ธ Basic โŒ ๐ŸŸข Yes (AES-256-GCM Org Vault)
Multi-Language Cloud Sandboxes โš ๏ธ Basic JS โš ๏ธ Local node โŒ ๐ŸŸข Yes (E2B Isolated JS & Python)
Live Infinite Loop Analysis โŒ โŒ โŒ ๐ŸŸข Yes (Real-time AST Linter)
AI Autonomous Browser Actions โŒ โŒ โŒ ๐ŸŸข Yes (Stagehand v4 AI)
Handling Sites Without APIs โŒ โŒ โš ๏ธ Brittle selectors ๐ŸŸข Yes (Natural Language & Vision)
Video Session Replays of Runs โŒ โŒ โŒ ๐ŸŸข Yes (Browserbase HLS Replays)
Multi-Branch DAG & Sibling Pruning โš ๏ธ Limited โœ… โš ๏ธ Code only ๐ŸŸข Yes (Topological DAG Engine)
Looping & Iteration Control โš ๏ธ Limited โœ… โš ๏ธ Code only ๐ŸŸข Yes (Loop Primitive with 4 Modes)
Workflow Portability (JSON Export/Import) โš ๏ธ Proprietary โœ… โŒ ๐ŸŸข Yes (Validated Zod Schema)
Durable Long-Running Cloud Tasks โš ๏ธ Timeout caps โš ๏ธ Self-hosted โš ๏ธ DIY Infra ๐ŸŸข Yes (Trigger.dev v4 Workers)

๐Ÿ” Encrypted Credential Vault

Security is paramount in automated workflows. Nodus includes a built-in, organization-scoped Zero-Trust Credential Vault:

flowchart LR
    User["User in UI"] -->|Input Secret Key & Value| VaultModal["Credential Vault Dialog"]
    VaultModal -->|Server Action| Server["Server Cryptography Engine"]
    Server -->|AES-256-GCM + Random 12-byte IV| DB[("Neon Postgres (Encrypted Row)")]
    
    subgraph Execution_Time["At Workflow Execution Time"]
        Runner["Trigger.dev Worker"] -->|Fetch & Decrypt in Memory| Decrypt["AES-256-GCM Decrypt"]
        Decrypt -->|Interpolate {{ secrets.KEY }}| ActionExecutors["HTTP / Email / Resend"]
        Decrypt -->|Inject env vars| Sandboxes["E2B Python & JS MicroVMs"]
    end
Loading

Key Vault Features:

  1. AES-256-GCM Symmetric Encryption: Every secret value is encrypted using standard AES-256-GCM with authenticated data tags and unique 12-byte initialization vectors (IV), preventing tampering and plaintext exposure in database records.
  2. Organization-Scoped Multitenancy: Credentials strictly belong to the active Clerk organization (orgId). Workspaces cannot access or query foreign credentials.
  3. Universal {{ secrets.KEY }} Token Insertion: Insert vault secrets into any input field, headers, or body payloads via the token insertion dropdown. Pills render with a branded Gold Lock icon badge.
  4. Automatic Cloud Sandbox Injection: When executing code nodes, all organization secrets are automatically injected as environment variables in the E2B microVM (process.env.KEY in JS / os.environ["KEY"] in Python).
  5. Reactive UI Warning & Missing Secret Chips: If a secret is deleted from the vault, all canvas input fields referencing that secret immediately update to render a red warning chip: [ โš ๏ธ Missing Secret ยท KEY ].
  6. Pre-Flight Validation Engine: Workflows validate secret existence before triggering tasks. If any required secret is missing, execution is halted with an informative alert before consuming compute credits.

๐Ÿงฉ Workflow Node Ecosystem

Nodus features 20 production-ready nodes arranged in a clean, decoupled 3-Suite Modular Taxonomy:

features/workflows/system/suites/
โ”œโ”€โ”€ flow/                             # Graph topology, branching, loops, and control flow primitives
โ”œโ”€โ”€ core/                             # Compute sandboxes and network execution primitives
โ””โ”€โ”€ apps/                             # Third-party integrations and browser agent tools

1. Flow Suite (Graph Topology & Control Flow)

Node Type Kind Description Key Outputs
Start start trigger Workflow entrypoint for manual canvas runs, scheduled triggers, and webhooks. timestamp
If / Else if action Evaluates multi-condition rule sets (AND/OR, regex, numeric comparisons, null checks) and routes to True or False branch handles. result, branch, reason
Switch switch action Multi-handle router directing execution across custom case branches or a default fallback branch. routeIndex, matchedValue
Loop loop action Iterates across lists or repeats execution in for_each, count, while, or until modes with dedicated loop-body and done output handles. item, index, iteration, isLast, totalItems
Merge / Join merge action Synchronizes parallel branch convergence supporting first (winner-takes-all pass-through), combine (map results), and array (flatten) modes. mergedData, branchCount, winner
Wait / Delay wait action Suspends execution durably for a specified duration in seconds before resuming. waitedSeconds, resumedAt
Throw Error throw-error action Intentionally halts workflow execution with a custom error message for dead-letter handling. errorMessage, failedAt

2. Core Suite (Code Sandboxes & Network Primitives)

Node Type Kind Description Key Outputs
JavaScript js-code action Executes JavaScript / TypeScript in an isolated E2B cloud sandbox. Features live AST infinite loop detection, smart async IIFE wrapping, and token interpolation. result, stdout, stderr
Python python-code action Executes Python 3 in an isolated E2B cloud sandbox with math, data transformation, and scripting capabilities. result, stdout, stderr
HTTP Request http-request action Performs REST API requests (GET, POST, PUT, DELETE, PATCH) with custom headers, query params, and JSON payloads. status, data, headers

3. Apps Suite (Third-Party Integrations & Cloud Browser Automation)

Category Node Type Kind Description Key Outputs
Browserbase Open URL open-url action Navigates the cloud browser session to a destination URL. url, pageTitle, status
Browserbase Act act action Executes natural-language actions ("Click the Sign In button", "Type %password% into input"). success, message, currentUrl
Browserbase Extract extract action Extracts structured data from web pages using natural language and strict Zod JSON schemas. extraction, itemCount
Browserbase Observe observe action Discovers interactive elements matching a description and returns candidate selectors. matches, selector, description
Browserbase Agent agent action Autonomous multi-step agent that plans and executes complex end-to-end web tasks. success, message, completedSteps
Stripe Stripe Webhook stripe-trigger trigger Listens for real-time Stripe billing events (payment_intent.succeeded, subscription.created). event, customerId, amount, currency
Google Forms Google Forms Webhook google-form-trigger trigger Receives live Google Forms submissions via webhook payloads. responses, email, timestamp
Resend Send Email send-email action Delivers transactional HTML emails via Resend with vault API key resolution. emailId, status
Slack Slack Webhook slack action Sends notification messages and structured payloads to Slack channels. messageContent, success
Discord Discord Webhook discord action Sends rich formatted messages and alerts directly to Discord channels. content, success

๐Ÿ—‚๏ธ Hierarchical Command Palette & Zero-Node Memory Footprint

To scale to thousands of integrations without client memory degradation, Nodus uses a Hierarchical Command Palette Drawer with on-demand chunk loading:

flowchart TD
    Root["Right Sidebar: Palette"] -->|Click Flow or Core| Direct["Direct Suite View (Flow / Core)"]
    Root -->|Click Apps| AppsList["Apps Category Directory"]
    AppsList -->|Click App (e.g. Stripe, Slack)| Category["Category View (e.g. Stripe)"]
    
    Direct --> TriggersDirect["Accordion: Triggers"]
    Direct --> ActionsDirect["Accordion: Actions"]
    
    Category --> TriggersApp["Accordion: Triggers"]
    Category --> ActionsApp["Accordion: Actions"]
Loading

Key Innovations:

  • Zero-Node Initial Memory: When browsing suites or app categories, 0 node manifests or executors are loaded into heap memory. Only pure metadata (IDs, brand icons, and count badges) is initially present.
  • On-Demand Dynamic Imports: Clicking into an active suite or category triggers dynamic import() loaders (loadPaletteNodeGroup) cached in a module map.
  • Code-Split Sidebar Inspector: The node property inspector is loaded dynamically with next/dynamic and skeleton fallbacks, keeping token input libraries completely unloaded during canvas navigation.
  • Store Hook Decoupling: Canvas dimensions are read non-reactively via useStoreApi().getState() during node placement, eliminating re-renders when the sidebar is resized.

๐Ÿ—๏ธ System Architecture

flowchart TD
    subgraph Client["Frontend Layer (Next.js 16 + React 19)"]
        UI["Visual Canvas (React Flow)"]
        Palette["Hierarchical Command Palette Drawer"]
        Inspector["Right Sidebar Inspector & CodeMirror 6"]
        LB_Client["Liveblocks Real-Time Client"]
        Console["Live Run Console & Video Replay"]
    end

    subgraph Auth_Data["Auth & Persistence Layer"]
        Clerk["Clerk Auth & Billing (RBAC & Plans)"]
        Postgres[("Neon Serverless Postgres\n(Drizzle ORM)")]
        Vault[("AES-256-GCM Vault Secrets")]
        LB_Cloud["Liveblocks Cloud (Presence & Room Storage)"]
    end

    subgraph Execution["Durable Execution Engine (Trigger.dev v4)"]
        Runner["runWorkflowTask (Topological DAG Runner)"]
        MergeSync["Merge Synchronizer & Branch Pruner"]
        Executors["Node Executors Registry"]
    end

    subgraph Cloud_Sandboxes["E2B Code Sandboxes"]
        E2B_JS["E2B JavaScript / TypeScript Sandbox"]
        E2B_PY["E2B Python 3 Sandbox"]
    end

    subgraph Browser_Infra["Autonomous Cloud Browser Layer"]
        BB["Browserbase Cloud Sessions"]
        Stagehand["Stagehand v4 AI Engine"]
    end

    UI <-->|Real-time Sync| LB_Client
    LB_Client <--> LB_Cloud
    UI -->|Mutations & Auth| Clerk
    UI -->|Persist Graph & Secrets| Postgres
    Postgres -.-> Vault

    UI -->|Trigger Run| Runner
    Runner -->|Pre-flight Secret Decryption| Vault
    Runner --> MergeSync
    Runner --> Executors
    Executors -->|Code Execution + Injected Secrets| E2B_JS
    Executors -->|Code Execution + Injected Secrets| E2B_PY
    Executors -->|Browser Automation| Stagehand
    Stagehand -->|Managed Browser & Recording| BB
    Runner -.->|Live SSE Step Events| Console
    BB -.->|Proxied HLS Video Replay| Console
Loading

โšก Technical & Engineering Innovations

1. Granular Execution Store with useSyncExternalStore

To prevent live Trigger.dev streaming events from causing full graph re-render cascades:

  • WorkflowRunsProvider exposes a slice-based external store with referential snapshot caching.
  • StepNode and WorkflowEdge subscribe exclusively to their own computed status (useNodeRunStatus and useEdgeRunStatus).
  • Result: Canvas re-renders during live runs are reduced by over 90%, ensuring a locked 60 FPS animation frame rate even during heavy parallel streaming.

2. Isolated Cloud Sandboxes with Smart Code Wrapping

Rather than executing arbitrary code on worker instances, scripts execute inside isolated E2B microVMs:

  • Smart Wrapper: Automatically wraps top-level return statements in async IIFEs while preserving root-level ES import statements.
  • Strict Teardown: Sandbox destruction is guaranteed via finally { await sandbox.kill() }, preventing leaked cloud containers.
  • User-Friendly Error Formatting: Replaces raw internal timeout flags with clear error explanations pointing to potential infinite loops.

3. Real-Time AST Infinite Loop Detection

An integrated client-side static analyzer inspects code as the user types in CodeMirror:

  • Detects unbounded while (true) / while True:, for (;;), and invariant loop variables.
  • Renders non-intrusive amber warning banners with line numbers before execution occurs.

4. Structural Digest Hashing for 60 FPS Canvas Panning & Dragging

React Flow triggers coordinate changes on every frame (60โ€“120fps). To eliminate costly graph re-traversals during dragging:

  • We compute a deterministic structural fingerprint (nodeId#nodesDigest#edgesDigest).
  • BFS traversal, upstream token generation, and switch edge pruning are completely decoupled from (x, y) coordinates.
  • Memoized store selectors with custom equality checking (equalityFn) prevent the Inspector and sidebar from re-rendering during node movement.

5. Single-Winner Branch Pruning

When workflows split into parallel execution paths (e.g. attempting 3 fallback login methods), the MergeSynchronizer dynamically tracks sibling branch lifecycles:

  • As soon as the first winning branch finishes, all sibling branches in the queue are cancelled in real time.
  • Prevents wasteful compute and eliminates race conditions.

๐Ÿ› ๏ธ Tech Stack


๐Ÿ Quick Start

Prerequisites

1. Clone & Install

git clone https://github.com/your-username/nodus.git
cd nodus
npm install

2. Configure Environment

cp .env.example .env.local

Ensure all keys are provided in .env.local:

# App Public URL (Used for webhook destination URLs & callbacks)
NEXT_PUBLIC_APP_URL=http://localhost:3000

# Clerk Authentication & Organization Billing
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_...
CLERK_SECRET_KEY=sk_test_...
NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up
NEXT_PUBLIC_CLERK_SIGN_IN_FALLBACK_REDIRECT_URL=/workflows
NEXT_PUBLIC_CLERK_SIGN_UP_FALLBACK_REDIRECT_URL=/workflows

# Neon Serverless Postgres Database
DATABASE_URL=postgres://user:password@ep-xyz-pooler.us-east-2.aws.neon.tech/neondb?sslmode=require
DATABASE_URL_UNPOOLED=postgres://user:password@ep-xyz.us-east-2.aws.neon.tech/neondb?sslmode=require

# Trigger.dev Background Execution Task Runner
TRIGGER_SECRET_KEY=tr_dev_...

# Organization Credential Vault (AES-256-GCM 32-byte master key - generate via `openssl rand -hex 32`)
VAULT_MASTER_KEY=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef

# E2B Cloud Code Sandbox (JavaScript & Python)
E2B_API_KEY=e2b_...

# Liveblocks Real-Time Multiplayer Collaboration
NEXT_PUBLIC_LIVEBLOCKS_PUBLIC_KEY=pk_liveblocks_...
LIVEBLOCKS_SECRET_KEY=sk_liveblocks_...

# Browserbase Cloud Browsers & Observability
BROWSERBASE_API_KEY=bb_...
BROWSERBASE_PROJECT_ID=...

# Gemini AI (Powers Stagehand v4 Autonomous Browser Agents)
GEMINI_API_KEY=AIzaSy...

# Resend Transactional Email
RESEND_API_KEY=re_...

# Sentry Monitoring & Error Reporting (Optional)
NEXT_PUBLIC_SENTRY_DSN=https://...
SENTRY_DSN=https://...
SENTRY_AUTH_TOKEN=...
SENTRY_ORG=...
SENTRY_PROJECT=...

3. Push Database Schema

npm run db:push

4. Start the Trigger.dev Task Runner

npm run trigger:dev

5. Start the Web App

npm run dev

Navigate to http://localhost:3000 and build your first workflow.


๐Ÿ—บ๏ธ Product Roadmap

  • Core Visual Canvas with React Flow & Liveblocks
  • Stagehand v4 AI Browser Actions & Autonomous Agent
  • Browserbase Video Session Replays
  • Control Flow Suite (If/Else, Switch, Merge/Join, Wait, Throw Error)
  • Loop & Batch Iteration Nodes (forEach, count, while, until)
  • Multi-Language Cloud Code Sandboxes (JavaScript, Python via E2B)
  • Real-Time Static Infinite Loop Detection & CodeMirror 6 Editor
  • Hierarchical Command Palette Drawer with Zero-Node Memory Footprint
  • Universal JSON Workflow Import / Export Engine
  • Credential Vault (AES-256-GCM Encrypted Secret Manager)
  • Performance-Optimized Granular Execution Store (useSyncExternalStore)
  • Multi-Agent Orchestration Teams (Supervisor + Specialized Subagents)
  • Pre-built Connector Marketplace (Notion, GitHub, PostgreSQL, Linear)

๐Ÿงช Verification & Test Suite

# Run all unit and integration tests (188 tests passing across 52 suites)
npm test

# Run system parity integrity verification test
npx tsx --test features/workflows/system/parity.test.ts

# Run TypeScript typecheck
npm run typecheck

# Run Next.js production build
npm run build

๐Ÿ“„ License

This project is licensed under the MIT License.


Designed & Developed with โค๏ธ. Star โญ the repository if you find it inspiring!

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages