Skip to content

An intelligent dashboard to monitor and diagnose GitHub Actions failures using ML, vector search, and local LLMs.

License

Notifications You must be signed in to change notification settings

Anthonyy232/CI-Sight

Repository files navigation

CI-Sight

CI/CD Build Status License: GPLv3 GitHub Stars

An intelligent monitoring dashboard for GitHub Actions that provides automated failure analysis and performance insights.


CI-Sight Dashboard Screenshot CI-Sight Build Screenshot

Overview

CI-Sight is an open-source tool designed to address the complexity of debugging and monitoring CI/CD pipelines. It ingests data from GitHub Actions via webhooks and uses a combination of machine learning and LLM-driven analysis to automatically categorize failures, identify trends, and suggest solutions. This turns opaque build logs into structured, actionable intelligence, helping engineering teams reduce downtime and improve pipeline reliability.

Key Features

  • Centralized Dashboard: Monitor build success rates, average durations, and error trends across all connected projects from a single interface.
  • Real-Time Webhook Integration: Automatically tracks the status of GitHub Actions workflow runs as they happen.
  • AI-Powered Failure Analysis:
    • Error Classification: Automatically categorizes build failures (e.g., Dependency Error, Test Failure) using a zero-shot classification model.
    • Vector Similarity Search: Uses pgvector to find previously encountered errors and their known solutions from an embedded knowledge base.
    • LLM-Generated Solutions: Leverages a local LLM (via Ollama) to suggest actionable solutions for novel or complex errors.
  • Detailed Build Analysis: Drill down into individual builds to view full, virtualized logs, AI-generated failure reasons, and direct links to the original GitHub run.
  • Project-Specific Analytics: Isolate and analyze build performance, health, and activity for individual repositories.
  • Secure GitHub Integration: Uses a standard GitHub OAuth flow for authentication and securely encrypts user tokens at rest.

Technology Stack

Frontend React TypeScript Vite Mantine UI TanStack Query
Backend Node.js Express Prisma BullMQ JWT
Database & Cache PostgreSQL pgvector Redis
ML / AI Python Sentence Transformers Ollama
DevOps & Testing Docker Jest

Deployment

You can run CI-Sight locally for development or deploy it to a production server using Docker.

Local Development

These instructions are for setting up a local development environment.

Prerequisites:

  • Node.js (v18+), Docker, Python (3.8+), and ngrok.
  1. Clone & Configure:

    git clone https://github.com/anthonyy232/ci-sight.git
    cd ci-sight
    cp .env.example .env
    • Edit .env and set PUBLIC_URL to your ngrok HTTPS URL.
    • Fill in your GitHub OAuth credentials and generate secure secrets.
  2. Start Services:

    docker-compose up -d
  3. Set Up ML Environment:

    python3 -m venv ml/venv
    source ml/venv/bin/activate
    pip install -r ml/requirements.txt
    • Ensure PYTHON_EXECUTABLE=./ml/venv/bin/python is set in your .env file.
  4. Prepare Database:

    # Apply schema
    npx prisma migrate dev --schema=./server/prisma/schema.prisma
    # Seed vector embeddings
    python3 ml/scripts/seed_known_errors.py
  5. Install Dependencies & Run:

    npm install
    npm run dev
    • The frontend will be available at http://localhost:5173.

Production (Docker)

These instructions guide you through deploying the entire application stack using Docker.

Prerequisites:

  • A server with Docker and Docker Compose installed.
  • A domain name pointing to your server's IP address.
  1. Configure for Production:

    • Copy .env.example to .env on your server.
    • Set NODE_ENV=production.
    • Set PUBLIC_URL and FRONTEND_URL to your public domain (e.g., https://ci-sight.yourdomain.com).
    • Generate strong, unique values for all secrets (SESSION_JWT_SECRET, TOKEN_ENCRYPTION_KEY, GITHUB_WEBHOOK_SECRET).
    • Update DATABASE_URL and REDIS_URL if you are using external/managed services.
  2. Create Production Docker Compose File: Create a docker-compose.prod.yml file. This configuration builds the application image from the Dockerfile and runs it alongside the required services.

    # docker-compose.prod.yml
    version: '3.8'
    services:
      app:
        build: .
        restart: always
        ports:
          - "4000:4000"
        depends_on:
          - postgres
          - redis
        env_file:
          - .env
    
      postgres:
        image: pgvector/pgvector:pg16
        restart: always
        environment:
          POSTGRES_USER: ${POSTGRES_USER:-postgres}
          POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
          POSTGRES_DB: ${POSTGRES_DB:-ci_sight}
        volumes:
          - pgdata:/var/lib/postgresql/data
    
      redis:
        image: redis:7
        restart: always
    
    volumes:
      pgdata:
  3. Build and Run the Application:

    docker-compose -f docker-compose.prod.yml up --build -d
  4. Apply Database Migrations: Run the production-safe migration command to apply the schema to your database.

    docker-compose -f docker-compose.prod.yml exec app npx prisma migrate deploy --schema=./server/prisma/schema.prisma
  5. Post-Setup (Recommended):

    • Configure a reverse proxy like Nginx or Caddy in front of the application to handle SSL termination and serve traffic on ports 80/443.
    • Seed the production database with the known error embeddings:
      docker-compose -f docker-compose.prod.yml exec app python3 ml/scripts/seed_known_errors.py

Project Structure

Click to expand the directory structure
/
├── client/         # React frontend application (Vite, Mantine)
│   ├── src/
│   │   ├── api/      # API client and data-fetching functions
│   │   ├── components/ # Reusable UI components
│   │   └── features/ # Feature-based modules (dashboard, projects, etc.)
│   └── vite.config.ts # Vite configuration with proxy to the backend
├── server/         # Node.js backend application (Express, Prisma)
│   ├── prisma/     # Prisma schema and migrations
│   └── src/
│       ├── jobs/     # Background job processors (BullMQ)
│       ├── middleware/ # Express middleware (auth, error handling)
│   │   ├── modules/  # Feature-based modules with routes, controllers, services
│       └── services/ # Shared services (GitHub API, crypto, etc.)
├── ml/             # Python scripts for ML tasks
│   ├── scripts/    # Scripts for classification, similarity search, and seeding
│   └── requirements.txt # Python dependencies
├── docker-compose.yml # Defines PostgreSQL & Redis services for development
└── Dockerfile      # Multi-stage Dockerfile for production builds

License

This project is licensed under the GPLv3 License.

About

An intelligent dashboard to monitor and diagnose GitHub Actions failures using ML, vector search, and local LLMs.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published