# lauphilip/au-btech-literature-review-agent architecture

> Architecture diagram of the GitHub repository lauphilip/au-btech-literature-review-agent, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-06-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/lauphilip/au-btech-literature-review-agent
- Repository: https://github.com/lauphilip/au-btech-literature-review-agent

## Overview

1. **Overall shape**
   - This is a single .NET 10 application named **AuBtechReviewAgent**.
   - It combines a **Blazor UI** with a backend review pipeline for literature synthesis and PRISMA-style reporting.

2. **Application entry and UI shell**
   - `Program.cs` boots the app and wires services.
   - `Components/App.razor`, `Routes.razor`, and the layout components define the browser-facing shell.
   - `MainLayout`, `NavMenu`, and `ReconnectModal` indicate a stateful interactive UI, with Bootstrap used for styling.

3. **Primary user-facing screens**
   - `Home.razor` is the main landing/control page.
   - `SpecMatrix.razor` is the most important domain screen: it likely surfaces the structured screening/matrix view for the review process.
   - `Error.razor` and `NotFound.razor` handle failure and routing boundaries.

4. **Core orchestration engine**
   - `PrismaReviewEngine.cs` is the central workflow coordinator.
   - From the README, the engine’s role is to execute the review pipeline end-to-end: query sources, screen candidates, ingest manuscripts, chunk documents, and synthesize PRISMA-compliant outputs.

5. **Source-adapter boundary**
   - `IAcademicSource.cs` defines the abstraction for literature providers.
   - `ArxivSource`, `ElsevierSource`, `GoogleScholarSource`, `IeeeXploreSource`, and `ResearchGateSource` are provider-specific adapters.
   - This isolates external source behavior from the rest of the pipeline and makes the ingestion stage pluggable.

6. **Document processing and grounding**
   - `DocumentRAGUtility.cs` is the document-analysis layer used to turn raw papers into retrievable context for synthesis.
   - The README describes a chunking and grounding flow: PDFs are parsed, split into overlapping text windows, and passed into the synthesis stage so outputs are tied back to source evidence rather than free-form text.

7. **Review data model**
   - `ReviewModels.cs` likely contains the shared domain objects used across the pipeline: papers, screening results, evidence chunks, report items, and trace records.
   - This forms the contract between source ingestion, screening, ranking, and reporting.

8. **Quality / venue ranking subsystem**
   - `JournalRankingMatcher.cs` is a separate enrichment step for mapping venues to quality/ranking data.
   - The `ScimagoData` folder contains year-specific CSVs from 2020–2025, which act as a local reference dataset for journal/venue ranking lookups.

9. **State management and UI coordination**
   - `UiStateContainer.cs` likely holds shared application state across components, such as current review progress, selected dataset, or generated results.
   - This is the main bridge between the review engine and the interactive Blazor views.

10. **Outputs and artifacts**
   - `prisma-report.json` is a key generated artifact and represents the structured PRISMA checklist/report output.
   - The README also describes a disposable workspace containing source PDFs and a process trace, which implies the pipeline produces auditable run artifacts rather than only a final textual summary.

11. **Configuration and runtime boundaries**
   - `appsettings.json` and `appsettings.Development.json` hold environment-specific settings for the pipeline and UI.
   - `Properties/launchSettings.json` shows it is intended to run as a local .NET app during development.
   - There is no visible database layer; the architecture appears file- and service-driven, with local CSVs and generated JSON artifacts as the main persistence surfaces.

12. **End-to-end data flow**
   - User action in the Blazor UI triggers the review engine.
   - The engine queries external academic sources through the provider interfaces.
   - Candidate papers are screened and enriched with ranking data.
   - PDFs are ingested and chunked for grounded synthesis.
   - The final outputs are the PRISMA report and traceable review artifacts, which are then displayed back in the UI.

13. **Important architectural boundary**
   - The key design boundary is between **external evidence acquisition** and **internal synthesis**.
   - Source adapters and local ranking CSVs collect inputs; the review engine and document utilities transform them into auditable, reproducible report artifacts.

Main entry points: [`AuBtechReviewAgent/PrismaReviewEngine.cs`](https://github.com/lauphilip/au-btech-literature-review-agent/blob/master/AuBtechReviewAgent/PrismaReviewEngine.cs) (Review engine), [`AuBtechReviewAgent/IAcademicSource.cs`](https://github.com/lauphilip/au-btech-literature-review-agent/blob/master/AuBtechReviewAgent/IAcademicSource.cs) (Source contract), [`AuBtechReviewAgent/Components`](https://github.com/lauphilip/au-btech-literature-review-agent/tree/master/AuBtechReviewAgent/Components) (App shell), [`AuBtechReviewAgent/UiStateContainer.cs`](https://github.com/lauphilip/au-btech-literature-review-agent/blob/master/AuBtechReviewAgent/UiStateContainer.cs) (UI state)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["UI shell"]
  node_program["Program<br/>host bootstrap<br/>[Program.cs]"]
  node_shell["App shell<br/>blazor shell"]
  node_home["Home<br/>landing page<br/>[Home.razor]"]
  node_specmatrix["Spec Matrix<br/>domain page<br/>[SpecMatrix.razor]"]
  node_routefails["Error pages<br/>routing fallback<br/>[Error.razor]"]
  node_layout["Layout<br/>shared ui"]
end

subgraph group_pipeline["Review pipeline"]
  node_engine{{"Review engine<br/>pipeline orchestrator"}}
  node_models["Review models<br/>domain contract<br/>[ReviewModels.cs]"]
  node_state(("UI state<br/>shared state"))
  node_rag["Document RAG<br/>document processing"]
  node_ranker["Journal ranker<br/>venue enrichment"]
end

subgraph group_sources["Source adapters"]
  node_sourceapi["Source contract<br/>provider interface<br/>[IAcademicSource.cs]"]
  node_arxiv["ArXiv<br/>source adapter<br/>[ArxivSource.cs]"]
  node_elsevier["Elsevier<br/>source adapter<br/>[ElsevierSource.cs]"]
  node_scholar["Scholar<br/>source adapter"]
  node_ieee["IEEE Xplore<br/>source adapter"]
  node_researchgate["ResearchGate<br/>source adapter"]
end

subgraph group_data["Reference data"]
  node_scimago[("Scimago data<br/>local reference set")]
  node_report["PRISMA report<br/>generated artifact<br/>[prisma-report.json]"]
end

node_program -->|"boots"| node_shell
node_shell -->|"renders"| node_layout
node_shell -->|"routes to"| node_home
node_shell -->|"routes to"| node_specmatrix
node_shell -.->|"fallbacks"| node_routefails
node_layout -->|"binds"| node_state
node_home -->|"starts review"| node_engine
node_specmatrix -->|"shows"| node_state
node_engine -->|"uses"| node_sourceapi
node_sourceapi -.->|"implemented by"| node_arxiv
node_sourceapi -.->|"implemented by"| node_elsevier
node_sourceapi -.->|"implemented by"| node_scholar
node_sourceapi -.->|"implemented by"| node_ieee
node_sourceapi -.->|"implemented by"| node_researchgate
node_engine -->|"enriches via"| node_ranker
node_ranker -->|"looks up"| node_scimago
node_engine -->|"grounds with"| node_rag
node_engine -->|"structures with"| node_models
node_rag -->|"emits"| node_models
node_engine -->|"writes"| node_report
node_state -.->|"reflects"| node_engine

click node_program "https://github.com/lauphilip/au-btech-literature-review-agent/blob/master/AuBtechReviewAgent/Program.cs"
click node_shell "https://github.com/lauphilip/au-btech-literature-review-agent/tree/master/AuBtechReviewAgent/Components"
click node_home "https://github.com/lauphilip/au-btech-literature-review-agent/blob/master/AuBtechReviewAgent/Components/Pages/Home.razor"
click node_specmatrix "https://github.com/lauphilip/au-btech-literature-review-agent/blob/master/AuBtechReviewAgent/Components/Pages/SpecMatrix.razor"
click node_routefails "https://github.com/lauphilip/au-btech-literature-review-agent/blob/master/AuBtechReviewAgent/Components/Pages/Error.razor"
click node_layout "https://github.com/lauphilip/au-btech-literature-review-agent/tree/master/AuBtechReviewAgent/Components/Layout"
click node_engine "https://github.com/lauphilip/au-btech-literature-review-agent/blob/master/AuBtechReviewAgent/PrismaReviewEngine.cs"
click node_models "https://github.com/lauphilip/au-btech-literature-review-agent/blob/master/AuBtechReviewAgent/ReviewModels.cs"
click node_state "https://github.com/lauphilip/au-btech-literature-review-agent/blob/master/AuBtechReviewAgent/UiStateContainer.cs"
click node_rag "https://github.com/lauphilip/au-btech-literature-review-agent/blob/master/AuBtechReviewAgent/DocumentRAGUtility.cs"
click node_ranker "https://github.com/lauphilip/au-btech-literature-review-agent/blob/master/AuBtechReviewAgent/JournalRankingMatcher.cs"
click node_sourceapi "https://github.com/lauphilip/au-btech-literature-review-agent/blob/master/AuBtechReviewAgent/IAcademicSource.cs"
click node_arxiv "https://github.com/lauphilip/au-btech-literature-review-agent/blob/master/AuBtechReviewAgent/ArxivSource.cs"
click node_elsevier "https://github.com/lauphilip/au-btech-literature-review-agent/blob/master/AuBtechReviewAgent/ElsevierSource.cs"
click node_scholar "https://github.com/lauphilip/au-btech-literature-review-agent/blob/master/AuBtechReviewAgent/GoogleScholarSource.cs"
click node_ieee "https://github.com/lauphilip/au-btech-literature-review-agent/blob/master/AuBtechReviewAgent/IeeeXploreSource.cs"
click node_researchgate "https://github.com/lauphilip/au-btech-literature-review-agent/blob/master/AuBtechReviewAgent/ResearchGateSource.cs"
click node_scimago "https://github.com/lauphilip/au-btech-literature-review-agent/tree/master/AuBtechReviewAgent/ScimagoData"
click node_report "https://github.com/lauphilip/au-btech-literature-review-agent/blob/master/AuBtechReviewAgent/prisma-report.json"

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_program,node_shell,node_home,node_specmatrix,node_routefails,node_layout toneBlue
class node_engine,node_models,node_state,node_rag,node_ranker toneAmber
class node_sourceapi,node_arxiv,node_elsevier,node_scholar,node_ieee,node_researchgate toneMint
class node_scimago,node_report toneRose
```

## Components

### UI shell

Blazor browser surface and shared layout

- [Program](https://github.com/lauphilip/au-btech-literature-review-agent/blob/master/AuBtechReviewAgent/Program.cs): host bootstrap · Application startup and dependency wiring · `AuBtechReviewAgent/Program.cs`
- [App shell](https://github.com/lauphilip/au-btech-literature-review-agent/tree/master/AuBtechReviewAgent/Components): blazor shell · Root app, routing, layout, and interactive navigation · `AuBtechReviewAgent/Components`
- [Home](https://github.com/lauphilip/au-btech-literature-review-agent/blob/master/AuBtechReviewAgent/Components/Pages/Home.razor): landing page · Main entry and control screen · `AuBtechReviewAgent/Components/Pages/Home.razor`
- [Spec Matrix](https://github.com/lauphilip/au-btech-literature-review-agent/blob/master/AuBtechReviewAgent/Components/Pages/SpecMatrix.razor): domain page · Structured screening and review matrix view · `AuBtechReviewAgent/Components/Pages/SpecMatrix.razor`
- [Error pages](https://github.com/lauphilip/au-btech-literature-review-agent/blob/master/AuBtechReviewAgent/Components/Pages/Error.razor): routing fallback · Error and not-found boundaries · `AuBtechReviewAgent/Components/Pages/Error.razor`
- [Layout](https://github.com/lauphilip/au-btech-literature-review-agent/tree/master/AuBtechReviewAgent/Components/Layout): shared ui · Main layout, nav menu, and reconnect modal · `AuBtechReviewAgent/Components/Layout`

### Review pipeline

End-to-end literature review orchestration and synthesis

- [Review engine](https://github.com/lauphilip/au-btech-literature-review-agent/blob/master/AuBtechReviewAgent/PrismaReviewEngine.cs): pipeline orchestrator · Coordinates query, screening, ingestion, and PRISMA output · `AuBtechReviewAgent/PrismaReviewEngine.cs`
- [Review models](https://github.com/lauphilip/au-btech-literature-review-agent/blob/master/AuBtechReviewAgent/ReviewModels.cs): domain contract · Shared pipeline data structures and review records · `AuBtechReviewAgent/ReviewModels.cs`
- [UI state](https://github.com/lauphilip/au-btech-literature-review-agent/blob/master/AuBtechReviewAgent/UiStateContainer.cs): shared state · Cross-component application state and progress tracking · `AuBtechReviewAgent/UiStateContainer.cs`
- [Document RAG](https://github.com/lauphilip/au-btech-literature-review-agent/blob/master/AuBtechReviewAgent/DocumentRAGUtility.cs): document processing · PDF chunking, grounding, and retrieval context assembly · `AuBtechReviewAgent/DocumentRAGUtility.cs`
- [Journal ranker](https://github.com/lauphilip/au-btech-literature-review-agent/blob/master/AuBtechReviewAgent/JournalRankingMatcher.cs): venue enrichment · Maps venues to ranking and quality data · `AuBtechReviewAgent/JournalRankingMatcher.cs`

### Source adapters

External academic provider integrations

- [Source contract](https://github.com/lauphilip/au-btech-literature-review-agent/blob/master/AuBtechReviewAgent/IAcademicSource.cs): provider interface · Abstraction for academic literature sources · `AuBtechReviewAgent/IAcademicSource.cs`
- [ArXiv](https://github.com/lauphilip/au-btech-literature-review-agent/blob/master/AuBtechReviewAgent/ArxivSource.cs): source adapter · Provider-specific literature adapter · `AuBtechReviewAgent/ArxivSource.cs`
- [Elsevier](https://github.com/lauphilip/au-btech-literature-review-agent/blob/master/AuBtechReviewAgent/ElsevierSource.cs): source adapter · Provider-specific literature adapter · `AuBtechReviewAgent/ElsevierSource.cs`
- [Scholar](https://github.com/lauphilip/au-btech-literature-review-agent/blob/master/AuBtechReviewAgent/GoogleScholarSource.cs): source adapter · Provider-specific literature adapter · `AuBtechReviewAgent/GoogleScholarSource.cs`
- [IEEE Xplore](https://github.com/lauphilip/au-btech-literature-review-agent/blob/master/AuBtechReviewAgent/IeeeXploreSource.cs): source adapter · Provider-specific literature adapter · `AuBtechReviewAgent/IeeeXploreSource.cs`
- [ResearchGate](https://github.com/lauphilip/au-btech-literature-review-agent/blob/master/AuBtechReviewAgent/ResearchGateSource.cs): source adapter · Provider-specific literature adapter · `AuBtechReviewAgent/ResearchGateSource.cs`

### Reference data

Local ranking data and generated artifacts

- [Scimago data](https://github.com/lauphilip/au-btech-literature-review-agent/tree/master/AuBtechReviewAgent/ScimagoData): local reference set · Year-specific CSV venue ranking data · `AuBtechReviewAgent/ScimagoData`
- [PRISMA report](https://github.com/lauphilip/au-btech-literature-review-agent/blob/master/AuBtechReviewAgent/prisma-report.json): generated artifact · Structured PRISMA-style output artifact · `AuBtechReviewAgent/prisma-report.json`

## Connections

- Program → App shell: boots · Starts the Blazor application and services
- App shell → Layout: renders · Provides shared navigation and page chrome
- App shell → Home: routes to · Exposes the main landing screen
- App shell → Spec Matrix: routes to · Exposes the core review workspace
- App shell → Error pages: fallbacks · Handles error and not-found states
- Layout → UI state: binds · Shares app state across interactive components
- Home → Review engine: starts review · Triggers the review workflow from the UI
- Spec Matrix → UI state: shows · Displays current review progress and results
- Review engine → Source contract: uses · Queries literature through the source abstraction
- Source contract → ArXiv: implemented by · ArXiv provider integration
- Source contract → Elsevier: implemented by · Elsevier provider integration
- Source contract → Scholar: implemented by · Google Scholar provider integration
- Source contract → IEEE Xplore: implemented by · IEEE Xplore provider integration
- Source contract → ResearchGate: implemented by · ResearchGate provider integration
- Review engine → Journal ranker: enriches via · Adds venue ranking and quality context
- Journal ranker → Scimago data: looks up · Reads local Scimago reference CSVs
- Review engine → Document RAG: grounds with · Chunks and retrieves document evidence for synthesis
- Review engine → Review models: structures with · Uses shared review domain contracts
- Document RAG → Review models: emits · Produces evidence chunks and traceable context
- Review engine → PRISMA report: writes · Generates the PRISMA report artifact
- UI state → Review engine: reflects · Mirrors pipeline progress and outputs in the UI
