| 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.
| 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) |
# Clone the repository
git clone https://github.com/your-username/driftguard.git
cd driftguard
# Install dependencies
pip install -r requirements.txt
Start the FastAPI server with hot-reload:
uvicorn api.index:app --reload
Acccess the dashboard at http://localhost:8000/dashboard.
The new UI provides a comprehensive view of your infrastructure governance:
http://localhost:8000/http://localhost:8000/dashboardhttp://localhost:8000/ai-guard - Visualize code drift.http://localhost:8000/janitor - Manage cloud resource cleanup.http://localhost:8000/finops - Cost forecasting and savings.http://localhost:8000/policy - Edit policy.yaml.http://localhost:8000/sentry - Cross-repo integration status.http://localhost:8000/logs - Real-time system logs.DriftGuard is configured for deployment on Vercel.
api/index.py based on vercel.json.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