# samsingh77/accessibility-auditor architecture

> Architecture diagram of the GitHub repository samsingh77/accessibility-auditor, 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/samsingh77/accessibility-auditor
- Repository: https://github.com/samsingh77/accessibility-auditor

## Overview

This is a browser-based document accessibility auditor: users upload documents, the app parses them into a shared structure, evaluates WCAG criteria with deterministic and AI-assisted checks, and presents findings for review, repair, and reporting. The tree indicates support for PDF, PowerPoint, Word, spreadsheets, and images; sampled parser details are available only for PDF and PowerPoint, so their internal extraction links are shown without extrapolating parser behavior. Other major views and document-format support are retained based on the source tree.

Main entry points: [`src/App.tsx`](https://github.com/samsingh77/accessibility-auditor/blob/main/src/App.tsx) (App state and routing), [`src/services/accessibilityEngine.ts`](https://github.com/samsingh77/accessibility-auditor/blob/main/src/services/accessibilityEngine.ts) (WCAG assessment), [`src/services/parsers`](https://github.com/samsingh77/accessibility-auditor/tree/main/src/services/parsers) (Format parsers), [`src/components/DocumentUploader.tsx`](https://github.com/samsingh77/accessibility-auditor/blob/main/src/components/DocumentUploader.tsx) (Document upload)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Auditing workspace"]
  node_app["App state and routing<br/>[App.tsx]"]
  node_upload["Document upload"]
  node_dashboard["Dashboard<br/>[DashboardView.tsx]"]
  node_visual["Visual inspection<br/>[LiveVisualView.tsx]"]
  node_issues["Findings list<br/>[IssuesListView.tsx]"]
  node_reportsview["Reports view<br/>[ReportsView.tsx]"]
  node_settings["Audit settings<br/>[SettingsView.tsx]"]
  node_manual["Manual review"]
end

subgraph group_ingest["Document ingestion"]
  node_parsers["Format parsers"]
  node_pdfparser["PDF parser<br/>[PDFParser.ts]"]
  node_pptxparser["PowerPoint parser<br/>[PPTXParser.ts]"]
  node_otherparsers["Other format parsers"]
end

subgraph group_analysis["Accessibility analysis"]
  node_structure["Document model<br/>[accessibility.ts]"]
  node_engine["WCAG assessment"]
  node_rules["WCAG rules"]
  node_contrast["Contrast checks<br/>[contrastEngine.ts]"]
  node_aifactory["AI provider selection"]
  node_aiprovider["AI provider interface<br/>[AIProvider.ts]"]
  node_gemini["Gemini analysis"]
  node_pdfconvert["PDF conversion<br/>[pdfConverter.ts]"]
end

subgraph group_actions["Review and outputs"]
  node_remediation["Fix and rescan"]
  node_annotated["Annotated PDF"]
  node_reportgen["PDF report"]
end

node_user(("Auditor"))
node_geminiservice["Google GenAI"]

node_user -->|"uses"| node_app
node_app -->|"shows"| node_upload
node_app -->|"shows"| node_dashboard
node_app -->|"shows"| node_visual
node_app -->|"shows"| node_issues
node_app -->|"shows"| node_reportsview
node_app -->|"shows"| node_settings
node_app -->|"shows"| node_manual
node_upload -->|"parses file"| node_parsers
node_parsers --> node_pdfparser
node_parsers --> node_pptxparser
node_parsers --> node_otherparsers
node_pdfparser -->|"builds"| node_structure
node_pptxparser -->|"builds"| node_structure
node_otherparsers -->|"builds"| node_structure
node_upload -->|"returns structure"| node_app
node_app -->|"evaluates structure"| node_engine
node_engine -->|"loads criteria"| node_rules
node_engine -->|"checks contrast"| node_contrast
node_engine -->|"requests AI checks"| node_aifactory
node_aifactory -->|"creates provider"| node_aiprovider
node_aiprovider -->|"implemented by"| node_gemini
node_gemini -.->|"requests generation"| node_geminiservice
node_engine -->|"creates PDF preview"| node_pdfconvert
node_engine -->|"returns assessment"| node_app
node_app -->|"passes assessment"| node_visual
node_app -->|"passes assessment"| node_issues
node_app -->|"passes assessment"| node_manual
node_manual -->|"submits decisions"| node_app
node_app -->|"applies fixes"| node_remediation
node_remediation -->|"rescans document"| node_engine
node_app -->|"exports annotations"| node_annotated
node_app -->|"generates report"| node_reportgen
node_app -->|"passes assessment"| node_reportsview

click node_app "https://github.com/samsingh77/accessibility-auditor/blob/main/src/App.tsx"
click node_upload "https://github.com/samsingh77/accessibility-auditor/blob/main/src/components/DocumentUploader.tsx"
click node_dashboard "https://github.com/samsingh77/accessibility-auditor/blob/main/src/components/DashboardView.tsx"
click node_visual "https://github.com/samsingh77/accessibility-auditor/blob/main/src/components/LiveVisualView.tsx"
click node_issues "https://github.com/samsingh77/accessibility-auditor/blob/main/src/components/IssuesListView.tsx"
click node_reportsview "https://github.com/samsingh77/accessibility-auditor/blob/main/src/components/ReportsView.tsx"
click node_settings "https://github.com/samsingh77/accessibility-auditor/blob/main/src/components/SettingsView.tsx"
click node_manual "https://github.com/samsingh77/accessibility-auditor/blob/main/src/components/ManualReviewCenter.tsx"
click node_parsers "https://github.com/samsingh77/accessibility-auditor/tree/main/src/services/parsers"
click node_pdfparser "https://github.com/samsingh77/accessibility-auditor/blob/main/src/services/parsers/PDFParser.ts"
click node_pptxparser "https://github.com/samsingh77/accessibility-auditor/blob/main/src/services/parsers/PPTXParser.ts"
click node_otherparsers "https://github.com/samsingh77/accessibility-auditor/tree/main/src/services/parsers"
click node_structure "https://github.com/samsingh77/accessibility-auditor/blob/main/src/types/accessibility.ts"
click node_engine "https://github.com/samsingh77/accessibility-auditor/blob/main/src/services/accessibilityEngine.ts"
click node_rules "https://github.com/samsingh77/accessibility-auditor/blob/main/src/services/wcagRulesDatabase.ts"
click node_contrast "https://github.com/samsingh77/accessibility-auditor/blob/main/src/services/contrastEngine.ts"
click node_aifactory "https://github.com/samsingh77/accessibility-auditor/blob/main/src/services/ai/aiProviderFactory.ts"
click node_aiprovider "https://github.com/samsingh77/accessibility-auditor/blob/main/src/services/ai/AIProvider.ts"
click node_gemini "https://github.com/samsingh77/accessibility-auditor/blob/main/src/services/ai/GeminiAIProvider.ts"
click node_pdfconvert "https://github.com/samsingh77/accessibility-auditor/blob/main/src/services/pdfConverter.ts"
click node_remediation "https://github.com/samsingh77/accessibility-auditor/blob/main/src/services/remediationEngine.ts"
click node_annotated "https://github.com/samsingh77/accessibility-auditor/blob/main/src/services/annotatedPdfGenerator.ts"
click node_reportgen "https://github.com/samsingh77/accessibility-auditor/blob/main/src/services/pdfReportGenerator.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_upload,node_dashboard,node_visual,node_issues,node_reportsview,node_settings,node_manual toneBlue
class node_parsers,node_pdfparser,node_pptxparser,node_otherparsers toneAmber
class node_structure,node_engine,node_rules,node_contrast,node_aifactory,node_aiprovider,node_gemini,node_pdfconvert toneMint
class node_remediation,node_annotated,node_reportgen toneRose
class node_user,node_geminiservice toneIndigo
```

## Components

### Auditing workspace

- [App state and routing](https://github.com/samsingh77/accessibility-auditor/blob/main/src/App.tsx): `src/App.tsx`
- [Document upload](https://github.com/samsingh77/accessibility-auditor/blob/main/src/components/DocumentUploader.tsx): `src/components/DocumentUploader.tsx`
- [Dashboard](https://github.com/samsingh77/accessibility-auditor/blob/main/src/components/DashboardView.tsx): `src/components/DashboardView.tsx`
- [Visual inspection](https://github.com/samsingh77/accessibility-auditor/blob/main/src/components/LiveVisualView.tsx): `src/components/LiveVisualView.tsx`
- [Findings list](https://github.com/samsingh77/accessibility-auditor/blob/main/src/components/IssuesListView.tsx): `src/components/IssuesListView.tsx`
- [Reports view](https://github.com/samsingh77/accessibility-auditor/blob/main/src/components/ReportsView.tsx): `src/components/ReportsView.tsx`
- [Audit settings](https://github.com/samsingh77/accessibility-auditor/blob/main/src/components/SettingsView.tsx): `src/components/SettingsView.tsx`
- [Manual review](https://github.com/samsingh77/accessibility-auditor/blob/main/src/components/ManualReviewCenter.tsx): `src/components/ManualReviewCenter.tsx`

### Document ingestion

- [Format parsers](https://github.com/samsingh77/accessibility-auditor/tree/main/src/services/parsers): `src/services/parsers`
- [PDF parser](https://github.com/samsingh77/accessibility-auditor/blob/main/src/services/parsers/PDFParser.ts): `src/services/parsers/PDFParser.ts`
- [PowerPoint parser](https://github.com/samsingh77/accessibility-auditor/blob/main/src/services/parsers/PPTXParser.ts): `src/services/parsers/PPTXParser.ts`
- [Other format parsers](https://github.com/samsingh77/accessibility-auditor/tree/main/src/services/parsers): `src/services/parsers`

### Accessibility analysis

- [Document model](https://github.com/samsingh77/accessibility-auditor/blob/main/src/types/accessibility.ts): `src/types/accessibility.ts`
- [WCAG assessment](https://github.com/samsingh77/accessibility-auditor/blob/main/src/services/accessibilityEngine.ts): `src/services/accessibilityEngine.ts`
- [WCAG rules](https://github.com/samsingh77/accessibility-auditor/blob/main/src/services/wcagRulesDatabase.ts): `src/services/wcagRulesDatabase.ts`
- [Contrast checks](https://github.com/samsingh77/accessibility-auditor/blob/main/src/services/contrastEngine.ts): `src/services/contrastEngine.ts`
- [AI provider selection](https://github.com/samsingh77/accessibility-auditor/blob/main/src/services/ai/aiProviderFactory.ts): `src/services/ai/aiProviderFactory.ts`
- [AI provider interface](https://github.com/samsingh77/accessibility-auditor/blob/main/src/services/ai/AIProvider.ts): `src/services/ai/AIProvider.ts`
- [Gemini analysis](https://github.com/samsingh77/accessibility-auditor/blob/main/src/services/ai/GeminiAIProvider.ts): `src/services/ai/GeminiAIProvider.ts`
- [PDF conversion](https://github.com/samsingh77/accessibility-auditor/blob/main/src/services/pdfConverter.ts): `src/services/pdfConverter.ts`

### Review and outputs

- [Fix and rescan](https://github.com/samsingh77/accessibility-auditor/blob/main/src/services/remediationEngine.ts): `src/services/remediationEngine.ts`
- [Annotated PDF](https://github.com/samsingh77/accessibility-auditor/blob/main/src/services/annotatedPdfGenerator.ts): `src/services/annotatedPdfGenerator.ts`
- [PDF report](https://github.com/samsingh77/accessibility-auditor/blob/main/src/services/pdfReportGenerator.ts): `src/services/pdfReportGenerator.ts`

### Other components

- **Auditor**
- **Google GenAI**

## Connections

- Auditor → App state and routing: uses
- App state and routing → Document upload: shows
- App state and routing → Dashboard: shows
- App state and routing → Visual inspection: shows
- App state and routing → Findings list: shows
- App state and routing → Reports view: shows
- App state and routing → Audit settings: shows
- App state and routing → Manual review: shows
- Document upload → Format parsers: parses file
- Format parsers → PDF parser
- Format parsers → PowerPoint parser
- Format parsers → Other format parsers
- PDF parser → Document model: builds
- PowerPoint parser → Document model: builds
- Other format parsers → Document model: builds
- Document upload → App state and routing: returns structure
- App state and routing → WCAG assessment: evaluates structure
- WCAG assessment → WCAG rules: loads criteria
- WCAG assessment → Contrast checks: checks contrast
- WCAG assessment → AI provider selection: requests AI checks
- AI provider selection → AI provider interface: creates provider
- AI provider interface → Gemini analysis: implemented by
- Gemini analysis → Google GenAI: requests generation
- WCAG assessment → PDF conversion: creates PDF preview
- WCAG assessment → App state and routing: returns assessment
- App state and routing → Visual inspection: passes assessment
- App state and routing → Findings list: passes assessment
- App state and routing → Manual review: passes assessment
- Manual review → App state and routing: submits decisions
- App state and routing → Fix and rescan: applies fixes
- Fix and rescan → WCAG assessment: rescans document
- App state and routing → Annotated PDF: exports annotations
- App state and routing → PDF report: generates report
- App state and routing → Reports view: passes assessment
