Skip to content

Sohail-9/TraceFox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

23 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸฆŠ TraceFox: AI Co-pilot for Software Delivery

Python FastAPI TypeScript Docker License

End-to-end visibility from pull request to production. AI-powered code review, intelligent test generation, flaky test detection, and RCAโ€”all in one control center.

๐Ÿ“– Documentation โ€ข ๐Ÿš€ Quickstart โ€ข ๐Ÿ—๏ธ Architecture โ€ข ๐Ÿ›ฃ๏ธ Roadmap


Why TraceFox?

Modern engineering teams need more than toolsโ€”they need a co-pilot. TraceFox automates the entire SDLC feedback loop:

โœจ Ship with confidence
Automated PR reviews and deterministic test generation catch regressions before they land.

๐Ÿ” Reduce firefighting
Flaky test detection and root cause analysis summaries point engineers straight to the fixโ€”not the symptom.

๐Ÿ“Š Operate transparently
One mission-control UI surfaces pipeline health, quality gates, performance trends, and ML drift in real-time.

๐Ÿš€ Built for production from day one
Cloud-native architecture, environment-driven config, built-in observability, and resilience primitives.


Who is This For?

๐Ÿ‘จโ€๐Ÿ’ผ Staff/Platform Engineers

  • Need: Standardized, opinionated quality gates across repos
  • Get: Automated enforcement of best practices, flaky test dashboards, and compliance reporting

๐Ÿ› ๏ธ DevOps / Engineering Effectiveness Teams

  • Need: Unified visibility into test health and incident patterns
  • Get: RCA-powered insights, per-repo quality trends, and actionable alerts

๐Ÿš€ Startup CTOs / Early-Stage Product Teams

  • Need: Rapid velocity without sacrificing reliability
  • Get: End-to-end demo with simulators (no infra required) + one-command bootstrap

Architecture: Modular & Extensible

TraceFox Control Plane (v3)
โ”œโ”€โ”€ API Gateway (FastAPI)
โ”‚   โ””โ”€โ”€ Webhook ingestion, PR events, health checks
โ”œโ”€โ”€ Domain Services (Microservices)
โ”‚   โ”œโ”€โ”€ code_indexing      โ€” Repository metadata, graph prep
โ”‚   โ”œโ”€โ”€ review_engine      โ€” AI-powered code analysis
โ”‚   โ”œโ”€โ”€ test_generation    โ€” Deterministic test synthesis
โ”‚   โ”œโ”€โ”€ test_execution     โ€” Parallel execution harness
โ”‚   โ”œโ”€โ”€ rca_engine         โ€” Root cause intelligence
โ”‚   โ”œโ”€โ”€ learning_feedback  โ€” Feedback capture & scoring
โ”‚   โ”œโ”€โ”€ compliance         โ€” Standards & audit trail
โ”‚   โ””โ”€โ”€ ml                 โ€” Drift detection heuristics
โ”œโ”€โ”€ Shared Layer
โ”‚   โ”œโ”€โ”€ Event Bus (Redis)
โ”‚   โ”œโ”€โ”€ Persistence (PostgreSQL + SQLite)
โ”‚   โ”œโ”€โ”€ Embeddings & Graph (Qdrant + Neo4j)
โ”‚   โ””โ”€โ”€ Config, Observability, Resilience
โ””โ”€โ”€ Frontend (Next.js)
    โ””โ”€โ”€ Mission-Control Dashboard (SWR + Toast notifications)

Each service is intentionally lightweight: swap simulators for real integrations (embedding pipelines, CI runners) without rewiring core logic.


Pipeline in Action

1. Pull Request Created
   โ†“
2. GitHub Webhook โ†’ API Gateway
   โ†“
3. Code Review Engine (AI analysis, findings)
   โ†“
4. Test Generation (coverage gaps, edge cases)
   โ†“
5. Test Execution (parallel harness, flaky detection)
   โ†“
6. RCA Summary (if failures detected)
   โ†“
7. Findings Posted to PR (structured comments, quality gate)
   โ†“
8. Metrics Aggregated in Dashboard

Quickstart

1๏ธโƒฃ Clone & Setup

git clone https://github.com/Sohail-9/tracefox.git
cd tracefox
python -m venv .venv
source .venv/bin/activate  # or .venv\Scripts\activate on Windows
pip install -r requirements.txt

2๏ธโƒฃ Configure Environment

cp .env.example .env
# Edit .env with your GitHub + AI model credentials

Key environment variables:

Variable Purpose Example
TRACEFOX_GITHUB__CLIENT_ID GitHub OAuth app Ov1.xxxxx
TRACEFOX_GITHUB__CLIENT_SECRET GitHub OAuth secret (from app settings)
TRACEFOX_AUTH__GITHUB__DEV_MODE Local stub login (dev only) true
TRACEFOX_REDIS__URL Redis endpoint redis://localhost:6379
TRACEFOX_POSTGRES__URL Postgres connection postgresql://...

See docs/configuration.md for the full matrix.

3๏ธโƒฃ Start Local Services

# Bring up Postgres, Redis, Neo4j, Qdrant
docker compose up -d postgres redis neo4j qdrant

# Start the FastAPI backend
uvicorn services.api_gateway.main:app --reload --port 8000

4๏ธโƒฃ Launch the Dashboard

In a new terminal:

cd frontend
npm install
npm run dev

Visit http://localhost:3000 to explore the mission-control experience.

Tip: For local development without real GitHub OAuth, set TRACEFOX_AUTH__GITHUB__DEV_MODE=true and use the /auth/github/dev-login endpoint.


Developer Workflow

Task Command
Run backend tests python -m pytest
Run frontend tests cd frontend && npm run test
Lint frontend cd frontend && npm run lint
Format code black services/ && npm --prefix frontend run format
Sample webhook payload See docs/configuration.md or in-app uploader

Main integration test: tests/test_api_gateway.py exercises the complete webhook โ†’ review โ†’ test generation โ†’ RCA path.


Configuration Deep Dive

TraceFox uses a hierarchical config system: environment variables โ†’ config service โ†’ defaults.

All settings live behind the TRACEFOX_ prefix and are exposed via services/shared/config.py:

Database & Persistence

TRACEFOX_POSTGRES__*         Connection pooling, statement limits, timeouts
TRACEFOX_REDIS__*            Namespacing, TTLs, socket config
TRACEFOX_QDRANT__*           Vector storage, replication schedules
TRACEFOX_NEO4J__*            Graph persistence, driver options

Resilience & Performance

TRACEFOX_RETRY__*            Backoff strategy, max attempts, jitter
TRACEFOX_CIRCUIT_BREAKER__*  Failure thresholds, half-open timeouts

AI & Quality Gates

TRACEFOX_AI_MODELS__*        Model providers, temperature, context length
TRACEFOX_QUALITY__*          Flaky thresholds, coverage minimums

Observability

TRACEFOX_OBSERVABILITY__*    OTLP endpoints, sampling ratios, correlation IDs

๐Ÿ’ก Settings are cached but reloadable via services.shared.config.reload_settings().


Mission-Control Dashboard

The frontend showcases:

  • Pipeline Overview โ€” Real-time stage visibility (webhook โ†’ review โ†’ tests โ†’ RCA)
  • Operational Pulse โ€” Live metrics: active PRs, test pass rate, flaky count
  • Onboarding Checklist โ€” First-time setup guidance (dismissible)
  • Insights Hub โ€” Tabbed views for findings, generated tests, RCA summaries
  • Activity Feed โ€” Toast-powered event timeline with drill-down

Every view is powered by SWR hooks that call the FastAPI gateway, with skeleton loading and error boundaries.


Roadmap

โœ… Today (v3)

End-to-end storyline with simulators, resilience primitives, event bus, observability hooks, and production-ready architecture.

๐Ÿšง Next (v3.1 - v4)

  • Real integrations: embedding pipelines, CI runners (GitHub Actions, GitLab CI), model providers
  • Contract testing and breaking-change detection
  • Multi-repository dashboard (org-wide health)
  • Secrets scanning integration

๐Ÿ”ฎ Later (v5+)

  • Multi-tenant control planes with RBAC/SSO
  • Advanced drift monitoring and anomaly detection
  • Marketplace for custom review rules and test generators
  • Slack/Teams integration with actionable notifications
  • Kubernetes-native deployment (Helm charts)

Testing

Backend

python -m pytest tests/ -v

Frontend

cd frontend && npm run test

End-to-End

The main flow in tests/test_api_gateway.py exercises the complete SDLC pipeline to guard against regressions.


Support & Community

Questions, ideas, or integrations?

  • ๐Ÿ“š docs/configuration.md โ€” Configuration reference
  • ๐Ÿ› ๏ธ Open an Issue โ€” Report bugs or request features
  • ๐Ÿ’ฌ TraceFox Slack โ€” Join the community
  • โœ‰๏ธ hello@tracefox.ai โ€” Partnerships, pilots, or investor inquiries

Tech Stack

Backend

  • FastAPI, Pydantic, SQLAlchemy
  • PostgreSQL, Redis, Neo4j, Qdrant
  • Observability: OpenTelemetry, Prometheus

Frontend

  • Next.js 14+, React, TypeScript
  • SWR for data fetching, Tailwind CSS for styling
  • Toast notifications, Skeleton loading

Infrastructure

  • Docker & Docker Compose for local dev
  • Terraform for cloud deployment
  • GitHub Actions for CI/CD

License

MIT License โ€” see LICENSE for details.


Let's ship resilient software together. ๐ŸฆŠโœจ

Built with โค๏ธ by the TraceFox team

About

TraceFox is an AI-powered platform that automates the entire software development lifecycle. It offers unified code analysis, test generation, intelligent debugging with root cause analysis, and production monitoring, providing end-to-end visibility and seamless issue tracing from code to production.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors