# aravind56565657/doc-to-data architecture

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

- Interactive diagram: https://gitdiagram.com/aravind56565657/doc-to-data
- Repository: https://github.com/aravind56565657/doc-to-data

## Overview

Text Aura is a React frontend for document extraction and review, with separate screens for uploaded-document lookup, logs, and template administration. The main workflow is upload a document, send it for processing, then review and edit extracted information; review also supports voice commands, template-based refinement, and rejection actions. The frontend calls backend services directly. The README only documents Create React App, so product capabilities here are inferred from the supplied source excerpts; omitted portions limit certainty about some review-stage wiring.

Main entry points: [`src/App.js`](https://github.com/aravind56565657/doc-to-data/blob/main/src/App.js) (Route Application), [`src/components/DocumentUpload/ExtractResult.js`](https://github.com/aravind56565657/doc-to-data/blob/main/src/components/DocumentUpload/ExtractResult.js) (Review Extraction), [`src/components/DocumentUpload/DocumentUpload.js`](https://github.com/aravind56565657/doc-to-data/blob/main/src/components/DocumentUpload/DocumentUpload.js) (Upload Document), [`src/components/DocumentUpload/DocumentView.js`](https://github.com/aravind56565657/doc-to-data/blob/main/src/components/DocumentUpload/DocumentView.js) (Browse Documents)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application Shell"]
  node_app["Route Application<br/>[App.js]"]
end

subgraph group_extract["Document Workflow"]
  node_upload["Upload Document<br/>[DocumentUpload.js]"]
  node_review["Review Extraction<br/>[ExtractResult.js]"]
end

subgraph group_records["Records and Logs"]
  node_documents["Browse Documents<br/>[DocumentView.js]"]
  node_logs["View Logs<br/>[LogViewer.js]"]
end

subgraph group_templates["Template Administration"]
  node_template_manager["Create Template<br/>[TemplateManager.js]"]
  node_template_list["List Templates<br/>[TemplateList.js]"]
end

node_user(("User"))
node_backend{{"OCR Backend"}}
node_template_api{{"Template API"}}

node_user -->|"uses"| node_app
node_app -->|"routes to"| node_upload
node_app -->|"routes to"| node_review
node_app -->|"routes to"| node_documents
node_app -->|"routes to"| node_logs
node_app -->|"routes to"| node_template_manager
node_app -->|"routes to"| node_template_list
node_upload -->|"posts document"| node_backend
node_backend -->|"returns extraction"| node_upload
node_upload -->|"navigates with result"| node_review
node_review -->|"posts edits"| node_backend
node_review -->|"sends voice command"| node_backend
node_review -->|"requests refinement"| node_backend
node_review -->|"posts rejection"| node_backend
node_documents -->|"queries records"| node_backend
node_documents -->|"requests PDF"| node_backend
node_logs -->|"fetches logs"| node_backend
node_template_manager -->|"creates template"| node_template_api
node_template_manager -->|"signals refresh"| node_logs
node_template_list -->|"fetches templates"| node_template_api
node_template_list -.->|"fallback fetch"| node_backend

click node_app "https://github.com/aravind56565657/doc-to-data/blob/main/src/App.js"
click node_upload "https://github.com/aravind56565657/doc-to-data/blob/main/src/components/DocumentUpload/DocumentUpload.js"
click node_review "https://github.com/aravind56565657/doc-to-data/blob/main/src/components/DocumentUpload/ExtractResult.js"
click node_documents "https://github.com/aravind56565657/doc-to-data/blob/main/src/components/DocumentUpload/DocumentView.js"
click node_logs "https://github.com/aravind56565657/doc-to-data/blob/main/src/components/DocumentUpload/LogViewer.js"
click node_template_manager "https://github.com/aravind56565657/doc-to-data/blob/main/src/components/DocumentUpload/TemplateManager.js"
click node_template_list "https://github.com/aravind56565657/doc-to-data/blob/main/src/components/DocumentUpload/TemplateList.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_app,node_user toneBlue
class node_upload,node_review toneAmber
class node_documents,node_logs,node_template_api toneMint
class node_template_manager,node_template_list toneRose
class node_backend toneIndigo
```

## Components

### Application Shell

- [Route Application](https://github.com/aravind56565657/doc-to-data/blob/main/src/App.js): `src/App.js`

### Document Workflow

- [Upload Document](https://github.com/aravind56565657/doc-to-data/blob/main/src/components/DocumentUpload/DocumentUpload.js): `src/components/DocumentUpload/DocumentUpload.js`
- [Review Extraction](https://github.com/aravind56565657/doc-to-data/blob/main/src/components/DocumentUpload/ExtractResult.js): `src/components/DocumentUpload/ExtractResult.js`

### Records and Logs

- [Browse Documents](https://github.com/aravind56565657/doc-to-data/blob/main/src/components/DocumentUpload/DocumentView.js): `src/components/DocumentUpload/DocumentView.js`
- [View Logs](https://github.com/aravind56565657/doc-to-data/blob/main/src/components/DocumentUpload/LogViewer.js): `src/components/DocumentUpload/LogViewer.js`

### Template Administration

- [Create Template](https://github.com/aravind56565657/doc-to-data/blob/main/src/components/DocumentUpload/TemplateManager.js): `src/components/DocumentUpload/TemplateManager.js`
- [List Templates](https://github.com/aravind56565657/doc-to-data/blob/main/src/components/DocumentUpload/TemplateList.js): `src/components/DocumentUpload/TemplateList.js`

### Other components

- **User**
- **OCR Backend**
- **Template API**

## Connections

- User → Route Application: uses
- Route Application → Upload Document: routes to
- Route Application → Review Extraction: routes to
- Route Application → Browse Documents: routes to
- Route Application → View Logs: routes to
- Route Application → Create Template: routes to
- Route Application → List Templates: routes to
- Upload Document → OCR Backend: posts document
- OCR Backend → Upload Document: returns extraction
- Upload Document → Review Extraction: navigates with result
- Review Extraction → OCR Backend: posts edits
- Review Extraction → OCR Backend: sends voice command
- Review Extraction → OCR Backend: requests refinement
- Review Extraction → OCR Backend: posts rejection
- Browse Documents → OCR Backend: queries records
- Browse Documents → OCR Backend: requests PDF
- View Logs → OCR Backend: fetches logs
- Create Template → Template API: creates template
- Create Template → View Logs: signals refresh
- List Templates → Template API: fetches templates
- List Templates → OCR Backend: fallback fetch
