Monitor infrastructure, analyze logs with Gemini AI, and compare responses across multiple LLMs from a single platform.
Built with Next.js, Clerk, Supabase (PostgreSQL), Docker, Redis, Nginx, Python, Gemini API, and GitHub Actions.
InfraWatch AI started as a Multi-LLM Chat System and evolved into a complete DevOps + AIOps platform.
The system enables users to:
- Compare responses from multiple LLMs simultaneously
- Persist chat history securely
- Monitor infrastructure health in real time
- Analyze server logs autonomously using AI
- Detect incidents automatically and log them
- Track API usage and token metrics
- Manage deployments using DevOps best practices
User
│
▼
Clerk Authentication
│
▼
Nginx Reverse Proxy
│
▼
Next.js Application
│
├────────► Gemini API (Native)
│
├────────► OpenRouter API (GPT-4o, Claude 3.5, Mistral, etc.)
│
├────────► Supabase PostgreSQL (via Prisma ORM)
│
└────────► Redis Cache
│
▼
Python Monitoring Service
│
▼
AI Log Analyzer (Gemini)
│
▼
InfraWatch Dashboard
- GPT-4o Support
- Gemini 1.5 Flash Support
- Claude 3.5 Sonnet Support
- Mistral, Perplexity, & Cohere Support
- Side-by-side response comparison
- Auto-resizing input & full Markdown rendering
- Customizable temperature settings
Powered by Clerk.
Features:
- Secure Session Management
- Row Level Security (RLS) in Database
- Protected Dashboard Routes
Stored in Supabase PostgreSQL via Prisma ORM.
Features:
- Secure conversation storage (RLS enforced)
- Cost calculation per message
- Side-navigation to revisit past chats
Track:
- Total LLM Requests
- Token Consumption per model
- Estimated API Cost (USD)
- Model Usage comparisons
Features:
- Prompt caching to reduce identical API calls
- Faster repeated queries
- Reduced API costs
- Local Docker deployment
Application runs in isolated containers (managed by docker-compose.yml).
Services:
- Next.js App
- Redis Cache
- Nginx Reverse Proxy
GitHub Actions automatically:
- Install dependencies
- Run ESLint checks
- Run TypeScript type checking
- Build Next.js application
- Build Docker image (
infrawatch-ai)
Python background workers track:
- CPU Usage
- RAM (Memory) Usage
- Disk Usage
- Container Health (App & Redis)
Metrics are pushed to Supabase every 30 seconds and displayed in real time on the frontend.
Powered by Google Gemini API.
The autonomous Python worker (log_analyzer.py) automatically analyzes:
- System Errors and Application Logs
Generates:
- Root Cause Analysis
- Severity Classification
- Suggested Fixes
- Confidence Score
Example Output:
{
"root_cause": "Redis Container Unavailable",
"severity": "High",
"suggested_fix": "Restart Redis Container",
"confidence": 91
}Route:
/monitoring
Features:
- Live CPU/RAM/Disk Gauges
- Container Uptime Status
- AI Incident Reports
- 30-Day API Token/Cost Metrics
- Next.js 16 (App Router)
- React 19
- TypeScript
- Tailwind CSS v4
- Framer Motion & GSAP
- Clerk
- Supabase PostgreSQL
- Prisma ORM
- Docker & Docker Compose
- Nginx
- GitHub Actions
- WSL Ubuntu
- Python (psutil)
- Gemini API (Google)
- OpenRouter API (OpenAI, Anthropic, Mistral)
infra-watch-ai/
├── app/
│ ├── api/ # Next.js API Routes (Chat, Health, Monitoring)
│ ├── monitoring/ # InfraWatch Dashboard UI
│ └── page.tsx # Main Multi-LLM Chat UI
│
├── components/ # React Components (Modals, Chat Inputs)
├── lib/ # Prisma Client & Redis Configuration
│
├── services/
│ └── monitoring/
│ ├── monitor.py # Infrastructure metric collector
│ ├── log_analyzer.py # Gemini-powered incident analyzer
│ ├── cpu.py, ram.py, disk.py, docker_status.py
│ └── requirements.txt
│
├── nginx/
│ └── infrawatch.conf # Nginx Reverse Proxy Configuration
│
├── .github/
│ └── workflows/
│ └── ci.yml # GitHub Actions CI/CD
│
├── supabase/
│ └── schema.sql # PostgreSQL Schema & RLS Policies
│
├── prisma/
│ └── schema.prisma # Prisma Models
│
├── docker-compose.yml # App & Redis Containers
├── Dockerfile # Next.js Production Build
└── README.md
- Node.js 20+
- Docker Desktop
- Python 3.10+
- Supabase Project
- Clerk Account
- Gemini API Key
git clone https://github.com/Darshan3690/DevOps_Copilot.git
cd DevOps_CopilotCreate .env.local
# Clerk Auth
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=
CLERK_SECRET_KEY=
# Prisma / Supabase
DATABASE_URL=
DIRECT_DATABASE_URL=
# AI APIs
GEMINI_API_KEY=
# Add your OpenRouter/OpenAI/Claude keys for the multi-llm chat
# Redis
REDIS_URL=redis://localhost:6379npm install
npx prisma generate
npm run devOpen http://localhost:3000
cd services/monitoring
pip install -r requirements.txt
python monitor.pyBuild & Start the containers:
docker compose up --build -dThe app will be available at http://localhost:3000 via Nginx/Docker.
Push Code
│
▼
GitHub Actions
│
▼
Lint (ESLint)
│
▼
Type Check (tsc)
│
▼
Build (Next.js)
│
▼
Docker Build
│
▼
Pipeline Complete ✅
- Smart Email/Slack Alerts: Real-time notifications for critical system failures.
- Kubernetes Deployment Manifests
- Grafana Dashboard Integration
- AWS Terraform Deployment Scripts
- AI Auto-Remediation
Contributions are welcome.
- Fork Repository
- Create Feature Branch (
git checkout -b feature/amazing-feature) - Commit Changes (
git commit -m "Add amazing feature") - Push (
git push origin feature/amazing-feature) - Create Pull Request
Distributed under the MIT License.
Made with ❤️ by Darshan Rajput
Building the future of AI-powered DevOps 🚀