# maheshwaree-02/filesure-cin-checker architecture

> Architecture diagram of the GitHub repository maheshwaree-02/filesure-cin-checker, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/maheshwaree-02/filesure-cin-checker
- Repository: https://github.com/maheshwaree-02/filesure-cin-checker

## Overview

FileSure is a client-side CIN/LLPIN batch inspection web app. Users enter identifiers or import a spreadsheet, the app processes the batch and parses each identifier with statutory diagnostics, then presents searchable results, metrics, and an audit CSV export. The README also documents clipboard copying, sample/benchmark inputs, and privacy-focused in-memory processing. Source excerpts and the index support the principal wiring; some UI internals are unsampled, so the graph avoids asserting their detailed behavior.

Main entry points: [`src/App.tsx`](https://github.com/maheshwaree-02/filesure-cin-checker/blob/main/src/App.tsx) (App workflow), [`src/components/inspector/ResultsTable.tsx`](https://github.com/maheshwaree-02/filesure-cin-checker/blob/main/src/components/inspector/ResultsTable.tsx) (Searchable results), [`src/services/cinParser.ts`](https://github.com/maheshwaree-02/filesure-cin-checker/blob/main/src/services/cinParser.ts) (CIN parser), [`src/services/batchProcessor.ts`](https://github.com/maheshwaree-02/filesure-cin-checker/blob/main/src/services/batchProcessor.ts) (Batch processor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Inspector interface"]
  node_app["App workflow<br/>[App.tsx]"]
  node_input["Batch input<br/>[InputSection.tsx]"]
  node_header["Format guide<br/>[Header.tsx]"]
  node_metrics["Batch metrics<br/>[MetricsBar.tsx]"]
  node_footer["Footer<br/>[Footer.tsx]"]
end

subgraph group_processing["Batch processing"]
  node_importer["File importer<br/>[fileImporter.ts]"]
  node_batch["Batch processor<br/>[batchProcessor.ts]"]
  node_cin["CIN parser<br/>[cinParser.ts]"]
  node_llpin["LLPIN parser<br/>[llpinParser.ts]"]
  node_resulttypes["Validation results<br/>[validator.ts]"]
end

subgraph group_reference["Identifier reference"]
  node_cintypes["Identifier types<br/>[cin.ts]"]
  node_states["State and RoC codes<br/>[states.ts]"]
  node_companytypes["Company classifications<br/>[companyTypes.ts]"]
end

subgraph group_reporting["Results and reporting"]
  node_table["Searchable results<br/>[ResultsTable.tsx]"]
  node_filters["Status filters<br/>[FilterTabs.tsx]"]
  node_row["Result details<br/>[ResultRow.tsx]"]
  node_breakdown["CIN breakdown"]
  node_empty["Empty results<br/>[EmptyState.tsx]"]
  node_exporter["Audit CSV export<br/>[csvExporter.ts]"]
end

node_user(("Compliance user"))

node_user -->|"enters identifiers"| node_input
node_input -->|"parses upload"| node_importer
node_importer -->|"returns identifiers"| node_app
node_app -->|"processes batch"| node_batch
node_batch -->|"parses CINs"| node_cin
node_batch -->|"parses LLPINs"| node_llpin
node_cin -->|"looks up jurisdiction"| node_states
node_cin -->|"looks up classification"| node_companytypes
node_cin -->|"builds validation result"| node_resulttypes
node_llpin -->|"builds validation result"| node_resulttypes
node_app -->|"renders input"| node_input
node_app -->|"renders header"| node_header
node_app -->|"renders metrics"| node_metrics
node_app -->|"shows results"| node_table
node_app -->|"renders footer"| node_footer
node_table -->|"renders filters"| node_filters
node_table -->|"renders rows"| node_row
node_row -->|"renders CIN segments"| node_breakdown
node_table -->|"shows empty state"| node_empty
node_table -->|"exports audit CSV"| node_exporter
node_user -->|"searches and copies"| node_table
node_app -->|"holds batch results"| node_resulttypes
node_cin -->|"produces parsed details"| node_cintypes
node_llpin -->|"produces parsed details"| node_cintypes

click node_app "https://github.com/maheshwaree-02/filesure-cin-checker/blob/main/src/App.tsx"
click node_input "https://github.com/maheshwaree-02/filesure-cin-checker/blob/main/src/components/inspector/InputSection.tsx"
click node_header "https://github.com/maheshwaree-02/filesure-cin-checker/blob/main/src/components/layout/Header.tsx"
click node_metrics "https://github.com/maheshwaree-02/filesure-cin-checker/blob/main/src/components/inspector/MetricsBar.tsx"
click node_footer "https://github.com/maheshwaree-02/filesure-cin-checker/blob/main/src/components/layout/Footer.tsx"
click node_importer "https://github.com/maheshwaree-02/filesure-cin-checker/blob/main/src/services/fileImporter.ts"
click node_batch "https://github.com/maheshwaree-02/filesure-cin-checker/blob/main/src/services/batchProcessor.ts"
click node_cin "https://github.com/maheshwaree-02/filesure-cin-checker/blob/main/src/services/cinParser.ts"
click node_llpin "https://github.com/maheshwaree-02/filesure-cin-checker/blob/main/src/services/llpinParser.ts"
click node_resulttypes "https://github.com/maheshwaree-02/filesure-cin-checker/blob/main/src/types/validator.ts"
click node_cintypes "https://github.com/maheshwaree-02/filesure-cin-checker/blob/main/src/types/cin.ts"
click node_states "https://github.com/maheshwaree-02/filesure-cin-checker/blob/main/src/constants/states.ts"
click node_companytypes "https://github.com/maheshwaree-02/filesure-cin-checker/blob/main/src/constants/companyTypes.ts"
click node_table "https://github.com/maheshwaree-02/filesure-cin-checker/blob/main/src/components/inspector/ResultsTable.tsx"
click node_filters "https://github.com/maheshwaree-02/filesure-cin-checker/blob/main/src/components/inspector/FilterTabs.tsx"
click node_row "https://github.com/maheshwaree-02/filesure-cin-checker/blob/main/src/components/inspector/ResultRow.tsx"
click node_breakdown "https://github.com/maheshwaree-02/filesure-cin-checker/blob/main/src/components/inspector/CinPillBreakdown.tsx"
click node_empty "https://github.com/maheshwaree-02/filesure-cin-checker/blob/main/src/components/inspector/EmptyState.tsx"
click node_exporter "https://github.com/maheshwaree-02/filesure-cin-checker/blob/main/src/services/csvExporter.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_input,node_header,node_metrics,node_footer,node_user toneBlue
class node_importer,node_batch,node_cin,node_llpin,node_resulttypes toneAmber
class node_cintypes,node_states,node_companytypes toneMint
class node_table,node_filters,node_row,node_breakdown,node_empty,node_exporter toneRose
```

## Components

### Inspector interface

- [App workflow](https://github.com/maheshwaree-02/filesure-cin-checker/blob/main/src/App.tsx): `src/App.tsx`
- [Batch input](https://github.com/maheshwaree-02/filesure-cin-checker/blob/main/src/components/inspector/InputSection.tsx): `src/components/inspector/InputSection.tsx`
- [Format guide](https://github.com/maheshwaree-02/filesure-cin-checker/blob/main/src/components/layout/Header.tsx): `src/components/layout/Header.tsx`
- [Batch metrics](https://github.com/maheshwaree-02/filesure-cin-checker/blob/main/src/components/inspector/MetricsBar.tsx): `src/components/inspector/MetricsBar.tsx`
- [Footer](https://github.com/maheshwaree-02/filesure-cin-checker/blob/main/src/components/layout/Footer.tsx): `src/components/layout/Footer.tsx`

### Batch processing

- [File importer](https://github.com/maheshwaree-02/filesure-cin-checker/blob/main/src/services/fileImporter.ts): `src/services/fileImporter.ts`
- [Batch processor](https://github.com/maheshwaree-02/filesure-cin-checker/blob/main/src/services/batchProcessor.ts): `src/services/batchProcessor.ts`
- [CIN parser](https://github.com/maheshwaree-02/filesure-cin-checker/blob/main/src/services/cinParser.ts): `src/services/cinParser.ts`
- [LLPIN parser](https://github.com/maheshwaree-02/filesure-cin-checker/blob/main/src/services/llpinParser.ts): `src/services/llpinParser.ts`
- [Validation results](https://github.com/maheshwaree-02/filesure-cin-checker/blob/main/src/types/validator.ts): `src/types/validator.ts`

### Identifier reference

- [Identifier types](https://github.com/maheshwaree-02/filesure-cin-checker/blob/main/src/types/cin.ts): `src/types/cin.ts`
- [State and RoC codes](https://github.com/maheshwaree-02/filesure-cin-checker/blob/main/src/constants/states.ts): `src/constants/states.ts`
- [Company classifications](https://github.com/maheshwaree-02/filesure-cin-checker/blob/main/src/constants/companyTypes.ts): `src/constants/companyTypes.ts`

### Results and reporting

- [Searchable results](https://github.com/maheshwaree-02/filesure-cin-checker/blob/main/src/components/inspector/ResultsTable.tsx): `src/components/inspector/ResultsTable.tsx`
- [Status filters](https://github.com/maheshwaree-02/filesure-cin-checker/blob/main/src/components/inspector/FilterTabs.tsx): `src/components/inspector/FilterTabs.tsx`
- [Result details](https://github.com/maheshwaree-02/filesure-cin-checker/blob/main/src/components/inspector/ResultRow.tsx): `src/components/inspector/ResultRow.tsx`
- [CIN breakdown](https://github.com/maheshwaree-02/filesure-cin-checker/blob/main/src/components/inspector/CinPillBreakdown.tsx): `src/components/inspector/CinPillBreakdown.tsx`
- [Empty results](https://github.com/maheshwaree-02/filesure-cin-checker/blob/main/src/components/inspector/EmptyState.tsx): `src/components/inspector/EmptyState.tsx`
- [Audit CSV export](https://github.com/maheshwaree-02/filesure-cin-checker/blob/main/src/services/csvExporter.ts): `src/services/csvExporter.ts`

### Other components

- **Compliance user**

## Connections

- Compliance user → Batch input: enters identifiers (evidence: `README.md`)
- Batch input → File importer: parses upload (evidence: `src/components/inspector/InputSection.tsx`)
- File importer → App workflow: returns identifiers (evidence: `src/App.tsx`)
- App workflow → Batch processor: processes batch (evidence: `src/App.tsx`)
- Batch processor → CIN parser: parses CINs (evidence: `src/services/batchProcessor.ts`)
- Batch processor → LLPIN parser: parses LLPINs (evidence: `src/services/batchProcessor.ts`)
- CIN parser → State and RoC codes: looks up jurisdiction (evidence: `src/services/cinParser.ts`)
- CIN parser → Company classifications: looks up classification (evidence: `src/services/cinParser.ts`)
- CIN parser → Validation results: builds validation result (evidence: `src/services/cinParser.ts`)
- LLPIN parser → Validation results: builds validation result (evidence: `src/services/llpinParser.ts`)
- App workflow → Batch input: renders input (evidence: `src/App.tsx`)
- App workflow → Format guide: renders header (evidence: `src/App.tsx`)
- App workflow → Batch metrics: renders metrics (evidence: `src/App.tsx`)
- App workflow → Searchable results: shows results (evidence: `src/App.tsx`)
- App workflow → Footer: renders footer (evidence: `src/App.tsx`)
- Searchable results → Status filters: renders filters (evidence: `src/components/inspector/ResultsTable.tsx`)
- Searchable results → Result details: renders rows (evidence: `src/components/inspector/ResultsTable.tsx`)
- Result details → CIN breakdown: renders CIN segments (evidence: `src/components/inspector/ResultRow.tsx`)
- Searchable results → Empty results: shows empty state (evidence: `src/components/inspector/ResultsTable.tsx`)
- Searchable results → Audit CSV export: exports audit CSV (evidence: `src/components/inspector/ResultsTable.tsx`)
- Compliance user → Searchable results: searches and copies (evidence: `README.md`)
- App workflow → Validation results: holds batch results (evidence: `src/App.tsx`)
- CIN parser → Identifier types: produces parsed details (evidence: `src/services/cinParser.ts`)
- LLPIN parser → Identifier types: produces parsed details (evidence: `src/services/llpinParser.ts`)
