# kamalesh1145/nacin_md architecture

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

- Interactive diagram: https://gitdiagram.com/kamalesh1145/nacin_md
- Repository: https://github.com/kamalesh1145/nacin_md

## Overview

#### Purpose and Entry Points
This is a static GST legal-reference corpus, not an executable application. It preserves source PDFs and Markdown text for Indian GST acts, rules, notifications, rate schedules, circulars, forms, guidance, and rulings. There is no README guidance, package manifest, service entry point, or runtime code. `Token_Calculator.ipynb` is the only computational entry artifact.

#### Source and Distribution Layers
PDFs are the likely authoritative visual/source documents, held under `pdf/`, while Markdown provides text-accessible derivatives. Archive snapshots (`files.zip`, `md.zip`) package the corresponding corpora. Representative pairs:
- `pdf/GST-Acts-and-Rules-Bare-Law-16-Aug-2024.pdf`
- `files/GST-Acts-and-Rules-Bare-Law-16-Aug-2024.md`
- `md/GST-Acts-and-Rules-Bare-Law-16-Aug-2024/GST-Acts-and-Rules-Bare-Law-16-Aug-2024.md`

#### Flat Markdown Corpus
`files/` is a flat, directly addressable Markdown collection. It is the simplest ingestion boundary for document search, chunking, embeddings, or token analysis. It contains core legal and policy material such as:
- `files/2024-08-01 -RULES CGST.md`
- `files/2024-08-01-ACT-IGST.md`
- `files/GST - All Circulars in one place - 2017 to 2024 - PMA[1].md`

#### Document-Scoped Markdown Corpus
`md/` organizes each source in a dedicated directory and, for large documents, includes split continuations. This is the more suitable corpus for document-level processing and preserving source grouping. Examples:
- `md/GST - All Circulars in one place - 2017 to 2024 - PMA[1]/GST - All Circulars in one place - 2017 to 2024 - PMA[1]_part1.md`
- `md/Understanding GST- through filter approach/Understanding GST- through filter approach_part1.md`
- `md/faq-on-gst/faq-on-gst_part1.md`

#### Legal-Domain Content Stages
The corpus naturally separates into six retrieval domains: statutory law, rules/forms, tax-rate and exemption schedules, notifications/circulars, operational guidance, and interpretive material. Architecturally significant anchors include:
- Statutory law: `md/2024-08-01-ACT-Compensation/2024-08-01-ACT-Compensation.md`, `md/GST Act(s) and Rule(s) – Bare Law – (22.01.2024)/GST Act(s) and Rule(s) – Bare Law – (22.01.2024).md`
- Rates/exemptions: `md/Updated rates as on 15.07.2024/Updated rates as on 15.07.2024.md`, `md/Rates_Services/Rates_Services.md`
- Guidance/rulings: `md/GST-Refund-Manual-for-HelpDesks-ALL-ABOUT-GST-REFUNDS/GST-Refund-Manual-for-HelpDesks-ALL-ABOUT-GST-REFUNDS.md`, `md/Significant-Judicial-and-Advance-Rulings-in-GST-A-Compilation/Significant-Judicial-and-Advance-Rulings-in-GST-A-Compilation.md`

#### Primary Flow and Boundaries
The implied pipeline is source PDF → Markdown extraction → optional document splitting → archival packaging or notebook-based token measurement. PDF-to-Markdown fidelity is an important boundary: PDFs retain layout/original presentation, while Markdown enables machine consumption. There is no indicated database, API, cloud infrastructure, external service, dependency lockfile, or deployed runtime; consumers must provide ingestion, indexing, provenance, and search layers externally.

Main entry points: [`md/2024-08-01-ACT-Compensation/2024-08-01-ACT-Compensation.md`](https://github.com/kamalesh1145/nacin_md/blob/main/md/2024-08-01-ACT-Compensation/2024-08-01-ACT-Compensation.md) (Statutory law), [`Token_Calculator.ipynb`](https://github.com/kamalesh1145/nacin_md/blob/main/Token_Calculator.ipynb) (Token calculator), [`md/GST - All Circulars in one place - 2017 to 2024 - PMA[1]/GST - All Circulars in one place - 2017 to 2024 - PMA[1]_part1.md`](https://github.com/kamalesh1145/nacin_md/blob/main/md/GST%20-%20All%20Circulars%20in%20one%20place%20-%202017%20to%202024%20-%20PMA%5B1%5D/GST%20-%20All%20Circulars%20in%20one%20place%20-%202017%20to%202024%20-%20PMA%5B1%5D_part1.md) (Split document parts), [`files/2024-08-01 -RULES CGST.md`](https://github.com/kamalesh1145/nacin_md/blob/main/files/2024-08-01%20-RULES%20CGST.md) (Rules & forms)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_source["Source &amp; derivatives"]
  node_pdf["Source PDF corpus<br/>authoritative documents"]
  node_markdown_flat["Flat Markdown corpus<br/>machine-readable corpus"]
  node_markdown_scoped["Document-scoped Markdown<br/>organized corpus"]
  node_split_parts["Split document parts<br/>Markdown continuations"]
end

subgraph group_domains["Legal retrieval domains"]
  node_statutes["Statutory law<br/>legal domain"]
  node_rules_forms["Rules &amp; forms<br/>legal domain"]
  node_rates["Rates &amp; exemptions<br/>legal domain"]
  node_notifications["Notifications &amp; circulars<br/>legal domain"]
  node_guidance["Operational guidance<br/>legal domain"]
  node_rulings["Interpretive rulings<br/>legal domain"]
end

subgraph group_outputs["Packaging &amp; analysis"]
  node_files_archive["PDF archive<br/>corpus snapshot<br/>[files.zip]"]
  node_md_archive["Markdown archive<br/>corpus snapshot<br/>[md.zip]"]
  node_token_notebook{{"Token calculator<br/>analysis notebook"}}
end

node_pdf -->|"extracted to"| node_markdown_flat
node_pdf -->|"extracted to"| node_markdown_scoped
node_markdown_scoped -->|"splits large documents"| node_split_parts
node_markdown_flat -->|"contains"| node_statutes
node_markdown_scoped -->|"contains"| node_statutes
node_markdown_flat -->|"contains"| node_rules_forms
node_markdown_scoped -->|"contains"| node_rates
node_markdown_flat -->|"contains"| node_notifications
node_markdown_scoped -->|"contains"| node_guidance
node_markdown_scoped -->|"contains"| node_rulings
node_pdf -->|"packaged as"| node_files_archive
node_markdown_scoped -->|"packaged as"| node_md_archive
node_markdown_flat -.->|"measured by"| node_token_notebook
node_markdown_scoped -.->|"measured by"| node_token_notebook

click node_split_parts "https://github.com/kamalesh1145/nacin_md/blob/main/md/GST%20-%20All%20Circulars%20in%20one%20place%20-%202017%20to%202024%20-%20PMA%5B1%5D/GST%20-%20All%20Circulars%20in%20one%20place%20-%202017%20to%202024%20-%20PMA%5B1%5D_part1.md"
click node_statutes "https://github.com/kamalesh1145/nacin_md/blob/main/md/2024-08-01-ACT-Compensation/2024-08-01-ACT-Compensation.md"
click node_rules_forms "https://github.com/kamalesh1145/nacin_md/blob/main/files/2024-08-01%20-RULES%20CGST.md"
click node_rates "https://github.com/kamalesh1145/nacin_md/blob/main/md/Updated%20rates%20as%20on%2015.07.2024/Updated%20rates%20as%20on%2015.07.2024.md"
click node_notifications "https://github.com/kamalesh1145/nacin_md/blob/main/files/GST%20-%20All%20Circulars%20in%20one%20place%20-%202017%20to%202024%20-%20PMA%5B1%5D.md"
click node_guidance "https://github.com/kamalesh1145/nacin_md/blob/main/md/GST-Refund-Manual-for-HelpDesks-ALL-ABOUT-GST-REFUNDS/GST-Refund-Manual-for-HelpDesks-ALL-ABOUT-GST-REFUNDS.md"
click node_rulings "https://github.com/kamalesh1145/nacin_md/blob/main/md/Significant-Judicial-and-Advance-Rulings-in-GST-A-Compilation/Significant-Judicial-and-Advance-Rulings-in-GST-A-Compilation.md"
click node_files_archive "https://github.com/kamalesh1145/nacin_md/blob/main/files.zip"
click node_md_archive "https://github.com/kamalesh1145/nacin_md/blob/main/md.zip"
click node_token_notebook "https://github.com/kamalesh1145/nacin_md/blob/main/Token_Calculator.ipynb"

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_pdf,node_markdown_flat,node_markdown_scoped,node_split_parts toneBlue
class node_statutes,node_rules_forms,node_rates,node_notifications,node_guidance,node_rulings toneAmber
class node_files_archive,node_md_archive,node_token_notebook toneMint
```

## Components

### Source & derivatives

- **Source PDF corpus**: authoritative documents · Retains original visual layout and presentation.
- **Flat Markdown corpus**: machine-readable corpus · Directly addressable ingestion boundary.
- **Document-scoped Markdown**: organized corpus · Preserves source-level grouping.
- [Split document parts](https://github.com/kamalesh1145/nacin_md/blob/main/md/GST%20-%20All%20Circulars%20in%20one%20place%20-%202017%20to%202024%20-%20PMA%5B1%5D/GST%20-%20All%20Circulars%20in%20one%20place%20-%202017%20to%202024%20-%20PMA%5B1%5D_part1.md): Markdown continuations · Large documents are divided into ordered parts. · `md/GST - All Circulars in one place - 2017 to 2024 - PMA[1]/GST - All Circulars in one place - 2017 to 2024 - PMA[1]_part1.md`

### Legal retrieval domains

Content domains exposed by the Markdown corpora.

- [Statutory law](https://github.com/kamalesh1145/nacin_md/blob/main/md/2024-08-01-ACT-Compensation/2024-08-01-ACT-Compensation.md): legal domain · `md/2024-08-01-ACT-Compensation/2024-08-01-ACT-Compensation.md`
- [Rules & forms](https://github.com/kamalesh1145/nacin_md/blob/main/files/2024-08-01%20-RULES%20CGST.md): legal domain · `files/2024-08-01 -RULES CGST.md`
- [Rates & exemptions](https://github.com/kamalesh1145/nacin_md/blob/main/md/Updated%20rates%20as%20on%2015.07.2024/Updated%20rates%20as%20on%2015.07.2024.md): legal domain · `md/Updated rates as on 15.07.2024/Updated rates as on 15.07.2024.md`
- [Notifications & circulars](https://github.com/kamalesh1145/nacin_md/blob/main/files/GST%20-%20All%20Circulars%20in%20one%20place%20-%202017%20to%202024%20-%20PMA%5B1%5D.md): legal domain · `files/GST - All Circulars in one place - 2017 to 2024 - PMA[1].md`
- [Operational guidance](https://github.com/kamalesh1145/nacin_md/blob/main/md/GST-Refund-Manual-for-HelpDesks-ALL-ABOUT-GST-REFUNDS/GST-Refund-Manual-for-HelpDesks-ALL-ABOUT-GST-REFUNDS.md): legal domain · `md/GST-Refund-Manual-for-HelpDesks-ALL-ABOUT-GST-REFUNDS/GST-Refund-Manual-for-HelpDesks-ALL-ABOUT-GST-REFUNDS.md`
- [Interpretive rulings](https://github.com/kamalesh1145/nacin_md/blob/main/md/Significant-Judicial-and-Advance-Rulings-in-GST-A-Compilation/Significant-Judicial-and-Advance-Rulings-in-GST-A-Compilation.md): legal domain · `md/Significant-Judicial-and-Advance-Rulings-in-GST-A-Compilation/Significant-Judicial-and-Advance-Rulings-in-GST-A-Compilation.md`

### Packaging & analysis

- [PDF archive](https://github.com/kamalesh1145/nacin_md/blob/main/files.zip): corpus snapshot · `files.zip`
- [Markdown archive](https://github.com/kamalesh1145/nacin_md/blob/main/md.zip): corpus snapshot · `md.zip`
- [Token calculator](https://github.com/kamalesh1145/nacin_md/blob/main/Token_Calculator.ipynb): analysis notebook · Only computational entry artifact. · `Token_Calculator.ipynb`

## Connections

- Source PDF corpus → Flat Markdown corpus: extracted to
- Source PDF corpus → Document-scoped Markdown: extracted to
- Document-scoped Markdown → Split document parts: splits large documents
- Flat Markdown corpus → Statutory law: contains
- Document-scoped Markdown → Statutory law: contains
- Flat Markdown corpus → Rules & forms: contains
- Document-scoped Markdown → Rates & exemptions: contains
- Flat Markdown corpus → Notifications & circulars: contains
- Document-scoped Markdown → Operational guidance: contains
- Document-scoped Markdown → Interpretive rulings: contains
- Source PDF corpus → PDF archive: packaged as
- Document-scoped Markdown → Markdown archive: packaged as
- Flat Markdown corpus → Token calculator: measured by
- Document-scoped Markdown → Token calculator: measured by
