# yashasgowda08/smart-ai-code-reviewer architecture

> Architecture diagram of the GitHub repository yashasgowda08/smart-ai-code-reviewer, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/yashasgowda08/smart-ai-code-reviewer
- Repository: https://github.com/yashasgowda08/smart-ai-code-reviewer

## Overview

This is a full-stack multi-agent code-review product. A developer submits pasted code, files, diffs, or repository inputs through the dashboard; the backend normalizes inputs, runs local static-analysis agents and optional Groq review, reconciles scores, and returns findings and reports. Separate workflows cover authentication, review history, exports, integrations, and administration. The graph reflects documented capabilities as well as excerpted calls; several service-level connections are documented in the README because their implementation files were not sampled.

Main entry points: [`frontend/src/App.jsx`](https://github.com/yashasgowda08/smart-ai-code-reviewer/blob/main/frontend/src/App.jsx) (App navigation), [`backend/app/main.py`](https://github.com/yashasgowda08/smart-ai-code-reviewer/blob/main/backend/app/main.py) (FastAPI application), [`backend/app/services/review_service.py`](https://github.com/yashasgowda08/smart-ai-code-reviewer/blob/main/backend/app/services/review_service.py) (Review orchestration), [`frontend/src/services/api.js`](https://github.com/yashasgowda08/smart-ai-code-reviewer/blob/main/frontend/src/services/api.js) (API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Developer dashboard"]
  node_app["App navigation<br/>[App.jsx]"]
  node_review_ui["Review workspace<br/>[Review.jsx]"]
  node_dashboard["Review dashboard<br/>[Dashboard.jsx]"]
  node_history_ui["History view<br/>[History.jsx]"]
  node_login_ui["Login view<br/>[Login.jsx]"]
  node_register_ui["Registration view<br/>[Register.jsx]"]
  node_admin_ui["Admin dashboard<br/>[AdminDashboard.jsx]"]
  node_api_client["API client<br/>[api.js]"]
end

subgraph group_entry["API and inputs"]
  node_api_app["FastAPI application<br/>[main.py]"]
  node_review_api["Review endpoints<br/>[code_review.py]"]
  node_repository_api["Repository endpoint<br/>[repository.py]"]
  node_input_processor["Input processing<br/>[input_processor.py]"]
  node_diff_processor["Diff processing<br/>[diff_processor.py]"]
end

subgraph group_analysis["Review analysis"]
  node_review_service["Review orchestration<br/>[review_service.py]"]
  node_static_analysis["Static analysis"]
  node_agents["Specialist agents"]
  node_ai_service["Groq AI review<br/>[ai_service.py]"]
  node_consensus["Consensus scoring<br/>[consensus.py]"]
end

subgraph group_account["Accounts and history"]
  node_auth_api["Authentication endpoints<br/>[auth.py]"]
  node_auth_service["Authentication service<br/>[auth_service.py]"]
  node_history_service["Review history<br/>[history_service.py]"]
  node_database[("SQLite database<br/>[database.py]")]
end

subgraph group_outputs["Reports and integrations"]
  node_pdf_service["PDF reports<br/>[pdf_service.py]"]
  node_export_api["Export endpoints<br/>[exports.py]"]
  node_integrations["GitHub, URL and notifications"]
end

node_developer(("Developer"))

node_developer -->|"uses"| node_app
node_app -->|"opens"| node_review_ui
node_app -->|"opens"| node_dashboard
node_app -->|"opens"| node_history_ui
node_app -->|"opens"| node_login_ui
node_app -->|"opens"| node_register_ui
node_app -->|"opens"| node_admin_ui
node_review_ui -.->|"submits reviews"| node_api_client
node_login_ui -.->|"authenticates via"| node_api_client
node_register_ui -.->|"registers via"| node_api_client
node_history_ui -.->|"loads history via"| node_api_client
node_admin_ui -->|"loads admin data via"| node_api_client
node_api_client -->|"calls REST API"| node_api_app
node_api_app -->|"routes to"| node_review_api
node_api_app -->|"routes to"| node_repository_api
node_review_api -->|"normalizes input"| node_input_processor
node_repository_api -->|"scans directory"| node_input_processor
node_input_processor -->|"processes diffs"| node_diff_processor
node_review_api -->|"executes review"| node_review_service
node_review_service -.->|"runs analysis"| node_static_analysis
node_static_analysis -.->|"coordinates"| node_agents
node_review_service -.->|"requests AI review"| node_ai_service
node_review_service -.->|"reconciles scores"| node_consensus
node_review_service -.->|"persists reviews"| node_database
node_api_app -->|"routes to"| node_auth_api
node_auth_api -.->|"handles credentials"| node_auth_service
node_auth_service -->|"reads and writes"| node_database
node_history_service -.->|"loads history"| node_database
node_review_service -.->|"generates reports"| node_pdf_service
node_api_app -->|"routes to"| node_export_api
node_api_app -->|"routes to"| node_integrations

click node_app "https://github.com/yashasgowda08/smart-ai-code-reviewer/blob/main/frontend/src/App.jsx"
click node_review_ui "https://github.com/yashasgowda08/smart-ai-code-reviewer/blob/main/frontend/src/pages/Review.jsx"
click node_dashboard "https://github.com/yashasgowda08/smart-ai-code-reviewer/blob/main/frontend/src/pages/Dashboard.jsx"
click node_history_ui "https://github.com/yashasgowda08/smart-ai-code-reviewer/blob/main/frontend/src/pages/History.jsx"
click node_login_ui "https://github.com/yashasgowda08/smart-ai-code-reviewer/blob/main/frontend/src/pages/Login.jsx"
click node_register_ui "https://github.com/yashasgowda08/smart-ai-code-reviewer/blob/main/frontend/src/pages/Register.jsx"
click node_admin_ui "https://github.com/yashasgowda08/smart-ai-code-reviewer/blob/main/frontend/src/pages/AdminDashboard.jsx"
click node_api_client "https://github.com/yashasgowda08/smart-ai-code-reviewer/blob/main/frontend/src/services/api.js"
click node_api_app "https://github.com/yashasgowda08/smart-ai-code-reviewer/blob/main/backend/app/main.py"
click node_review_api "https://github.com/yashasgowda08/smart-ai-code-reviewer/blob/main/backend/app/api/code_review.py"
click node_repository_api "https://github.com/yashasgowda08/smart-ai-code-reviewer/blob/main/backend/app/api/repository.py"
click node_input_processor "https://github.com/yashasgowda08/smart-ai-code-reviewer/blob/main/backend/app/processors/input_processor.py"
click node_diff_processor "https://github.com/yashasgowda08/smart-ai-code-reviewer/blob/main/backend/app/processors/diff_processor.py"
click node_review_service "https://github.com/yashasgowda08/smart-ai-code-reviewer/blob/main/backend/app/services/review_service.py"
click node_static_analysis "https://github.com/yashasgowda08/smart-ai-code-reviewer/blob/main/backend/app/services/static_analysis_service.py"
click node_agents "https://github.com/yashasgowda08/smart-ai-code-reviewer/tree/main/backend/app/agents"
click node_ai_service "https://github.com/yashasgowda08/smart-ai-code-reviewer/blob/main/backend/app/services/ai_service.py"
click node_consensus "https://github.com/yashasgowda08/smart-ai-code-reviewer/blob/main/backend/app/utils/consensus.py"
click node_auth_api "https://github.com/yashasgowda08/smart-ai-code-reviewer/blob/main/backend/app/api/auth.py"
click node_auth_service "https://github.com/yashasgowda08/smart-ai-code-reviewer/blob/main/backend/app/services/auth_service.py"
click node_history_service "https://github.com/yashasgowda08/smart-ai-code-reviewer/blob/main/backend/app/services/history_service.py"
click node_database "https://github.com/yashasgowda08/smart-ai-code-reviewer/blob/main/backend/app/database/database.py"
click node_pdf_service "https://github.com/yashasgowda08/smart-ai-code-reviewer/blob/main/backend/app/services/pdf_service.py"
click node_export_api "https://github.com/yashasgowda08/smart-ai-code-reviewer/blob/main/backend/app/api/exports.py"
click node_integrations "https://github.com/yashasgowda08/smart-ai-code-reviewer/tree/main/backend/app/api"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_review_ui,node_dashboard,node_history_ui,node_login_ui,node_register_ui,node_admin_ui,node_api_client toneBlue
class node_api_app,node_review_api,node_repository_api,node_input_processor,node_diff_processor toneAmber
class node_review_service,node_static_analysis,node_agents,node_ai_service,node_consensus toneMint
class node_auth_api,node_auth_service,node_history_service,node_database toneRose
class node_pdf_service,node_export_api,node_integrations,node_developer toneIndigo
```

## Components

### Developer dashboard

- [App navigation](https://github.com/yashasgowda08/smart-ai-code-reviewer/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Review workspace](https://github.com/yashasgowda08/smart-ai-code-reviewer/blob/main/frontend/src/pages/Review.jsx): `frontend/src/pages/Review.jsx`
- [Review dashboard](https://github.com/yashasgowda08/smart-ai-code-reviewer/blob/main/frontend/src/pages/Dashboard.jsx): `frontend/src/pages/Dashboard.jsx`
- [History view](https://github.com/yashasgowda08/smart-ai-code-reviewer/blob/main/frontend/src/pages/History.jsx): `frontend/src/pages/History.jsx`
- [Login view](https://github.com/yashasgowda08/smart-ai-code-reviewer/blob/main/frontend/src/pages/Login.jsx): `frontend/src/pages/Login.jsx`
- [Registration view](https://github.com/yashasgowda08/smart-ai-code-reviewer/blob/main/frontend/src/pages/Register.jsx): `frontend/src/pages/Register.jsx`
- [Admin dashboard](https://github.com/yashasgowda08/smart-ai-code-reviewer/blob/main/frontend/src/pages/AdminDashboard.jsx): `frontend/src/pages/AdminDashboard.jsx`
- [API client](https://github.com/yashasgowda08/smart-ai-code-reviewer/blob/main/frontend/src/services/api.js): `frontend/src/services/api.js`

### API and inputs

- [FastAPI application](https://github.com/yashasgowda08/smart-ai-code-reviewer/blob/main/backend/app/main.py): `backend/app/main.py`
- [Review endpoints](https://github.com/yashasgowda08/smart-ai-code-reviewer/blob/main/backend/app/api/code_review.py): `backend/app/api/code_review.py`
- [Repository endpoint](https://github.com/yashasgowda08/smart-ai-code-reviewer/blob/main/backend/app/api/repository.py): `backend/app/api/repository.py`
- [Input processing](https://github.com/yashasgowda08/smart-ai-code-reviewer/blob/main/backend/app/processors/input_processor.py): `backend/app/processors/input_processor.py`
- [Diff processing](https://github.com/yashasgowda08/smart-ai-code-reviewer/blob/main/backend/app/processors/diff_processor.py): `backend/app/processors/diff_processor.py`

### Review analysis

- [Review orchestration](https://github.com/yashasgowda08/smart-ai-code-reviewer/blob/main/backend/app/services/review_service.py): `backend/app/services/review_service.py`
- [Static analysis](https://github.com/yashasgowda08/smart-ai-code-reviewer/blob/main/backend/app/services/static_analysis_service.py): `backend/app/services/static_analysis_service.py`
- [Specialist agents](https://github.com/yashasgowda08/smart-ai-code-reviewer/tree/main/backend/app/agents): `backend/app/agents`
- [Groq AI review](https://github.com/yashasgowda08/smart-ai-code-reviewer/blob/main/backend/app/services/ai_service.py): `backend/app/services/ai_service.py`
- [Consensus scoring](https://github.com/yashasgowda08/smart-ai-code-reviewer/blob/main/backend/app/utils/consensus.py): `backend/app/utils/consensus.py`

### Accounts and history

- [Authentication endpoints](https://github.com/yashasgowda08/smart-ai-code-reviewer/blob/main/backend/app/api/auth.py): `backend/app/api/auth.py`
- [Authentication service](https://github.com/yashasgowda08/smart-ai-code-reviewer/blob/main/backend/app/services/auth_service.py): `backend/app/services/auth_service.py`
- [Review history](https://github.com/yashasgowda08/smart-ai-code-reviewer/blob/main/backend/app/services/history_service.py): `backend/app/services/history_service.py`
- [SQLite database](https://github.com/yashasgowda08/smart-ai-code-reviewer/blob/main/backend/app/database/database.py): `backend/app/database/database.py`

### Reports and integrations

- [PDF reports](https://github.com/yashasgowda08/smart-ai-code-reviewer/blob/main/backend/app/services/pdf_service.py): `backend/app/services/pdf_service.py`
- [Export endpoints](https://github.com/yashasgowda08/smart-ai-code-reviewer/blob/main/backend/app/api/exports.py): `backend/app/api/exports.py`
- [GitHub, URL and notifications](https://github.com/yashasgowda08/smart-ai-code-reviewer/tree/main/backend/app/api): `backend/app/api`

### Other components

- **Developer**

## Connections

- Developer → App navigation: uses (evidence: `README.md`)
- App navigation → Review workspace: opens (evidence: `frontend/src/App.jsx`)
- App navigation → Review dashboard: opens (evidence: `frontend/src/App.jsx`)
- App navigation → History view: opens (evidence: `frontend/src/App.jsx`)
- App navigation → Login view: opens (evidence: `frontend/src/App.jsx`)
- App navigation → Registration view: opens (evidence: `frontend/src/App.jsx`)
- App navigation → Admin dashboard: opens (evidence: `frontend/src/App.jsx`)
- Review workspace → API client: submits reviews (evidence: `frontend/src/pages/Review.jsx`)
- Login view → API client: authenticates via
- Registration view → API client: registers via
- History view → API client: loads history via
- Admin dashboard → API client: loads admin data via (evidence: `frontend/src/pages/AdminDashboard.jsx`)
- API client → FastAPI application: calls REST API (evidence: `README.md`)
- FastAPI application → Review endpoints: routes to (evidence: `backend/app/main.py`)
- FastAPI application → Repository endpoint: routes to (evidence: `backend/app/main.py`)
- Review endpoints → Input processing: normalizes input (evidence: `backend/app/api/code_review.py`)
- Repository endpoint → Input processing: scans directory (evidence: `backend/app/api/repository.py`)
- Input processing → Diff processing: processes diffs (evidence: `backend/app/processors/input_processor.py`)
- Review endpoints → Review orchestration: executes review (evidence: `backend/app/api/code_review.py`)
- Review orchestration → Static analysis: runs analysis
- Static analysis → Specialist agents: coordinates
- Review orchestration → Groq AI review: requests AI review
- Review orchestration → Consensus scoring: reconciles scores
- Review orchestration → SQLite database: persists reviews
- FastAPI application → Authentication endpoints: routes to (evidence: `backend/app/main.py`)
- Authentication endpoints → Authentication service: handles credentials
- Authentication service → SQLite database: reads and writes (evidence: `backend/app/services/auth_service.py`)
- Review history → SQLite database: loads history
- Review orchestration → PDF reports: generates reports
- FastAPI application → Export endpoints: routes to (evidence: `backend/app/main.py`)
- FastAPI application → GitHub, URL and notifications: routes to (evidence: `backend/app/main.py`)
