Skip to content

DIYA73/flux-ops

Repository files navigation

Flux-Ops

AI-Powered Microservices Observability & Incident Response Platform

Real-time global intelligence dashboards and AI-powered monitoring for modern microservices architectures.


Features

  • Real-time WebSocket Agents - Services ping health metrics via persistent WebSocket streams
  • AI Anomaly Detection - Auto-detects anomalies, suggests root causes, drafts incident reports
  • Multi-tenant SaaS - Each team gets their own isolated dashboard
  • One-click Runbooks - Automated incident response workflows

Architecture

┌─────────────┐      WebSocket      ┌─────────────────────────┐
│   Agents    │ ──────────────────► │  NestJS Gateway         │
│ (Services)  │ ◄────────────────── │  + WebSocket Server     │
└─────────────┘      Heartbeats     └───────────┬─────────────┘
                                                 │
                                                 ▼
                                      ┌──────────────────────────┐
                                      │  PostgreSQL + TimescaleDB│
                                      │  + Redis                 │
                                      └───────────┬──────────────┘
                                                  │
                                                  ▼
                                      ┌──────────────────────────┐
                                      │  React Dashboard         │
                                      │  (Real-time charts)      │
                                      └──────────────────────────┘

Tech Stack

Layer Technology
Backend NestJS (TypeScript)
Frontend React 19 + Vite
Real-time WebSockets (ws)
Database PostgreSQL + TimescaleDB
Cache Redis
Package Manager pnpm (workspaces)

Getting Started

Prerequisites

  • Node.js >= 20
  • pnpm >= 9
  • PostgreSQL 15+ (with TimescaleDB extension)
  • Redis 7+

Install

pnpm install

Development

# Run all apps in parallel
pnpm dev

# Or run individually
pnpm --filter @flux-ops/backend dev
pnpm --filter @flux-ops/web dev

Build

pnpm build

Project Structure

flux-ops/
├── apps/
│   ├── backend/          # NestJS WebSocket server
│   │   ├── src/
│   │   │   ├── gateway/  # WebSocket gateway & connection manager
│   │   │   ├── auth/     # JWT authentication
│   │   │   ├── metrics/  # Metrics storage service
│   │   │   └── health/   # Health check endpoints
│   │   └── package.json
│   └── web/              # React dashboard
│       ├── src/
│       │   ├── App.tsx   # Main dashboard component
│       │   └── index.css # Global styles
│       └── package.json
├── packages/
│   └── shared/           # Shared types & constants
│       └── src/
│           ├── types/    # TypeScript types
│           └── constants.ts
└── package.json          # Root workspace config

WebSocket Protocol

Messages (Client → Server)

// Authenticate
{ type: 'auth', token: string }

// Send heartbeat with metrics
{ type: 'heartbeat', payload: AgentHeartbeat }

// Subscribe to topic
{ type: 'subscribe', topic: string }

// Unsubscribe from topic
{ type: 'unsubscribe', topic: string }

Messages (Server → Client)

// Auth success
{ type: 'auth_success', tenantId: string, serviceId: string }

// Heartbeat acknowledged
{ type: 'heartbeat_ack', serviceId: string, timestamp: Date }

// Metric update (broadcast)
{ type: 'metric', payload: MetricValue, serviceId: string }

// Incident alert
{ type: 'incident', payload: IncidentAlert }

Database Schema

Coming soon: Prisma schema with TimescaleDB hypertables and Row-Level Security policies.


License

MIT

About

AI-powered microservices observability platform — real-time WebSocket monitoring, anomaly detection, and incident response dashboard.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors