DriftGuard

DriftGuard πŸ›‘οΈ

Autonomous Platform Engineering Suite for Config-Driven Governance

Status: 🟒 Active Version: 2.0.0

DriftGuard acts as a β€œGovernance-as-Code” layer, automating the critical checks that prevent β€œBroken Factory” syndrome in Platform Engineering. It combines a powerful backend policy engine with a modern web dashboard to enforce Documentation, Cost, and Integration safety.


⚑ Key Features

Module Name Function Tech Stack
Dashboard The Console Unified Web Interface. A responsive, dark-mode UI to visualize drift, manage policies, view logs, and track cloud costs. FastAPI, Jinja2, Tailwind CSS
Module 1 The Synchronizer AI Documentation Guard. Uses Google Gemini 1.5 to semantic-check Pull Requests. If code changes (e.g., new Env Vars) aren’t reflected in the README, it blocks the PR. Python, Google GenAI SDK
Module 2 The Janitor FinOps Cost Guard. Automatically detects and deletes β€œexpired” cloud resources (Buckets, RGs) based on Tags to prevent cloud waste. Supports AWS, Azure, and GCP. Python, Boto3, Azure SDK, Google Cloud SDK
Module 3 The Guard Cross-Repo Safety. Automatically triggers integration tests in downstream consumer repositories whenever a core platform change is detected. Github API (Repository Dispatch)

πŸš€ Quickstart & Setup

1. Prerequisites

2. Installation

# Clone the repository
git clone https://github.com/your-username/driftguard.git
cd driftguard

# Install dependencies
pip install -r requirements.txt

3. Run Locally

Start the FastAPI server with hot-reload:

uvicorn api.index:app --reload

Acccess the dashboard at http://localhost:8000/dashboard.


🌐 Web Dashboard

The new UI provides a comprehensive view of your infrastructure governance:


πŸ“¦ Deployment

Vercel

DriftGuard is configured for deployment on Vercel.

  1. Push your code to a GitHub repository.
  2. Import the project into Vercel.
  3. Vercel will automatically detect api/index.py based on vercel.json.
  4. Add your Environment Variables in the Vercel Dashboard.

πŸ“‚ Project Structure

driftguard/
β”œβ”€β”€ .github/                   # GitHub Actions Workflows
β”œβ”€β”€ api/                       # Web Application
β”‚   β”œβ”€β”€ templates/             # HTML/Jinja2 Templates (UI)
β”‚   β”œβ”€β”€ static/                # Static Assets
β”‚   └── index.py               # FastAPI Entrypoint
β”œβ”€β”€ src/                       # Core Logic
β”‚   β”œβ”€β”€ engine.py              # Policy Orchestrator
β”‚   └── guards/                # Guard Modules
β”œβ”€β”€ policy.yaml                # Governance Configuration
└── requirements.txt           # Python Dependencies