Initial commit: Complete Hive distributed AI orchestration platform

This comprehensive implementation includes:
- FastAPI backend with MCP server integration
- React/TypeScript frontend with Vite
- PostgreSQL database with Redis caching
- Grafana/Prometheus monitoring stack
- Docker Compose orchestration
- Full MCP protocol support for Claude Code integration

Features:
- Agent discovery and management across network
- Visual workflow editor and execution engine
- Real-time task coordination and monitoring
- Multi-model support with specialized agents
- Distributed development task allocation

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
anthonyrawlins
2025-07-07 21:44:31 +10:00
commit d7ad321176
2631 changed files with 870175 additions and 0 deletions

55
frontend/src/App.tsx Normal file
View File

@@ -0,0 +1,55 @@
function App() {
return (
<div className="min-h-screen bg-gradient-to-br from-blue-50 to-purple-50">
<div className="container mx-auto px-4 py-16">
<div className="text-center">
<div className="text-8xl mb-8">🐝</div>
<h1 className="text-6xl font-bold text-gray-900 mb-4">
Welcome to Hive
</h1>
<p className="text-2xl text-gray-700 mb-8">
Unified Distributed AI Orchestration Platform
</p>
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8 mt-16">
<div className="bg-white rounded-lg shadow-lg p-6">
<div className="text-4xl mb-4">🤖</div>
<h3 className="text-xl font-semibold mb-2">Multi-Agent Coordination</h3>
<p className="text-gray-600">
Coordinate specialized AI agents across your cluster for optimal task distribution
</p>
</div>
<div className="bg-white rounded-lg shadow-lg p-6">
<div className="text-4xl mb-4">🔄</div>
<h3 className="text-xl font-semibold mb-2">Workflow Orchestration</h3>
<p className="text-gray-600">
Visual n8n-compatible workflow editor with real-time execution monitoring
</p>
</div>
<div className="bg-white rounded-lg shadow-lg p-6">
<div className="text-4xl mb-4">📊</div>
<h3 className="text-xl font-semibold mb-2">Performance Monitoring</h3>
<p className="text-gray-600">
Real-time metrics, alerts, and dashboards for comprehensive system monitoring
</p>
</div>
</div>
<div className="mt-16 text-center">
<div className="text-lg text-gray-700 mb-4">
🚀 Hive is starting up... Please wait for all services to be ready.
</div>
<div className="text-sm text-gray-500">
This unified platform consolidates McPlan, distributed-ai-dev, and cluster monitoring
</div>
</div>
</div>
</div>
</div>
)
}
export default App

30
frontend/src/index.css Normal file
View File

@@ -0,0 +1,30 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
:root {
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
line-height: 1.5;
font-weight: 400;
color-scheme: light dark;
color: rgba(17, 24, 39, 0.87);
background-color: #ffffff;
font-synthesis: none;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-text-size-adjust: 100%;
}
body {
margin: 0;
min-width: 320px;
min-height: 100vh;
}
#root {
width: 100%;
min-height: 100vh;
}

10
frontend/src/main.tsx Normal file
View File

@@ -0,0 +1,10 @@
import React from 'react'
import ReactDOM from 'react-dom/client'
import App from './App.tsx'
import './index.css'
ReactDOM.createRoot(document.getElementById('root')!).render(
<React.StrictMode>
<App />
</React.StrictMode>,
)

View File

@@ -0,0 +1,120 @@
// n8n-style workflow interface
export interface N8nWorkflow {
id: string;
name: string;
description?: string;
nodes: N8nNode[];
connections: Record<string, any>;
active: boolean;
settings?: Record<string, any>;
staticData?: Record<string, any>;
createdAt: string;
updatedAt: string;
}
export interface N8nNode {
id: string;
name: string;
type: string;
position: [number, number];
parameters: Record<string, any>;
credentials?: Record<string, any>;
disabled?: boolean;
notes?: string;
retryOnFail?: boolean;
maxTries?: number;
waitBetweenTries?: number;
alwaysOutputData?: boolean;
executeOnce?: boolean;
continueOnFail?: boolean;
}
export interface ExecutionResult {
id: string;
workflowId: string;
status: 'success' | 'error' | 'waiting' | 'running' | 'stopped';
startedAt: string;
stoppedAt?: string;
data?: Record<string, any>;
error?: string;
}
export type NodeStatus = 'waiting' | 'running' | 'success' | 'error' | 'disabled';
// React Flow compatible interfaces
export interface Workflow {
id: string;
name: string;
description?: string;
nodes: WorkflowNode[];
edges: WorkflowEdge[];
status: 'draft' | 'active' | 'inactive';
created_at: string;
updated_at: string;
metadata?: Record<string, any>;
}
export interface WorkflowNode {
id: string;
type: string;
position: { x: number; y: number };
data: NodeData;
style?: Record<string, any>;
}
export interface WorkflowEdge {
id: string;
source: string;
target: string;
sourceHandle?: string;
targetHandle?: string;
type?: string;
data?: EdgeData;
}
export interface NodeData {
label: string;
nodeType: string;
parameters?: Record<string, any>;
credentials?: Record<string, any>;
outputs?: NodeOutput[];
inputs?: NodeInput[];
}
export interface EdgeData {
sourceOutput?: string;
targetInput?: string;
conditions?: Record<string, any>;
}
export interface NodeOutput {
name: string;
type: string;
required?: boolean;
}
export interface NodeInput {
name: string;
type: string;
required?: boolean;
defaultValue?: any;
}
export interface WorkflowExecution {
id: string;
workflow_id: string;
status: 'pending' | 'running' | 'completed' | 'failed' | 'cancelled';
started_at: string;
completed_at?: string;
output?: Record<string, any>;
error?: string;
metadata?: Record<string, any>;
}
export interface WorkflowMetrics {
total_executions: number;
successful_executions: number;
failed_executions: number;
average_duration: number;
last_execution?: string;
}