# brigitte-castaneda/synthie architecture

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

- Interactive diagram: https://gitdiagram.com/brigitte-castaneda/synthie
- Repository: https://github.com/brigitte-castaneda/synthie

## Overview

SynthIE is a React-based AI editorial board for Industrial Engineering research papers. An author uploads a PDF or text file and may provide context; the app submits the document for rubric-based analysis, then presents scores, writing feedback, section critiques, and missed references. Authors can continue with contextual chat and attachments. The README also describes a local Ollama deployment option, but the sampled app imports the Gemini service; the Ollama implementation is shown separately as an alternative. Analysis stages are described in the README, while sampled code delegates them to the AI service rather than exposing separate runtime modules.

Main entry points: [`App.tsx`](https://github.com/brigitte-castaneda/synthie/blob/main/App.tsx) (Upload and orchestration), [`services/geminiService.ts`](https://github.com/brigitte-castaneda/synthie/blob/main/services/geminiService.ts) (Draft analysis), [`components/AnalysisDashboard.tsx`](https://github.com/brigitte-castaneda/synthie/blob/main/components/AnalysisDashboard.tsx) (Scores and critique), [`components/ClusterVisualizer.tsx`](https://github.com/brigitte-castaneda/synthie/blob/main/components/ClusterVisualizer.tsx) (Four-pillar display)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Analysis workflow"]
  node_app["Upload and orchestration<br/>[App.tsx]"]
  node_progress["Analysis progress<br/>[SimulationStep.tsx]"]
  node_analysis_types["Analysis data types<br/>[types.ts]"]
end

subgraph group_review["Review experience"]
  node_results["Scores and critique"]
  node_clusters["Four-pillar display"]
  node_rubric["Cluster definitions<br/>[constants.tsx]"]
  node_chat_ui["Editorial chat<br/>[ChatInterface.tsx]"]
end

subgraph group_ai["AI integrations"]
  node_analysis["Draft analysis<br/>[geminiService.ts]"]
  node_gemini{{"Google Gemini"}}
  node_ollama_service["Ollama alternative"]
  node_ollama{{"Ollama runtime"}}
  node_chat_service["Chat session<br/>[geminiService.ts]"]
end

node_author(("Research author"))

node_author -->|"uploads draft"| node_app
node_app -->|"requests analysis"| node_analysis
node_analysis -->|"submits document"| node_gemini
node_analysis -->|"returns scores"| node_app
node_app -->|"renders results"| node_results
node_app -->|"renders pillars"| node_clusters
node_app -->|"shows progress"| node_progress
node_clusters -->|"reads definitions"| node_rubric
node_results -->|"renders chat"| node_chat_ui
node_chat_ui -->|"creates session"| node_chat_service
node_chat_service -->|"starts conversation"| node_gemini
node_analysis -->|"returns analysis type"| node_analysis_types
node_ollama_service -->|"calls local API"| node_ollama
node_app -.->|"alternative configuration"| node_ollama_service

click node_app "https://github.com/brigitte-castaneda/synthie/blob/main/App.tsx"
click node_analysis "https://github.com/brigitte-castaneda/synthie/blob/main/services/geminiService.ts"
click node_ollama_service "https://github.com/brigitte-castaneda/synthie/blob/main/services/geminiService.ollama.ts"
click node_results "https://github.com/brigitte-castaneda/synthie/blob/main/components/AnalysisDashboard.tsx"
click node_clusters "https://github.com/brigitte-castaneda/synthie/blob/main/components/ClusterVisualizer.tsx"
click node_rubric "https://github.com/brigitte-castaneda/synthie/blob/main/constants.tsx"
click node_chat_ui "https://github.com/brigitte-castaneda/synthie/blob/main/components/ChatInterface.tsx"
click node_chat_service "https://github.com/brigitte-castaneda/synthie/blob/main/services/geminiService.ts"
click node_progress "https://github.com/brigitte-castaneda/synthie/blob/main/components/SimulationStep.tsx"
click node_analysis_types "https://github.com/brigitte-castaneda/synthie/blob/main/types.ts"

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_progress,node_analysis_types toneBlue
class node_results,node_clusters,node_rubric,node_chat_ui toneAmber
class node_analysis,node_gemini,node_ollama_service,node_ollama,node_chat_service toneMint
class node_author toneIndigo
```

## Components

### Analysis workflow

- [Upload and orchestration](https://github.com/brigitte-castaneda/synthie/blob/main/App.tsx): `App.tsx`
- [Analysis progress](https://github.com/brigitte-castaneda/synthie/blob/main/components/SimulationStep.tsx): `components/SimulationStep.tsx`
- [Analysis data types](https://github.com/brigitte-castaneda/synthie/blob/main/types.ts): `types.ts`

### Review experience

- [Scores and critique](https://github.com/brigitte-castaneda/synthie/blob/main/components/AnalysisDashboard.tsx): `components/AnalysisDashboard.tsx`
- [Four-pillar display](https://github.com/brigitte-castaneda/synthie/blob/main/components/ClusterVisualizer.tsx): `components/ClusterVisualizer.tsx`
- [Cluster definitions](https://github.com/brigitte-castaneda/synthie/blob/main/constants.tsx): `constants.tsx`
- [Editorial chat](https://github.com/brigitte-castaneda/synthie/blob/main/components/ChatInterface.tsx): `components/ChatInterface.tsx`

### AI integrations

- [Draft analysis](https://github.com/brigitte-castaneda/synthie/blob/main/services/geminiService.ts): `services/geminiService.ts`
- **Google Gemini**
- [Ollama alternative](https://github.com/brigitte-castaneda/synthie/blob/main/services/geminiService.ollama.ts): `services/geminiService.ollama.ts`
- **Ollama runtime**
- [Chat session](https://github.com/brigitte-castaneda/synthie/blob/main/services/geminiService.ts): `services/geminiService.ts`

### Other components

- **Research author**

## Connections

- Research author → Upload and orchestration: uploads draft (evidence: `README.md`)
- Upload and orchestration → Draft analysis: requests analysis (evidence: `App.tsx`)
- Draft analysis → Google Gemini: submits document (evidence: `services/geminiService.ts`)
- Draft analysis → Upload and orchestration: returns scores (evidence: `App.tsx`)
- Upload and orchestration → Scores and critique: renders results (evidence: `App.tsx`)
- Upload and orchestration → Four-pillar display: renders pillars (evidence: `App.tsx`)
- Upload and orchestration → Analysis progress: shows progress (evidence: `App.tsx`)
- Four-pillar display → Cluster definitions: reads definitions (evidence: `components/ClusterVisualizer.tsx`)
- Scores and critique → Editorial chat: renders chat (evidence: `components/AnalysisDashboard.tsx`)
- Editorial chat → Chat session: creates session (evidence: `components/ChatInterface.tsx`)
- Chat session → Google Gemini: starts conversation (evidence: `services/geminiService.ts`)
- Draft analysis → Analysis data types: returns analysis type (evidence: `services/geminiService.ts`)
- Ollama alternative → Ollama runtime: calls local API (evidence: `services/geminiService.ollama.ts`)
- Upload and orchestration → Ollama alternative: alternative configuration (evidence: `README.md`)
