Skip to content

jorgeraad/metaflo

Repository files navigation

Metaflo: AI Workflow Engine

A powerful TypeScript-based workflow engine for orchestrating AI tasks, with a modern React frontend, GraphQL backend, and cloud-ready infrastructure.

Demo

Metaflo Demo

Features

  • 🔒 Type-Safe Workflows: Built with TypeScript for robust type checking and IDE support
  • 🌐 Multiple AI Providers: Supports OpenAI and Google's Generative AI (Gemini)
  • 🔍 Search Integration: Built-in support for search operations with Google Custom Search
  • 📊 Modern UI: React-based frontend with real-time workflow monitoring
  • 🚀 GraphQL API: Strong-typed API with comprehensive workflow operations
  • Easy Configuration: JSON-based workflow definitions with schema validation
  • 📈 Run History: Detailed execution history and task outputs
  • 🎯 Task Dependencies: Support for complex workflow dependencies
  • 🔄 Event-Driven Architecture: Decoupled system with event-based communication
  • ☁️ Cloud-Ready: Built with SST for seamless AWS deployment

Project Structure

├── packages/
│   ├── client/             # React frontend application
│   │   ├── src/           # Frontend source code
│   │   └── utils/           # Utility functions
│   ├── server/             # Backend server implementation
│   │   ├── src/           # Server source code
│   │       ├── db/        # Database abstraction layer
│   │       ├── events/    # Event-driven architecture
│   │       ├── graphql/   # GraphQL schema and resolvers
│   │       ├── lib/       # Core library code and AI clients
│   │       ├── services/  # Business logic services
│   │       ├── tasks/     # Task implementations
│   │       └── workflows/ # Workflow execution engine
│   ├── shared/             # Shared TypeScript types
│   └── auth/               # Authentication service
├── sst.config.ts           # SST deployment configuration
└── data/                   # Sample data and workflows

Prerequisites

  • Node.js >= 18
  • npm >= 8
  • API keys for:
    • OpenAI
    • Google (Gemini)
    • Google Custom Search

Quick Start

  1. Install dependencies:
# Install dependencies for all workspaces
npm install
  1. Set up environment variables:
# Copy and configure the environment file
cp packages/server/.env.example packages/server/.env
  1. Start the development servers:
# Start all services with SST
npm run dev

# Or start individual services
npm run dev:client
npm run dev:server
npm run dev:auth

Environment Variables

Required environment variables:

OPENAI_API_KEY=your_openai_key
GEMINI_API_KEY=your_gemini_key
GOOGLE_SEARCH_API_KEY=your_search_key
GOOGLE_SEARCH_ENGINE_ID=your_search_engine_id

Development Scripts

# Generate GraphQL types
npm run codegen

# Run tests
npm test

# Build all packages for production
npm run build

# Database migrations (server package)
npm run db:generate --workspace=metaflo-server
npm run db:push --workspace=metaflo-server

Technologies

  • Frontend: React, TypeScript
  • Backend: Node.js, TypeScript, GraphQL, Hono
  • Database: PostgreSQL with Drizzle ORM
  • Infrastructure: SST (AWS CDK)
  • AI Integration: OpenAI API, Google Gemini API
  • Authentication: OpenAuth.js

Current Status

Implemented Features

  • ✅ GraphQL API with comprehensive workflow operations
  • ✅ React-based workflow management UI
  • ✅ Multiple AI provider support (OpenAI, Gemini)
  • ✅ PostgreSQL and JSON file database support
  • ✅ Event-driven architecture
  • ✅ Search task integration
  • ✅ Workflow task for nested workflows
  • ✅ Authentication system
  • ✅ Task dependency management
  • ✅ Run history and task outputs

In Progress

  • ⚙️ Real-time workflow execution updates
  • ⚙️ Advanced error handling and recovery
  • ⚙️ Cloud deployment optimizations
  • ⚙️ Task result streaming
  • ⚙️ Performance optimizations

Planned Features

  • 📋 AI workflow optimization
  • 📋 Custom task type builder
  • 📋 Workflow templates
  • 📋 Collaborative features
  • 📋 Analytics dashboard

About

(Feb '25 - Apr '25) - A workflow engine for orchestrating AI tasks

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors