How nv-duymanh/pythonproject works
CodeGate receives GitHub pull-request events, queues asynchronous analysis, evaluates changes through AI review, static analysis, and test/coverage evidence, then computes quality and risk scores, applies merge policy, and recommends reviewers. Results are persisted, published to GitHub, and explored in the dashboard. The README documents the end-to-end workflow; sampled source confirms API registration and scoring behavior, but not every service-to-service call, so uncertain wiring is omitted.
Main entry points: analysis_orchestrator.py Analysis Orchestrator · analysis_service.py Analysis Services · main.py FastAPI API · webhooks.py Webhook Routes
Components 21
API & Integration
- FastAPI API
codegate/api/main.py - Webhook Routes
codegate/api/routers/webhooks.py - GitHub Services
codegate/services/github_app.py
Analysis Engines
- Analysis Orchestrator
codegate/services/analysis_orchestrator.py - AI Review
codegate/integrations/pr_agent/adapter.py - Static Analyzers
codegate/engines/analyzers/runner.py - Test & Coverage
codegate/engines/testing/executor.py
Scoring & Decisions
- Quality Scoring
codegate/engines/quality/engine.py - Risk Scoring
codegate/engines/risk/engine.py - Merge Policy
codegate/engines/policy/engine.py - Reviewer Recommendations
codegate/engines/reviewer/engine.py - Analysis Services
codegate/services/analysis_service.py
Persistence & Jobs
- Celery & Redis
codegate/worker/celery_app.py - Analysis Worker
codegate/worker/tasks.py - PostgreSQL
codegate/database/session.py - Result Stores
codegate/repositories/analysis_store.py
User Experience
- React Dashboard
dashboard/src/App.tsx - Dashboard API Client
dashboard/src/api/client.ts - Analytics Services
codegate/services/analytics_service.py
Other components
- Developer
- GitHub
Connections 22
- Developer → GitHub: opens PR
- GitHub → Webhook Routes: sends event
- Webhook Routes → Celery & Redis: enqueues analysis
- Celery & Redis → Analysis Worker: dispatches job
- Analysis Worker → Analysis Orchestrator: runs analysis
- Analysis Orchestrator → AI Review: requests review
- Analysis Orchestrator → Static Analyzers: scans changes
- Analysis Orchestrator → Test & Coverage: evaluates tests
- Analysis Orchestrator → Quality Scoring: scores findings
- Analysis Orchestrator → Risk Scoring: scores risk
- Analysis Orchestrator → Merge Policy: evaluates evidence
- Analysis Orchestrator → Reviewer Recommendations: requests recommendations
- Analysis Orchestrator → Analysis Services: coordinates results
- Analysis Services → Result Stores: persists results
- Result Stores → PostgreSQL: reads and writes
- Analysis Services → GitHub Services: publishes check
- GitHub Services → GitHub: updates PR
- Developer → React Dashboard: views results
- React Dashboard → Dashboard API Client: requests data
- Dashboard API Client → FastAPI API: calls API
- FastAPI API → Analytics Services: routes analytics
- Analytics Services → PostgreSQL: queries data