Skip to content

Latest commit

 

History

46 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🛡️ Aegis

Autonomous Site Reliability Engineering Platform

Next.js 15 TypeScript Neon Gemini

Aegis finds bugs, memory leaks, and security vulnerabilities in your codebase, analyzes them, and automatically opens GitHub Pull Requests with AI-generated fixes — before a crash ever happens.

🌍 Live Demo: aegis-ai-sre.vercel.app


✨ Overview

Aegis acts as your autonomous SRE and AI engineer. Instead of waiting for users to report bugs or monitoring static logs, Aegis proactively scans your code, understands the business logic using Google's Gemini 2.5 Flash, and automatically commits fixes to your repository.

Core Modes

  • 🔍 Proactive AI Scanner: Connect your GitHub repository and click "Scan". Aegis will fetch your source code, identify vulnerabilities or performance bottlenecks, and automatically open a PR with the patch. No servers or probes required.
  • ⚡ Live Crash Detection: Run the lightweight Aegis C++ Probe on your Linux server. It monitors CPU, memory, and application logs in real-time. The moment your app crashes, the probe sends the stack trace to Aegis, which instantly generates a patch and opens a PR. (Note: The probe automatically sends Pull Requests to the first repository you connect to Aegis, which acts as your default codebase).

🚀 Quick Start

Deploying your own Aegis platform takes less than 5 minutes.

1. Prerequisites

You will need:

2. One-Click Deploy

Aegis is designed to run serverlessly on Vercel.

Deploy with Vercel

During deployment, Vercel will ask for the following Environment Variables:

Variable Description
DATABASE_URL Your Neon PostgreSQL connection string
BETTER_AUTH_SECRET 64-character random hex string (openssl rand -hex 32)
FIELD_ENCRYPTION_KEY 64-character random hex string for securing API keys at rest
NEXT_PUBLIC_APP_URL Your Vercel production URL (e.g., https://aegis.vercel.app)
BETTER_AUTH_TRUSTED_ORIGINS Same as NEXT_PUBLIC_APP_URL
GEMINI_API_KEY Your Google AI Studio API Key

Note: Database tables are automatically migrated and created on your first login.

3. Start Scanning

  1. Go to your deployed Aegis URL and create an account.
  2. Navigate to Settings and securely input your GitHub Personal Access Token.
  3. Go to Repositories, click Connect Repo, and enter your GitHub username and repository name.
  4. Click Scan for issues.
  5. Aegis will run in the background. Navigate to Incidents to watch issues populate and PRs automatically get created in your GitHub!

4. Setup Live Probe (Optional)

If you want Aegis to monitor your production servers for crashes in real-time:

  1. Generate an API key from the Settings > API Keys page.
  2. Compile and run the standalone C++ probe on your Linux server:
g++ main.cpp -o aegis-probe -pthread -std=c++17
./aegis-probe \
  --endpoint  https://your-aegis-url.vercel.app \
  --api-key   aegis_YOUR_KEY_HERE \
  --log-file  /var/log/app/error.log \
  --probe-id  prod-server-1 \
  --interval  5

🏗️ Tech Stack

Aegis is built with a modern, edge-ready architecture to ensure zero maintenance and maximum speed.

  • Frontend: Next.js 15 App Router, React 19, Tailwind CSS, shadcn/ui
  • Backend: Next.js Serverless Functions, Vercel Edge Runtime
  • Database: PostgreSQL (Neon Serverless) + Drizzle ORM
  • Authentication: Better Auth (Email/Password)
  • AI Engine: Google Gemini 2.5 Flash
  • Integrations: GitHub Octokit REST API
  • Live Probe: C++17 (compiled as a single standalone binary)

🔒 Security First

Aegis handles sensitive source code and production API keys. We designed it with zero-trust principles:

  • AES-256-GCM Encryption: All GitHub tokens and Gemini API keys are heavily encrypted at rest in the database using your FIELD_ENCRYPTION_KEY.
  • Stateless Analysis: Code is analyzed in ephemeral serverless functions. It is never stored permanently unless it is attached to an incident report as a diff.
  • Multi-tenant Architecture: Every database query is strictly scoped to the userId to prevent data leakage between workspaces.

📜 License

This project is licensed under the MIT License.

About

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages