How pranavikameshwari33-star/deployguard works
DeployGuard is a multi-user GitHub deployment observer: users sign in and connect repositories; signed GitHub events become deployment records, which are analyzed, compared with history, and assessed for risk. GitHub Actions results update pipeline state and failed runs create incident memory; a read-only dashboard presents the evidence. The graph preserves documented recovery and recall capabilities. Several subsystem links reflect README-described behavior because their implementation was not included in the sampled source.
Main entry points: route.ts Webhook receiver · analyze-risk.ts Risk assessment · ingest-push.ts Deployment ingestion · apply-status.ts Apply pipeline status
Components 30
Access and GitHub
- OAuth start
app/auth/github/route.ts - OAuth callback
app/auth/github/callback/route.ts - GitHub App
lib/github/app.ts - Installation links
lib/github/installations.ts
Event ingestion
- Webhook receiver
app/api/webhook/github/route.ts - Signature verification
lib/github/verify-signature.ts - Push parser
lib/github/parse-push-event.ts - GitHub event handling
lib/github/app-events.ts - Deployment ingestion
lib/pipeline/ingest-push.ts - Receipt log
lib/store/event-store.ts
Deployment analysis
- Change analysis
lib/analysis/change-analysis.ts - Historical matching
lib/similarity/find-similar.ts - Risk assessment
lib/risk/analyze-risk.ts - Assessment validation
lib/risk/validate.ts - Deployment memory
lib/hindsight/deployment-memory.ts
Pipeline and recovery
- Status endpoint
app/api/deployments/status/route.ts - Apply pipeline status
lib/pipeline/apply-status.ts - Incident memory
lib/hindsight/incident-memory.ts - Maintenance recovery
lib/maintenance/run.ts
Queries and dashboard
- Dashboard endpoint
app/api/dashboard/route.ts - Dashboard data
lib/dashboard/dashboard-data.ts - Deployment listing
app/api/deployments/route.ts - Memory recall
app/api/memory/recall/route.ts - Dashboard UI
app/page.tsx
Other components
- Repository owner
- GitHub
- GitHub Actions
- PostgreSQL
- Hindsight
- Gemini
Connections 42
- Repository owner → OAuth start: starts sign-in
- OAuth start → GitHub: redirects to
- GitHub → OAuth callback: returns authorization
- OAuth callback → GitHub App: exchanges code
- OAuth callback → Installation links: claims installations
- GitHub → Webhook receiver: delivers events
- Webhook receiver → Signature verification: verifies signature
- Webhook receiver → GitHub event handling: dispatches app events
- Webhook receiver → Push parser: parses push
- Webhook receiver → Receipt log: records receipt
- Webhook receiver → Deployment ingestion: ingests deployment
- Deployment ingestion → Change analysis: classifies changes
- Deployment ingestion → PostgreSQL: stores deployment
- Deployment ingestion → Deployment memory: stores memory
- Deployment memory → Hindsight: writes memory
- Deployment ingestion → Risk assessment: schedules assessment
- Risk assessment → Historical matching: finds matches
- Historical matching → Hindsight: recalls supporting history
- Risk assessment → Gemini: requests assessment
- Risk assessment → Assessment validation: validates answer
- Risk assessment → PostgreSQL: stores assessment
- GitHub Actions → Webhook receiver: reports workflow runs
- Webhook receiver → GitHub event handling: dispatches workflow run
- GitHub event handling → Apply pipeline status: applies run result
- GitHub Actions → Status endpoint: submits status
- Status endpoint → Apply pipeline status: applies status
- Apply pipeline status → PostgreSQL: updates deployment
- Apply pipeline status → Incident memory: records failure memory
- Apply pipeline status → Risk assessment: refreshes risk
- Incident memory → Hindsight: stores incident
- Maintenance recovery → PostgreSQL: repairs records
- Maintenance recovery → Deployment ingestion: recovers pushes
- Maintenance recovery → Apply pipeline status: recovers results
- Maintenance recovery → Risk assessment: resumes analyses
- Repository owner → Dashboard UI: views dashboard
- Dashboard UI → Dashboard endpoint: requests data
- Dashboard endpoint → Dashboard data: loads dashboard
- Dashboard data → PostgreSQL: reads history
- Repository owner → Deployment listing: lists deployments
- Deployment listing → PostgreSQL: reads deployments
- Repository owner → Memory recall: queries memory
- Memory recall → Hindsight: recalls memories