How omi1739/codemri works
CodeMRI scans public GitHub repositories and presents health findings, scores, recommendations, and scan history. The backend accepts scans, fetches repository contents, runs specialized analyzers, scores findings, and exposes scan results; the web tree contains submission, progress, history, and report views. The excerpts establish backend orchestration and persistence links, but do not show the web client’s HTTP calls or all analyzer internals, so those connections are omitted where unverified.
Main entry points: worker.py Scan worker · base.py Analyzer contracts · scans.py Scan routes · main.py FastAPI application
Components 30
Web interface
- Scan page
apps/web/app/page.tsx - Scan form
apps/web/app/components/scan-form.tsx - Scan status page
apps/web/app/scans/[id]/page.tsx - Progress view
apps/web/app/components/scan-progress.tsx - History page
apps/web/app/history/page.tsx - History view
apps/web/app/components/history-view.tsx - Report page
apps/web/app/scans/[id]/report/page.tsx - Report view
apps/web/app/components/report-view.tsx - Web API client
apps/web/app/lib/api.ts
Scan API
- FastAPI application
services/analyzer/app/main.py - Scan routes
services/analyzer/app/api/scans.py - Scan worker
services/analyzer/app/worker.py - GitHub client
services/analyzer/app/github/client.py
Analysis and scoring
- Fingerprint analysis
services/analyzer/app/analyzers/fingerprint/analyzer.py - Dependency analysis
services/analyzer/app/analyzers/dependencies/analyzer.py - Security analysis
services/analyzer/app/analyzers/security/analyzer.py - Quality analysis
services/analyzer/app/analyzers/quality/analyzer.py - Testing analysis
services/analyzer/app/analyzers/testing/analyzer.py - Architecture analysis
services/analyzer/app/analyzers/architecture/analyzer.py - Deployment analysis
services/analyzer/app/analyzers/deployment/analyzer.py - Git hygiene analysis
services/analyzer/app/analyzers/git_hygiene/analyzer.py - Analyzer contracts
services/analyzer/app/analyzers/base.py - Analysis helpers
services/analyzer/app/analyzers/_shared.py - Scoring engine
services/analyzer/app/scoring/engine.py - Evidence normalization
services/analyzer/app/evidence/normalize.py
Persistence
- Scan database
services/analyzer/app/db/models.py - Database sessions
services/analyzer/app/db/session.py
Shared runtime
- Configuration
services/analyzer/app/core/config.py - Structured logging
services/analyzer/app/core/logging.py
Other components
- Repository owner
Connections 34
- FastAPI application → Scan routes: registers routes
services/analyzer/app/main.py - FastAPI application → Database sessions: initializes database
services/analyzer/app/main.py - FastAPI application → Structured logging: configures logging
services/analyzer/app/main.py - Scan routes → Scan worker: schedules scans
services/analyzer/app/api/scans.py - Scan routes → GitHub client: loads repository metadata
services/analyzer/app/api/scans.py - Scan routes → Scoring engine: computes comparisons
services/analyzer/app/api/scans.py - Scan routes → Scan database: reads and writes
services/analyzer/app/api/scans.py - Scan worker → GitHub client: resolves commit
services/analyzer/app/worker.py - Scan worker → Fingerprint analysis: runs analyzer
services/analyzer/app/worker.py - Scan worker → Dependency analysis: runs analyzer
services/analyzer/app/worker.py - Scan worker → Security analysis: runs analyzer
services/analyzer/app/worker.py - Scan worker → Quality analysis: runs analyzer
services/analyzer/app/worker.py - Scan worker → Testing analysis: runs analyzer
services/analyzer/app/worker.py - Scan worker → Architecture analysis: runs analyzer
services/analyzer/app/worker.py - Scan worker → Deployment analysis: runs analyzer
services/analyzer/app/worker.py - Scan worker → Git hygiene analysis: runs analyzer
services/analyzer/app/worker.py - Scan worker → Scoring engine: computes scores
services/analyzer/app/worker.py - Scan worker → Evidence normalization: normalizes findings
services/analyzer/app/worker.py - Scan worker → Scan database: persists scan results
services/analyzer/app/worker.py - Scan worker → Database sessions: opens session
services/analyzer/app/worker.py - Fingerprint analysis → Analyzer contracts: implements contract
services/analyzer/app/analyzers/fingerprint/analyzer.py - Dependency analysis → Analyzer contracts: implements contract
services/analyzer/app/analyzers/dependencies/analyzer.py - Security analysis → Analyzer contracts: implements contract
services/analyzer/app/analyzers/security/analyzer.py - Quality analysis → Analyzer contracts: implements contract
services/analyzer/app/analyzers/quality/analyzer.py - Testing analysis → Analyzer contracts: implements contract
services/analyzer/app/analyzers/testing/analyzer.py - Architecture analysis → Analyzer contracts: implements contract
services/analyzer/app/analyzers/architecture/analyzer.py - Deployment analysis → Analyzer contracts: implements contract
services/analyzer/app/analyzers/deployment/analyzer.py - Git hygiene analysis → Analyzer contracts: implements contract
services/analyzer/app/analyzers/git_hygiene/analyzer.py - Architecture analysis → Analysis helpers: uses helpers
services/analyzer/app/analyzers/architecture/analyzer.py - Quality analysis → Analysis helpers: uses helpers
services/analyzer/app/analyzers/quality/analyzer.py - Security analysis → Analysis helpers: uses helpers
services/analyzer/app/analyzers/security/analyzer.py - Database sessions → Scan database: creates schema
services/analyzer/app/db/session.py - Database sessions → Configuration: reads database settings
services/analyzer/app/db/session.py - FastAPI application → Repository owner