How miracodeai/mira works
Mira is a self-hosted AI code-review service. A code-host webhook dispatches pull-request events to shared handlers, which run the review engine and post findings through a platform provider. Separate workflows index repositories, scan dependencies for vulnerabilities, and expose review, repository, and organization signals through the dashboard. The README documents these capabilities; some implementation details—especially security scanning and dashboard persistence—were not sampled, so those links are shown only where documented or supported by the source index.
Main entry points: indexer.py Repository indexer · engine.py Review engine · handlers.py Shared handlers · api.py Dashboard API
Components 22
Review workflow
- Review engine
src/mira/core/engine.py - Review context
src/mira/core/context.py - LLM providers
src/mira/llm/base.py - Learning loop
src/mira/analysis/feedback.py - Configuration
src/mira/config.py
Code intelligence
- Repository fetch
src/mira/platforms/fetch.py - Index handlers
src/mira/platforms/index_handlers.py - Repository indexer
src/mira/index/indexer.py - Code relationships
src/mira/index/relationships.py - Code index store
src/mira/index/store.py - Vulnerability scanning
src/mira/security/poller.py
Host integrations
- Webhook handlers
src/mira/platforms/github/webhook.py - Shared handlers
src/mira/platforms/handlers.py - Host providers
src/mira/providers/github.py
Dashboard and data
- Dashboard UI
ui/mira/src/App.tsx - Dashboard API
src/mira/dashboard/api.py - Dashboard data
src/mira/dashboard/db.py
External services
- Outbound notifications
src/mira/outbound_webhooks.py
Other components
- Engineer
- Code host
- OSV.dev
- Slack, Teams, JSON
Connections 28
- Code host → Webhook handlers: sends events
src/mira/platforms/github/webhook.py - Webhook handlers → Shared handlers: dispatches reviews
src/mira/platforms/github/webhook.py - Shared handlers → Review engine: runs review
src/mira/platforms/handlers.py - Shared handlers → Host providers: uses provider
src/mira/platforms/handlers.py - Review engine → Review context: builds context
src/mira/core/engine.py - Review engine → LLM providers: requests analysis
src/mira/core/engine.py - Review engine → Code index store: reads index
src/mira/core/engine.py - Shared handlers → Learning loop: synthesizes rules
src/mira/platforms/handlers.py - Shared handlers → Outbound notifications: dispatches events
src/mira/platforms/handlers.py - Host providers → Code host: posts review
- Webhook handlers → Index handlers: routes push indexing
src/mira/platforms/github/webhook.py - Index handlers → Repository indexer: indexes changes
src/mira/platforms/index_handlers.py - Index handlers → Repository fetch: supplies fetcher
src/mira/platforms/index_handlers.py - Repository indexer → Repository fetch: fetches repository files
src/mira/index/indexer.py - Repository indexer → Code index store: writes index
src/mira/index/indexer.py - Repository indexer → LLM providers: summarizes files
src/mira/index/indexer.py - Code index store → Code relationships: stores dependencies
- Engineer → Dashboard UI: views signals
README.md - Dashboard UI → Dashboard API: requests dashboard data
- Dashboard API → Dashboard data: reads dashboard data
src/mira/dashboard/api.py - Dashboard API → Repository indexer: starts indexing
src/mira/dashboard/api.py - Dashboard API → Code index store: queries code index
src/mira/dashboard/api.py - Dashboard API → Code relationships: queries relationships
src/mira/dashboard/api.py - Vulnerability scanning → OSV.dev: polls advisories
README.md - Vulnerability scanning → Code index store: checks dependencies
- Outbound notifications → Slack, Teams, JSON: delivers events
src/mira/outbound_webhooks.py - Review engine → Configuration: uses settings
src/mira/core/engine.py - Repository indexer → Configuration: uses settings
src/mira/index/indexer.py