Skip to content

GhostFlow is a local-first AI orchestration platform that lets you build, deploy, and manage AI-powered workflows. Think n8n meets LangChain, but faster, type-safe, and fully under your control.

License

Notifications You must be signed in to change notification settings

GhostKellz/ghostflow

Repository files navigation

GhostFlow πŸ‘»

GhostFlow Logo

Open-Source AI Orchestration Platform The DeepSeek to n8n's OpenAI - Local-first, Developer-focused, Rust-powered

Rust License Status Docker


🎯 What is GhostFlow?

GhostFlow is a local-first AI orchestration platform that lets you build, deploy, and manage AI-powered workflows. Think n8n meets LangChain, but faster, type-safe, and fully under your control.

Key Features

  • πŸš€ Rust Performance - Blazing fast execution with minimal resource usage
  • 🏠 Local-First - Run entirely on your hardware, no cloud required
  • πŸ€– AI Native - Built-in Ollama, LiteLLM, and Jarvis integration
  • πŸ”Œ Extensible - Easy node development with full type safety
  • 🐳 Docker Ready - One-command deployment with docker-compose
  • 🎨 Visual Editor - Leptos-powered web UI (100% Rust)
  • πŸ”’ Secure - Air-gapped friendly, zero-trust architecture

πŸš€ Quick Start

Using Docker (Recommended)

# Clone the repository
git clone https://github.com/ghostkellz/ghostflow
cd ghostflow

# Start GhostFlow in development mode
./scripts/start.sh dev

# Access the platform
# UI: http://localhost:8080
# API: http://localhost:3000

Manual Setup

# Prerequisites: Rust 1.75+, PostgreSQL, Ollama (optional)

# Build the project
cargo build --release

# Run migrations
sqlx migrate run --database-url postgresql://ghostflow:ghostflow@localhost/ghostflow

# Start the server
cargo run --bin ghostflow-server

# In another terminal, start the UI
cargo run --bin ghostflow-ui

πŸ“¦ Architecture

ghostflow/
β”œβ”€β”€ crates/
β”‚   β”œβ”€β”€ ghostflow-core/       # Core traits and types
β”‚   β”œβ”€β”€ ghostflow-schema/     # Flow schemas and models
β”‚   β”œβ”€β”€ ghostflow-engine/     # Execution engine
β”‚   β”œβ”€β”€ ghostflow-nodes/      # Built-in nodes
β”‚   β”œβ”€β”€ ghostflow-api/        # REST/WebSocket API
β”‚   β”œβ”€β”€ ghostflow-ui/         # Leptos web UI
β”‚   β”œβ”€β”€ ghostflow-jarvis/     # Jarvis CLI integration
β”‚   β”œβ”€β”€ ghostflow-server/     # Main server binary
β”‚   └── ghostflow-cli/        # gflow CLI tool
β”œβ”€β”€ migrations/               # PostgreSQL migrations
β”œβ”€β”€ docker-compose.yml        # Docker orchestration
└── Dockerfile               # Multi-stage build

🎯 Available Nodes

Core Nodes

  • HTTP Request - Make API calls with full request control
  • Webhook - Receive incoming HTTP requests
  • Template - Process templates with variable substitution
  • If/Else - Conditional flow control
  • Delay - Time-based flow control

AI/LLM Nodes

  • Ollama Generate - Local LLM text generation
  • Ollama Embeddings - Generate vector embeddings
  • Jarvis Command - Execute Rust CLI automation

Coming Soon

  • Database Query (PostgreSQL, MySQL, SQLite)
  • Vector Database (Qdrant, Weaviate)
  • Email (SMTP/IMAP)
  • Slack/Discord
  • OpenAI/Anthropic

πŸ› οΈ Development

Creating a Custom Node

use ghostflow_core::{Node, Result};
use async_trait::async_trait;

pub struct MyCustomNode;

#[async_trait]
impl Node for MyCustomNode {
    fn definition(&self) -> NodeDefinition {
        // Define inputs, outputs, and parameters
    }
    
    async fn execute(&self, context: ExecutionContext) -> Result<Value> {
        // Your node logic here
    }
}

Running Tests

# Run all tests
cargo test

# Run specific crate tests
cargo test -p ghostflow-engine

# Run with logging
RUST_LOG=debug cargo test

🐳 Docker Services

The docker-compose setup includes:

  • PostgreSQL - Flow and execution storage
  • MinIO - S3-compatible artifact storage
  • Ollama - Local LLM runtime
  • GhostFlow - Main application
  • Adminer - Database UI (dev only)

πŸ“š API Documentation

REST Endpoints

GET    /api/flows              # List all flows
POST   /api/flows              # Create new flow
GET    /api/flows/:id          # Get flow details
PUT    /api/flows/:id          # Update flow
DELETE /api/flows/:id          # Delete flow
POST   /api/flows/:id/execute  # Execute flow

GET    /api/executions         # List executions
GET    /api/executions/:id     # Get execution details

GET    /api/nodes              # List available nodes

WebSocket

Connect to /ws for real-time execution updates.

🀝 Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

Areas We Need Help

  • Additional node implementations
  • UI/UX improvements
  • Documentation
  • Testing
  • Performance optimization

πŸ“‹ Roadmap

See TODO.md for detailed roadmap and progress.

Current Priorities

  • βœ… Core execution engine
  • βœ… Basic nodes
  • βœ… Docker setup
  • 🚧 Web UI improvements
  • 🚧 More AI integrations
  • πŸ“… Authentication & RBAC
  • πŸ“… Distributed execution

πŸ™ Acknowledgments

Built with amazing open-source projects:

  • Rust - Systems programming language
  • Leptos - Full-stack Rust web framework
  • Axum - Web application framework
  • Ollama - Local LLM runtime
  • PostgreSQL - Database

πŸ“„ License

MIT License - see LICENSE for details.


Built with ❀️ by the GhostFlow Community
Fast. Flexible. Fully yours.

Documentation | Discord | Twitter

About

GhostFlow is a local-first AI orchestration platform that lets you build, deploy, and manage AI-powered workflows. Think n8n meets LangChain, but faster, type-safe, and fully under your control.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published