# fayzarbackup-star/test-conveter architecture

> Architecture diagram of the GitHub repository fayzarbackup-star/test-conveter, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/fayzarbackup-star/test-conveter
- Repository: https://github.com/fayzarbackup-star/test-conveter

## Overview

Fayzar is a browser-based Bangla/Math conversion and document-production suite, designed to work offline for core features; AI OCR is the documented cloud exception. Its publishing workflow classifies text, parses it into domain-specific structures, previews it, then exports Word formats. The README also documents standalone Unicode/Bijoy and Office-file conversion. Connections between the pipeline and engines are supported by its excerpt; some other relationships are documented capabilities rather than sampled call sites.

Main entry points: [`js/layout-engine/fayzar-pipeline.js`](https://github.com/fayzarbackup-star/test-conveter/blob/main/js/layout-engine/fayzar-pipeline.js) (Publishing gateway), [`js/engines/export-dual-engine.js`](https://github.com/fayzarbackup-star/test-conveter/blob/main/js/engines/export-dual-engine.js) (Dual-format exporter), [`js/ai-ocr-engine.js`](https://github.com/fayzarbackup-star/test-conveter/blob/main/js/ai-ocr-engine.js) (AI OCR engine), [`js/layout-engine/text-run-processor.js`](https://github.com/fayzarbackup-star/test-conveter/blob/main/js/layout-engine/text-run-processor.js) (Text-run processor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_conversion["Text Conversion"]
  node_bangla["Bangla converter"]
  node_equations["Equation converter"]
  node_text_runs["Text-run processor"]
end

subgraph group_publishing["Publishing Studio"]
  node_pipeline["Publishing gateway<br/>[fayzar-pipeline.js]"]
  node_classifier["Document classifier<br/>[doc-classifier.js]"]
  node_questions["Question papers<br/>[question-engine.js]"]
  node_admit["Admit cards"]
  node_applications["Applications"]
  node_certificates["Certificates"]
  node_cv["CV and biodata<br/>[cv-engine.js]"]
  node_stamps["Stamp deeds<br/>[stamp-engine.js]"]
  node_salary["Salary slips"]
  node_routines["Routines<br/>[routine-engine.js]"]
  node_export["Dual-format exporter"]
  node_docx_builder["DOCX builder<br/>[docx-builder.js]"]
  node_rtf_builder["RTF builder<br/>[rtf-builder.js]"]
  node_schema["Schema validation"]
end

subgraph group_documents["Office Documents"]
  node_docx_convert["DOCX to DOC"]
  node_binary_doc["DOC binary handler"]
  node_docx_handler["DOCX handler<br/>[docx-handler.js]"]
  node_xlsx["Excel handler<br/>[xlsx-handler.js]"]
  node_pptx["PowerPoint handler<br/>[pptx-handler.js]"]
end

subgraph group_ocr["OCR and Imaging"]
  node_ocr["AI OCR engine<br/>[ai-ocr-engine.js]"]
  node_ocr_proxy["OCR proxy<br/>[index.js]"]
  node_bg_remove["Background remover"]
end

node_user(("Browser user"))
node_ocr_service["Gemini OCR service"]

node_user -->|"converts text"| node_bangla
node_user -->|"preserves math"| node_equations
node_user -->|"converts DOCX"| node_docx_handler
node_user -->|"exports DOC"| node_docx_convert
node_user -->|"converts sheets"| node_xlsx
node_user -->|"converts slides"| node_pptx
node_user -->|"digitizes scans"| node_ocr
node_pipeline -->|"classifies input"| node_classifier
node_pipeline -->|"parses questions"| node_questions
node_pipeline -->|"parses deeds"| node_stamps
node_pipeline -->|"parses applications"| node_applications
node_pipeline -->|"parses cards"| node_admit
node_pipeline -->|"parses slips"| node_salary
node_pipeline -->|"parses routines"| node_routines
node_pipeline -->|"parses CVs"| node_cv
node_pipeline -->|"parses certificates"| node_certificates
node_pipeline -->|"exports documents"| node_export
node_export -->|"renders questions"| node_questions
node_export -->|"renders deeds"| node_stamps
node_export -->|"renders applications"| node_applications
node_export -->|"renders cards"| node_admit
node_export -->|"renders slips"| node_salary
node_export -->|"renders routines"| node_routines
node_export -->|"renders CVs"| node_cv
node_export -->|"renders certificates"| node_certificates
node_text_runs -->|"segments math"| node_equations
node_text_runs -->|"segments language"| node_bangla
node_user -.->|"removes background"| node_bg_remove
node_ocr -.->|"sends scan"| node_ocr_service
node_ocr -.->|"uses proxy"| node_ocr_proxy

click node_bangla "https://github.com/fayzarbackup-star/test-conveter/blob/main/js/bangla-converter-engine.js"
click node_equations "https://github.com/fayzarbackup-star/test-conveter/blob/main/js/equation-converter.js"
click node_text_runs "https://github.com/fayzarbackup-star/test-conveter/blob/main/js/layout-engine/text-run-processor.js"
click node_pipeline "https://github.com/fayzarbackup-star/test-conveter/blob/main/js/layout-engine/fayzar-pipeline.js"
click node_classifier "https://github.com/fayzarbackup-star/test-conveter/blob/main/js/engines/doc-classifier.js"
click node_questions "https://github.com/fayzarbackup-star/test-conveter/blob/main/js/engines/question-engine.js"
click node_admit "https://github.com/fayzarbackup-star/test-conveter/blob/main/js/engines/admit-card-engine.js"
click node_applications "https://github.com/fayzarbackup-star/test-conveter/blob/main/js/engines/application-engine.js"
click node_certificates "https://github.com/fayzarbackup-star/test-conveter/blob/main/js/engines/certificate-engine.js"
click node_cv "https://github.com/fayzarbackup-star/test-conveter/blob/main/js/engines/cv-engine.js"
click node_stamps "https://github.com/fayzarbackup-star/test-conveter/blob/main/js/engines/stamp-engine.js"
click node_salary "https://github.com/fayzarbackup-star/test-conveter/blob/main/js/engines/salary-slip-engine.js"
click node_routines "https://github.com/fayzarbackup-star/test-conveter/blob/main/js/engines/routine-engine.js"
click node_export "https://github.com/fayzarbackup-star/test-conveter/blob/main/js/engines/export-dual-engine.js"
click node_docx_builder "https://github.com/fayzarbackup-star/test-conveter/blob/main/js/layout-engine/docx-builder.js"
click node_rtf_builder "https://github.com/fayzarbackup-star/test-conveter/blob/main/js/layout-engine/rtf-builder.js"
click node_schema "https://github.com/fayzarbackup-star/test-conveter/blob/main/js/layout-engine/schema-validator.js"
click node_docx_convert "https://github.com/fayzarbackup-star/test-conveter/blob/main/js/docx-to-doc-engine.js"
click node_binary_doc "https://github.com/fayzarbackup-star/test-conveter/blob/main/js/doc-binary-engine.js"
click node_docx_handler "https://github.com/fayzarbackup-star/test-conveter/blob/main/js/docx-handler.js"
click node_xlsx "https://github.com/fayzarbackup-star/test-conveter/blob/main/js/xlsx-handler.js"
click node_pptx "https://github.com/fayzarbackup-star/test-conveter/blob/main/js/pptx-handler.js"
click node_ocr "https://github.com/fayzarbackup-star/test-conveter/blob/main/js/ai-ocr-engine.js"
click node_ocr_proxy "https://github.com/fayzarbackup-star/test-conveter/blob/main/fayzar-ocr-proxy/index.js"
click node_bg_remove "https://github.com/fayzarbackup-star/test-conveter/blob/main/js/bg-remover-engine.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_bangla,node_equations,node_text_runs,node_user toneBlue
class node_pipeline,node_classifier,node_questions,node_admit,node_applications,node_certificates,node_cv,node_stamps,node_salary,node_routines,node_export,node_docx_builder,node_rtf_builder,node_schema toneAmber
class node_docx_convert,node_binary_doc,node_docx_handler,node_xlsx,node_pptx toneMint
class node_ocr,node_ocr_proxy,node_bg_remove toneRose
class node_ocr_service toneIndigo
```

## Components

### Text Conversion

- [Bangla converter](https://github.com/fayzarbackup-star/test-conveter/blob/main/js/bangla-converter-engine.js): `js/bangla-converter-engine.js`
- [Equation converter](https://github.com/fayzarbackup-star/test-conveter/blob/main/js/equation-converter.js): `js/equation-converter.js`
- [Text-run processor](https://github.com/fayzarbackup-star/test-conveter/blob/main/js/layout-engine/text-run-processor.js): `js/layout-engine/text-run-processor.js`

### Publishing Studio

- [Publishing gateway](https://github.com/fayzarbackup-star/test-conveter/blob/main/js/layout-engine/fayzar-pipeline.js): `js/layout-engine/fayzar-pipeline.js`
- [Document classifier](https://github.com/fayzarbackup-star/test-conveter/blob/main/js/engines/doc-classifier.js): `js/engines/doc-classifier.js`
- [Question papers](https://github.com/fayzarbackup-star/test-conveter/blob/main/js/engines/question-engine.js): `js/engines/question-engine.js`
- [Admit cards](https://github.com/fayzarbackup-star/test-conveter/blob/main/js/engines/admit-card-engine.js): `js/engines/admit-card-engine.js`
- [Applications](https://github.com/fayzarbackup-star/test-conveter/blob/main/js/engines/application-engine.js): `js/engines/application-engine.js`
- [Certificates](https://github.com/fayzarbackup-star/test-conveter/blob/main/js/engines/certificate-engine.js): `js/engines/certificate-engine.js`
- [CV and biodata](https://github.com/fayzarbackup-star/test-conveter/blob/main/js/engines/cv-engine.js): `js/engines/cv-engine.js`
- [Stamp deeds](https://github.com/fayzarbackup-star/test-conveter/blob/main/js/engines/stamp-engine.js): `js/engines/stamp-engine.js`
- [Salary slips](https://github.com/fayzarbackup-star/test-conveter/blob/main/js/engines/salary-slip-engine.js): `js/engines/salary-slip-engine.js`
- [Routines](https://github.com/fayzarbackup-star/test-conveter/blob/main/js/engines/routine-engine.js): `js/engines/routine-engine.js`
- [Dual-format exporter](https://github.com/fayzarbackup-star/test-conveter/blob/main/js/engines/export-dual-engine.js): `js/engines/export-dual-engine.js`
- [DOCX builder](https://github.com/fayzarbackup-star/test-conveter/blob/main/js/layout-engine/docx-builder.js): `js/layout-engine/docx-builder.js`
- [RTF builder](https://github.com/fayzarbackup-star/test-conveter/blob/main/js/layout-engine/rtf-builder.js): `js/layout-engine/rtf-builder.js`
- [Schema validation](https://github.com/fayzarbackup-star/test-conveter/blob/main/js/layout-engine/schema-validator.js): `js/layout-engine/schema-validator.js`

### Office Documents

- [DOCX to DOC](https://github.com/fayzarbackup-star/test-conveter/blob/main/js/docx-to-doc-engine.js): `js/docx-to-doc-engine.js`
- [DOC binary handler](https://github.com/fayzarbackup-star/test-conveter/blob/main/js/doc-binary-engine.js): `js/doc-binary-engine.js`
- [DOCX handler](https://github.com/fayzarbackup-star/test-conveter/blob/main/js/docx-handler.js): `js/docx-handler.js`
- [Excel handler](https://github.com/fayzarbackup-star/test-conveter/blob/main/js/xlsx-handler.js): `js/xlsx-handler.js`
- [PowerPoint handler](https://github.com/fayzarbackup-star/test-conveter/blob/main/js/pptx-handler.js): `js/pptx-handler.js`

### OCR and Imaging

- [AI OCR engine](https://github.com/fayzarbackup-star/test-conveter/blob/main/js/ai-ocr-engine.js): `js/ai-ocr-engine.js`
- [OCR proxy](https://github.com/fayzarbackup-star/test-conveter/blob/main/fayzar-ocr-proxy/index.js): `fayzar-ocr-proxy/index.js`
- [Background remover](https://github.com/fayzarbackup-star/test-conveter/blob/main/js/bg-remover-engine.js): `js/bg-remover-engine.js`

### Other components

- **Browser user**
- **Gemini OCR service**

## Connections

- Browser user → Bangla converter: converts text (evidence: `README.md`)
- Browser user → Equation converter: preserves math (evidence: `README.md`)
- Browser user → DOCX handler: converts DOCX (evidence: `README.md`)
- Browser user → DOCX to DOC: exports DOC (evidence: `README.md`)
- Browser user → Excel handler: converts sheets (evidence: `README.md`)
- Browser user → PowerPoint handler: converts slides (evidence: `README.md`)
- Browser user → AI OCR engine: digitizes scans (evidence: `README.md`)
- Publishing gateway → Document classifier: classifies input (evidence: `js/layout-engine/fayzar-pipeline.js`)
- Publishing gateway → Question papers: parses questions (evidence: `js/layout-engine/fayzar-pipeline.js`)
- Publishing gateway → Stamp deeds: parses deeds (evidence: `js/layout-engine/fayzar-pipeline.js`)
- Publishing gateway → Applications: parses applications (evidence: `js/layout-engine/fayzar-pipeline.js`)
- Publishing gateway → Admit cards: parses cards (evidence: `js/layout-engine/fayzar-pipeline.js`)
- Publishing gateway → Salary slips: parses slips (evidence: `js/layout-engine/fayzar-pipeline.js`)
- Publishing gateway → Routines: parses routines (evidence: `js/layout-engine/fayzar-pipeline.js`)
- Publishing gateway → CV and biodata: parses CVs (evidence: `js/layout-engine/fayzar-pipeline.js`)
- Publishing gateway → Certificates: parses certificates (evidence: `js/layout-engine/fayzar-pipeline.js`)
- Publishing gateway → Dual-format exporter: exports documents (evidence: `js/layout-engine/fayzar-pipeline.js`)
- Dual-format exporter → Question papers: renders questions (evidence: `js/engines/export-dual-engine.js`)
- Dual-format exporter → Stamp deeds: renders deeds (evidence: `js/engines/export-dual-engine.js`)
- Dual-format exporter → Applications: renders applications (evidence: `js/engines/export-dual-engine.js`)
- Dual-format exporter → Admit cards: renders cards (evidence: `js/engines/export-dual-engine.js`)
- Dual-format exporter → Salary slips: renders slips (evidence: `js/engines/export-dual-engine.js`)
- Dual-format exporter → Routines: renders routines (evidence: `js/engines/export-dual-engine.js`)
- Dual-format exporter → CV and biodata: renders CVs (evidence: `js/engines/export-dual-engine.js`)
- Dual-format exporter → Certificates: renders certificates (evidence: `js/engines/export-dual-engine.js`)
- Text-run processor → Equation converter: segments math (evidence: `js/layout-engine/text-run-processor.js`)
- Text-run processor → Bangla converter: segments language (evidence: `js/layout-engine/text-run-processor.js`)
- Browser user → Background remover: removes background
- AI OCR engine → Gemini OCR service: sends scan (evidence: `README.md`)
- AI OCR engine → OCR proxy: uses proxy
