# shivansh-58/aurora-reader architecture

> Architecture diagram of the GitHub repository shivansh-58/aurora-reader, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/shivansh-58/aurora-reader
- Repository: https://github.com/shivansh-58/aurora-reader

## Overview

Invoice Simplifier is a React application that accepts an invoice file, extracts text in the browser, sends that text for AI structuring, and displays and exports the simplified invoice. The supplied excerpts show the OCR and AI request workflow, result fields, and JSON download; omitted source limits certainty about file-format handling and the proxy request details.

Main entry points: [`App.js`](https://github.com/shivansh-58/aurora-reader/blob/main/App.js) (Invoice interface), [`index.js`](https://github.com/shivansh-58/aurora-reader/blob/main/index.js) (React mount)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Invoice workflow"]
  node_mount["React mount<br/>[index.js]"]
  node_app["Invoice interface<br/>[App.js]"]
  node_upload["File selection<br/>[App.js]"]
end

subgraph group_processing["Extraction and AI"]
  node_ocr["Image OCR<br/>[App.js]"]
  node_browser["Browser APIs"]
  node_simplify["Invoice simplification<br/>[App.js]"]
  node_gemini["Gemini API"]
  node_proxy["CORS proxy"]
end

subgraph group_results["Results and export"]
  node_results["Invoice results<br/>[App.js]"]
  node_export["JSON download<br/>[App.js]"]
end

node_user(("Invoice user"))

node_user -->|"opens app"| node_mount
node_mount -->|"renders"| node_app
node_user -->|"selects file"| node_upload
node_upload -->|"updates state"| node_app
node_app -->|"invokes OCR"| node_ocr
node_ocr -->|"reads image"| node_browser
node_ocr -->|"returns text"| node_app
node_app -->|"submits text"| node_simplify
node_simplify -->|"POSTs request"| node_gemini
node_gemini -->|"returns JSON"| node_simplify
node_simplify -.->|"may route via"| node_proxy
node_simplify -->|"returns invoice"| node_app
node_app -->|"renders invoice"| node_results
node_user -->|"requests download"| node_export
node_export -->|"downloads JSON"| node_browser

click node_mount "https://github.com/shivansh-58/aurora-reader/blob/main/index.js"
click node_app "https://github.com/shivansh-58/aurora-reader/blob/main/App.js"
click node_upload "https://github.com/shivansh-58/aurora-reader/blob/main/App.js"
click node_ocr "https://github.com/shivansh-58/aurora-reader/blob/main/App.js"
click node_simplify "https://github.com/shivansh-58/aurora-reader/blob/main/App.js"
click node_results "https://github.com/shivansh-58/aurora-reader/blob/main/App.js"
click node_export "https://github.com/shivansh-58/aurora-reader/blob/main/App.js"

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_mount,node_app,node_upload,node_user toneBlue
class node_ocr,node_browser,node_simplify,node_gemini,node_proxy toneAmber
class node_results,node_export toneMint
```

## Components

### Invoice workflow

- [React mount](https://github.com/shivansh-58/aurora-reader/blob/main/index.js): `index.js`
- [Invoice interface](https://github.com/shivansh-58/aurora-reader/blob/main/App.js): `App.js`
- [File selection](https://github.com/shivansh-58/aurora-reader/blob/main/App.js): `App.js`

### Extraction and AI

- [Image OCR](https://github.com/shivansh-58/aurora-reader/blob/main/App.js): `App.js`
- **Browser APIs**
- [Invoice simplification](https://github.com/shivansh-58/aurora-reader/blob/main/App.js): `App.js`
- **Gemini API**
- **CORS proxy**

### Results and export

- [Invoice results](https://github.com/shivansh-58/aurora-reader/blob/main/App.js): `App.js`
- [JSON download](https://github.com/shivansh-58/aurora-reader/blob/main/App.js): `App.js`

### Other components

- **Invoice user**

## Connections

- Invoice user → React mount: opens app
- React mount → Invoice interface: renders
- Invoice user → File selection: selects file
- File selection → Invoice interface: updates state
- Invoice interface → Image OCR: invokes OCR
- Image OCR → Browser APIs: reads image
- Image OCR → Invoice interface: returns text
- Invoice interface → Invoice simplification: submits text
- Invoice simplification → Gemini API: POSTs request
- Gemini API → Invoice simplification: returns JSON
- Invoice simplification → CORS proxy: may route via
- Invoice simplification → Invoice interface: returns invoice
- Invoice interface → Invoice results: renders invoice
- Invoice user → JSON download: requests download
- JSON download → Browser APIs: downloads JSON
