# samkeerth07-lgtm/innogap architecture

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

- Interactive diagram: https://gitdiagram.com/samkeerth07-lgtm/innogap
- Repository: https://github.com/samkeerth07-lgtm/innogap

## Overview

InnoGap analyzes a user’s problem and proposed solution, searches open-source repositories and academic literature, evaluates candidates, and returns a verdict and potential innovation gap. The React interface submits analysis requests to the Express backend and renders results. The repository also contains a separate FastAPI/LangGraph agent backend with its own analysis workflow; the excerpts do not show which backend the deployed product uses. Edges reflect shown calls and documented routing; unsampled analysis stages are included where the source index identifies them, with evidence limits noted through omitted links.

Main entry points: [`Backend/src/controllers/analysisController.js`](https://github.com/samkeerth07-lgtm/innogap/blob/main/Backend/src/controllers/analysisController.js) (Analysis coordinator), [`AI/app/agents/orchestrator.py`](https://github.com/samkeerth07-lgtm/innogap/blob/main/AI/app/agents/orchestrator.py) (Workflow orchestrator), [`Frontend/src/App.jsx`](https://github.com/samkeerth07-lgtm/innogap/blob/main/Frontend/src/App.jsx) (Application UI), [`Backend/src/app.js`](https://github.com/samkeerth07-lgtm/innogap/blob/main/Backend/src/app.js) (Express app)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["User interface"]
  node_app_ui["Application UI<br/>[App.jsx]"]
  node_result_view["Analysis results"]
  node_source_views["Source browser<br/>[SourcesPage.jsx]"]
end

subgraph group_node_backend["Express analysis backend"]
  node_api_app["Express app<br/>[app.js]"]
  node_analysis_route["Analysis route<br/>[analysisroutes.js]"]
  node_analysis_controller["Analysis coordinator"]
  node_github_service["GitHub search<br/>[githubService.js]"]
  node_openalex_service["OpenAlex search<br/>[openAlexService.js]"]
  node_problem_analysis["Problem analysis<br/>[problemAnalyzer.js]"]
  node_relevance_analysis["Candidate relevance"]
  node_paper_analysis["Paper analysis<br/>[paperAnalyzer.js]"]
  node_similarity_analysis["Similarity analysis"]
  node_comparison_analysis["Gap comparison"]
  node_result_analysis["Overall verdict<br/>[resultAnalyzer.js]"]
end

subgraph group_ai_backend["Agent analysis backend"]
  node_fastapi_app["FastAPI app<br/>[main.py]"]
  node_ai_routes["Analysis endpoint<br/>[routes.py]"]
  node_orchestrator["Workflow orchestrator<br/>[orchestrator.py]"]
  node_github_search_tool["GitHub search"]
  node_openalex_search_tool["OpenAlex search"]
  node_candidate_evaluation["Candidate evaluation"]
  node_synthesis_tools["Verdict and gap"]
  node_verification["Result verification<br/>[verifier.py]"]
  node_llm_service["LLM service<br/>[llm_client.py]"]
end

subgraph group_domain["Analysis models"]
  node_analysis_schema["Analysis contracts<br/>[analysis.py]"]
  node_solution_schema["Solution models<br/>[solutions.py]"]
  node_tool_schema["Tool contracts<br/>[tools.py]"]
  node_verification_schema["Verification models<br/>[verification.py]"]
end

node_user(("Analyst"))
node_github_api{{"GitHub API"}}
node_openalex_api{{"OpenAlex API"}}

node_user -->|"submits idea"| node_app_ui
node_app_ui -->|"posts analysis"| node_api_app
node_api_app -->|"mounts routes"| node_analysis_route
node_analysis_route -->|"routes requests"| node_analysis_controller
node_analysis_controller -->|"analyzes problem"| node_problem_analysis
node_analysis_controller -->|"searches repositories"| node_github_service
node_analysis_controller -->|"searches papers"| node_openalex_service
node_analysis_controller -->|"scores candidates"| node_relevance_analysis
node_analysis_controller -->|"analyzes papers"| node_paper_analysis
node_analysis_controller -->|"scores similarity"| node_similarity_analysis
node_analysis_controller -->|"compares solutions"| node_comparison_analysis
node_analysis_controller -->|"assembles verdict"| node_result_analysis
node_github_service -->|"fetches repositories"| node_github_api
node_openalex_service -.->|"fetches works"| node_openalex_api
node_analysis_controller -.->|"returns analysis"| node_app_ui
node_app_ui -->|"renders result"| node_result_view
node_app_ui -->|"opens sources"| node_source_views
node_fastapi_app -->|"mounts endpoint"| node_ai_routes
node_ai_routes -->|"executes analysis"| node_orchestrator
node_orchestrator -->|"searches GitHub"| node_github_search_tool
node_orchestrator -->|"searches literature"| node_openalex_search_tool
node_orchestrator -->|"evaluates candidates"| node_candidate_evaluation
node_orchestrator -->|"synthesizes findings"| node_synthesis_tools
node_orchestrator -->|"verifies results"| node_verification
node_github_search_tool -->|"queries API"| node_github_api
node_openalex_search_tool -->|"queries works"| node_openalex_api
node_orchestrator -->|"validates request"| node_analysis_schema
node_orchestrator -->|"builds solutions"| node_solution_schema
node_orchestrator -->|"uses tool contracts"| node_tool_schema
node_verification -->|"checks output"| node_verification_schema
node_candidate_evaluation -.->|"requests model output"| node_llm_service

click node_app_ui "https://github.com/samkeerth07-lgtm/innogap/blob/main/Frontend/src/App.jsx"
click node_result_view "https://github.com/samkeerth07-lgtm/innogap/blob/main/Frontend/src/components/AnalysisResultPage.jsx"
click node_source_views "https://github.com/samkeerth07-lgtm/innogap/blob/main/Frontend/src/components/SourcesPage.jsx"
click node_api_app "https://github.com/samkeerth07-lgtm/innogap/blob/main/Backend/src/app.js"
click node_analysis_route "https://github.com/samkeerth07-lgtm/innogap/blob/main/Backend/src/routes/analysisroutes.js"
click node_analysis_controller "https://github.com/samkeerth07-lgtm/innogap/blob/main/Backend/src/controllers/analysisController.js"
click node_github_service "https://github.com/samkeerth07-lgtm/innogap/blob/main/Backend/src/services/githubService.js"
click node_openalex_service "https://github.com/samkeerth07-lgtm/innogap/blob/main/Backend/src/services/openAlexService.js"
click node_problem_analysis "https://github.com/samkeerth07-lgtm/innogap/blob/main/Backend/src/analyzers/problemAnalyzer.js"
click node_relevance_analysis "https://github.com/samkeerth07-lgtm/innogap/blob/main/Backend/src/analyzers/relevanceAnalyzer.js"
click node_paper_analysis "https://github.com/samkeerth07-lgtm/innogap/blob/main/Backend/src/analyzers/paperAnalyzer.js"
click node_similarity_analysis "https://github.com/samkeerth07-lgtm/innogap/blob/main/Backend/src/analyzers/similarityAnalyzer.js"
click node_comparison_analysis "https://github.com/samkeerth07-lgtm/innogap/blob/main/Backend/src/analyzers/comparisonAnalyzer.js"
click node_result_analysis "https://github.com/samkeerth07-lgtm/innogap/blob/main/Backend/src/analyzers/resultAnalyzer.js"
click node_fastapi_app "https://github.com/samkeerth07-lgtm/innogap/blob/main/AI/app/main.py"
click node_ai_routes "https://github.com/samkeerth07-lgtm/innogap/blob/main/AI/app/api/routes.py"
click node_orchestrator "https://github.com/samkeerth07-lgtm/innogap/blob/main/AI/app/agents/orchestrator.py"
click node_github_search_tool "https://github.com/samkeerth07-lgtm/innogap/blob/main/AI/app/tools/github_search_tool.py"
click node_openalex_search_tool "https://github.com/samkeerth07-lgtm/innogap/blob/main/AI/app/tools/openalex_search_tool.py"
click node_candidate_evaluation "https://github.com/samkeerth07-lgtm/innogap/tree/main/AI/app/tools"
click node_synthesis_tools "https://github.com/samkeerth07-lgtm/innogap/tree/main/AI/app/tools"
click node_verification "https://github.com/samkeerth07-lgtm/innogap/blob/main/AI/app/agents/verifier.py"
click node_llm_service "https://github.com/samkeerth07-lgtm/innogap/blob/main/AI/app/utils/llm_client.py"
click node_analysis_schema "https://github.com/samkeerth07-lgtm/innogap/blob/main/AI/app/schemas/analysis.py"
click node_solution_schema "https://github.com/samkeerth07-lgtm/innogap/blob/main/AI/app/schemas/solutions.py"
click node_tool_schema "https://github.com/samkeerth07-lgtm/innogap/blob/main/AI/app/schemas/tools.py"
click node_verification_schema "https://github.com/samkeerth07-lgtm/innogap/blob/main/AI/app/schemas/verification.py"

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_ui,node_result_view,node_source_views toneBlue
class node_api_app,node_analysis_route,node_analysis_controller,node_github_service,node_openalex_service,node_problem_analysis,node_relevance_analysis,node_paper_analysis,node_similarity_analysis,node_comparison_analysis,node_result_analysis toneAmber
class node_fastapi_app,node_ai_routes,node_orchestrator,node_github_search_tool,node_openalex_search_tool,node_candidate_evaluation,node_synthesis_tools,node_verification,node_llm_service,node_github_api,node_openalex_api toneMint
class node_analysis_schema,node_solution_schema,node_tool_schema,node_verification_schema toneRose
class node_user toneIndigo
```

## Components

### User interface

- [Application UI](https://github.com/samkeerth07-lgtm/innogap/blob/main/Frontend/src/App.jsx): `Frontend/src/App.jsx`
- [Analysis results](https://github.com/samkeerth07-lgtm/innogap/blob/main/Frontend/src/components/AnalysisResultPage.jsx): `Frontend/src/components/AnalysisResultPage.jsx`
- [Source browser](https://github.com/samkeerth07-lgtm/innogap/blob/main/Frontend/src/components/SourcesPage.jsx): `Frontend/src/components/SourcesPage.jsx`

### Express analysis backend

- [Express app](https://github.com/samkeerth07-lgtm/innogap/blob/main/Backend/src/app.js): `Backend/src/app.js`
- [Analysis route](https://github.com/samkeerth07-lgtm/innogap/blob/main/Backend/src/routes/analysisroutes.js): `Backend/src/routes/analysisroutes.js`
- [Analysis coordinator](https://github.com/samkeerth07-lgtm/innogap/blob/main/Backend/src/controllers/analysisController.js): `Backend/src/controllers/analysisController.js`
- [GitHub search](https://github.com/samkeerth07-lgtm/innogap/blob/main/Backend/src/services/githubService.js): `Backend/src/services/githubService.js`
- [OpenAlex search](https://github.com/samkeerth07-lgtm/innogap/blob/main/Backend/src/services/openAlexService.js): `Backend/src/services/openAlexService.js`
- [Problem analysis](https://github.com/samkeerth07-lgtm/innogap/blob/main/Backend/src/analyzers/problemAnalyzer.js): `Backend/src/analyzers/problemAnalyzer.js`
- [Candidate relevance](https://github.com/samkeerth07-lgtm/innogap/blob/main/Backend/src/analyzers/relevanceAnalyzer.js): `Backend/src/analyzers/relevanceAnalyzer.js`
- [Paper analysis](https://github.com/samkeerth07-lgtm/innogap/blob/main/Backend/src/analyzers/paperAnalyzer.js): `Backend/src/analyzers/paperAnalyzer.js`
- [Similarity analysis](https://github.com/samkeerth07-lgtm/innogap/blob/main/Backend/src/analyzers/similarityAnalyzer.js): `Backend/src/analyzers/similarityAnalyzer.js`
- [Gap comparison](https://github.com/samkeerth07-lgtm/innogap/blob/main/Backend/src/analyzers/comparisonAnalyzer.js): `Backend/src/analyzers/comparisonAnalyzer.js`
- [Overall verdict](https://github.com/samkeerth07-lgtm/innogap/blob/main/Backend/src/analyzers/resultAnalyzer.js): `Backend/src/analyzers/resultAnalyzer.js`

### Agent analysis backend

- [FastAPI app](https://github.com/samkeerth07-lgtm/innogap/blob/main/AI/app/main.py): `AI/app/main.py`
- [Analysis endpoint](https://github.com/samkeerth07-lgtm/innogap/blob/main/AI/app/api/routes.py): `AI/app/api/routes.py`
- [Workflow orchestrator](https://github.com/samkeerth07-lgtm/innogap/blob/main/AI/app/agents/orchestrator.py): `AI/app/agents/orchestrator.py`
- [GitHub search](https://github.com/samkeerth07-lgtm/innogap/blob/main/AI/app/tools/github_search_tool.py): `AI/app/tools/github_search_tool.py`
- [OpenAlex search](https://github.com/samkeerth07-lgtm/innogap/blob/main/AI/app/tools/openalex_search_tool.py): `AI/app/tools/openalex_search_tool.py`
- [Candidate evaluation](https://github.com/samkeerth07-lgtm/innogap/tree/main/AI/app/tools): `AI/app/tools`
- [Verdict and gap](https://github.com/samkeerth07-lgtm/innogap/tree/main/AI/app/tools): `AI/app/tools`
- [Result verification](https://github.com/samkeerth07-lgtm/innogap/blob/main/AI/app/agents/verifier.py): `AI/app/agents/verifier.py`
- [LLM service](https://github.com/samkeerth07-lgtm/innogap/blob/main/AI/app/utils/llm_client.py): `AI/app/utils/llm_client.py`

### Analysis models

- [Analysis contracts](https://github.com/samkeerth07-lgtm/innogap/blob/main/AI/app/schemas/analysis.py): `AI/app/schemas/analysis.py`
- [Solution models](https://github.com/samkeerth07-lgtm/innogap/blob/main/AI/app/schemas/solutions.py): `AI/app/schemas/solutions.py`
- [Tool contracts](https://github.com/samkeerth07-lgtm/innogap/blob/main/AI/app/schemas/tools.py): `AI/app/schemas/tools.py`
- [Verification models](https://github.com/samkeerth07-lgtm/innogap/blob/main/AI/app/schemas/verification.py): `AI/app/schemas/verification.py`

### Other components

- **Analyst**
- **GitHub API**
- **OpenAlex API**

## Connections

- Analyst → Application UI: submits idea
- Application UI → Express app: posts analysis (evidence: `Frontend/src/App.jsx`)
- Express app → Analysis route: mounts routes (evidence: `Backend/src/app.js`)
- Analysis route → Analysis coordinator: routes requests (evidence: `Backend/src/routes/analysisroutes.js`)
- Analysis coordinator → Problem analysis: analyzes problem (evidence: `Backend/src/controllers/analysisController.js`)
- Analysis coordinator → GitHub search: searches repositories (evidence: `Backend/src/controllers/analysisController.js`)
- Analysis coordinator → OpenAlex search: searches papers (evidence: `Backend/src/controllers/analysisController.js`)
- Analysis coordinator → Candidate relevance: scores candidates (evidence: `Backend/src/controllers/analysisController.js`)
- Analysis coordinator → Paper analysis: analyzes papers (evidence: `Backend/src/controllers/analysisController.js`)
- Analysis coordinator → Similarity analysis: scores similarity (evidence: `Backend/src/controllers/analysisController.js`)
- Analysis coordinator → Gap comparison: compares solutions (evidence: `Backend/src/controllers/analysisController.js`)
- Analysis coordinator → Overall verdict: assembles verdict (evidence: `Backend/src/controllers/analysisController.js`)
- GitHub search → GitHub API: fetches repositories (evidence: `Backend/src/services/githubService.js`)
- OpenAlex search → OpenAlex API: fetches works
- Analysis coordinator → Application UI: returns analysis
- Application UI → Analysis results: renders result (evidence: `Frontend/src/App.jsx`)
- Application UI → Source browser: opens sources (evidence: `Frontend/src/App.jsx`)
- FastAPI app → Analysis endpoint: mounts endpoint (evidence: `AI/app/main.py`)
- Analysis endpoint → Workflow orchestrator: executes analysis (evidence: `AI/app/api/routes.py`)
- Workflow orchestrator → GitHub search: searches GitHub (evidence: `AI/app/agents/orchestrator.py`)
- Workflow orchestrator → OpenAlex search: searches literature (evidence: `AI/app/agents/orchestrator.py`)
- Workflow orchestrator → Candidate evaluation: evaluates candidates (evidence: `AI/app/agents/orchestrator.py`)
- Workflow orchestrator → Verdict and gap: synthesizes findings (evidence: `AI/app/agents/orchestrator.py`)
- Workflow orchestrator → Result verification: verifies results (evidence: `AI/app/agents/orchestrator.py`)
- GitHub search → GitHub API: queries API (evidence: `AI/app/tools/github_search_tool.py`)
- OpenAlex search → OpenAlex API: queries works (evidence: `AI/app/tools/openalex_search_tool.py`)
- Workflow orchestrator → Analysis contracts: validates request (evidence: `AI/app/api/routes.py`)
- Workflow orchestrator → Solution models: builds solutions (evidence: `AI/app/agents/orchestrator.py`)
- Workflow orchestrator → Tool contracts: uses tool contracts (evidence: `AI/app/agents/orchestrator.py`)
- Result verification → Verification models: checks output (evidence: `AI/app/agents/verifier.py`)
- Candidate evaluation → LLM service: requests model output (evidence: `AI/app/tools/gap_comparison_tool.py`)
