# aminhizi/lx architecture

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

- Interactive diagram: https://gitdiagram.com/aminhizi/lx
- Repository: https://github.com/aminhizi/lx

## Overview

This is a browser-based image/document-to-LaTeX converter. A user selects a file in the workspace, submits it to the backend, and receives generated LaTeX for display and copying. The backend sends uploaded image data and conversion instructions to Google Gemini. The sampled code shows image conversion; text conversion is present only as commented-out code. The README is empty, so broader format support advertised by the UI is not verified. The frontend-to-backend proxy is configured, but its development configuration does not establish the production routing setup.

Main entry points: [`frontEnd/src/pages/workSpace.jsx`](https://github.com/aminhizi/lx/blob/main/frontEnd/src/pages/workSpace.jsx) (Conversion workspace), [`backend/server.js`](https://github.com/aminhizi/lx/blob/main/backend/server.js) (Convert API), [`frontEnd/src/App.jsx`](https://github.com/aminhizi/lx/blob/main/frontEnd/src/App.jsx) (App shell), [`frontEnd/src/main.jsx`](https://github.com/aminhizi/lx/blob/main/frontEnd/src/main.jsx) (React entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Frontend"]
  node_entry["React entry<br/>[main.jsx]"]
  node_app["App shell<br/>[App.jsx]"]
  node_workspace["Conversion workspace<br/>[workSpace.jsx]"]
end

subgraph group_conversion["Conversion backend"]
  node_convert_api["Convert API<br/>[server.js]"]
end

subgraph group_external["External service"]
  node_gemini{{"Google Gemini"}}
end

node_user(("User"))

node_user -->|"selects and submits"| node_workspace
node_entry -->|"renders"| node_app
node_app -->|"renders"| node_workspace
node_workspace -->|"posts file"| node_convert_api
node_convert_api -->|"requests LaTeX"| node_gemini
node_convert_api -->|"returns LaTeX"| node_workspace

click node_entry "https://github.com/aminhizi/lx/blob/main/frontEnd/src/main.jsx"
click node_app "https://github.com/aminhizi/lx/blob/main/frontEnd/src/App.jsx"
click node_workspace "https://github.com/aminhizi/lx/blob/main/frontEnd/src/pages/workSpace.jsx"
click node_convert_api "https://github.com/aminhizi/lx/blob/main/backend/server.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_entry,node_app,node_workspace,node_user toneBlue
class node_convert_api toneAmber
class node_gemini toneMint
```

## Components

### Frontend

- [React entry](https://github.com/aminhizi/lx/blob/main/frontEnd/src/main.jsx): `frontEnd/src/main.jsx`
- [App shell](https://github.com/aminhizi/lx/blob/main/frontEnd/src/App.jsx): `frontEnd/src/App.jsx`
- [Conversion workspace](https://github.com/aminhizi/lx/blob/main/frontEnd/src/pages/workSpace.jsx): `frontEnd/src/pages/workSpace.jsx`

### Conversion backend

- [Convert API](https://github.com/aminhizi/lx/blob/main/backend/server.js): `backend/server.js`

### External service

- **Google Gemini**

### Other components

- **User**

## Connections

- User → Conversion workspace: selects and submits (evidence: `frontEnd/src/pages/workSpace.jsx`)
- React entry → App shell: renders (evidence: `frontEnd/src/main.jsx`)
- App shell → Conversion workspace: renders (evidence: `frontEnd/src/App.jsx`)
- Conversion workspace → Convert API: posts file (evidence: `frontEnd/src/pages/workSpace.jsx`)
- Convert API → Google Gemini: requests LaTeX (evidence: `backend/server.js`)
- Convert API → Conversion workspace: returns LaTeX (evidence: `backend/server.js`)
