{"slug": "show-hn-panini-a-zero-dependency-parser-for-chaotic-indian-bank-narrations", "title": "Show HN: Panini – a zero-dependency parser for chaotic Indian bank narrations", "summary": "A developer released Panini, a free, Apache-2.0-licensed TypeScript engine with zero runtime dependencies that parses chaotic Indian bank narrations and ReBIT v2.0 Account Aggregator payloads into structured transactions using deterministic JSON grammars rather than AI models. The project ships four packages — @panini/core, @panini/rules-engine, @panini/standards-schema and @panini/simulator — with built-in grammars for SBI, HDFC, ICICI and generic banks, validated by 158 tests across 15 suites. Panini's optional ops layer (rate limiting, metering, telemetry) is opt-in and its telemetry event type structurally excludes raw narrations, counterparties, references, VPAs and amounts, so parsing runs entirely in memory on the host.", "body_md": "**The First Grammatical Open-Finance Orchestration Core for India's Digital Public Infrastructure (DPI).**\n\nNamed after Acharya Pāṇini — the ancient architect of formal rule-based grammar — **Panini** is a zero-runtime-dependency TypeScript engine built to parse, structure, and normalize chaotic financial data ecosystems. It is a **fully free and open-source** local sandbox for processing **ReBIT v2.0 Account Aggregator payload schemas** and **OCEN 4.0 lending networks**, shipped with framework-neutral ops extensions for teams self-hosting at scale.\n\nJust as Pāṇini's Aṣṭādhyāyī reduced a language to deterministic rules ~2500 years ago, Panini treats bank narrations as a grammar — not an AI problem. Fully free under Apache-2.0, forever.\n\nThe platform isolates the parsing core from the optional ops layer (rate limiting, metering, telemetry) to guarantee absolute privacy data sandboxing — everything is free and runs in memory on your host.\n\n```\n                 ┌────────────────────────────────────────────────┐\n                 │              Client / Host Server              │\n                 │                                                │\n   narrations ──►│  @panini/rules-engine ──► @panini/core          │\n   AA payloads ─►│     (JSON grammars)         (Normalizer)        │\n                 │            │                                    │\n                 │            ▼                                    │\n                 │     NormalizedTransaction / AAProfile          │\n                 │            │                                    │\n                 │            ▼                                    │\n                 │  @panini/standards-schema  (ReBIT / OCEN)      │\n                 └───────────┬────────────────────────────────────┘\n                             │  (optional ops layer)\n                 ┌───────────▼────────────────────────────────────┐\n                 │  EnterpriseProxy + HTTP adapter                 │\n                 │  rate-limit • usage meter • opt-in telemetry    │\n                 │  (PII-free by construction — no raw narrations) │\n                 └────────────────────────────────────────────────┘\n```\n\n| Package | Role | \n|---|---|\n| `@panini/core` | Deterministic tokenizer + grammar-driven normalizer; optional ops layer (rate limiting, metering, HTTP adapter). | \n| `@panini/rules-engine` | Community-extendable JSON grammars for Indian banks (SBI, HDFC, ICICI, generic) + archetype rule set. | \n| `@panini/standards-schema` | Zero-dependency validators for ReBIT v2.0 AA profiles and OCEN 4.0 loan applications. | \n| `@panini/simulator` | Generative sandbox producing seeded, anomaly-injected ReBIT payloads for client-side testing. | \n\n- **Zero runtime dependencies.** The parsing core is pure TypeScript — deterministic regex grammars and tokenizers only. No network calls, no ML models, no phone-home telemetry. Safe to embed inside on-prem or sandboxed environments.\n- **Rules are data, not code.** Bank-specific grammars live in standalone JSON files loaded at runtime; updating a bank's narration layout never requires touching the TypeScript engine.\n- **Strictly typed.** Strict TypeScript throughout — no`any` ,`unknown` at external boundaries,`exactOptionalPropertyTypes` enabled.\n- **PII isolation.** The optional telemetry channel is opt-in only and its event type has*structurally no field* for raw narrations, counterparties, references, VPAs, or amounts.\n\n```\nnpm install\nnpm run build   # tsc -b (project references)\nnpm test        # jest — 158 tests across 15 suites\njs\nimport { parseBankNarration } from '@panini/rules-engine';\n\nparseBankNarration('NEFT-N3452618902-SALARY-OCTOBER 2026-TCS LTD');\n// {\n//   channel: 'NEFT',\n//   type: 'CREDIT',\n//   ref_no: 'N3452618902',\n//   counterparty: 'TCS Ltd',\n//   is_salary: true,\n//   category: 'Income',\n//   ...\n// }\n```\n\nOr use the raw engine for custom grammars:\n\n``` js\nimport { Normalizer } from '@panini/core';\nimport { loadBuiltinRuleSets, loadCategories } from '@panini/rules-engine';\n\nconst normalizer = new Normalizer({\n  ruleSets: loadBuiltinRuleSets(),\n  categories: loadCategories(),\n});\nnormalizer.normalize('UPI-SWIGGY-826384@okaxis-20261015-REV-DEBIT');\njs\nimport { validateAAProfile, isOCENLoanApplication } from '@panini/standards-schema';\n\nconst result = validateAAProfile(payload); // { valid, errors[] } — zero deps\nnpm run simulate -- --count=50 --seed=7 --anomaly-rate=0.2\nnpm run simulate -- --count=50 -o mocks.json --pretty\n```\n\nStreams deterministic ReBIT v2.0 FI profiles — including deliberate anomalies (truncated narrations, corrupt timestamps, dropped fields) for exercising client-side error handling.\n\n``` js\nimport { createPaniniHttpHandler } from '@panini/core';\n\napp.post('/v1/parse', createPaniniHttpHandler(proxy));\n// bearer token → rate-limit bucket → normalize → usage meter → JSON\nnpm run build          # strict project-reference build\nnpm test               # full monorepo suite\nnpm run lint           # eslint flat config\nnpm run format         # prettier\n```\n\nA `pre-commit` gate (`scripts/pre-commit.sh`, installed at `.git/hooks/pre-commit`) runs lint + tests before any commit finalizes.\n\n**Project Panini** is an open-source initiative by **[People of Product™](https://theproduct.city)** — the team behind **[Product City](https://theproduct.city)**, built to empower professionals with leading tech capabilities and to make India's open-finance infrastructure more open for everyone.\n\nFind us:\n\n- 🌐 Website — [theproduct.city](https://theproduct.city)\n- 💼 LinkedIn — [People of Product](https://www.linkedin.com/company/people-of-product) ·[Kapil (founder)](https://www.linkedin.com/in/kapil0/)\n- 🐦 X — [@PeopleOfProduct](https://x.com/PeopleOfProduct) ·[@product_city](https://x.com/product_city) ·[@Krazzy_Bunny](https://x.com/Krazzy_Bunny)\n\nContributions welcome — see [CONTRIBUTING.md](https://github.com/peopleofproduct/Panini/blob/main/CONTRIBUTING.md).", "url": "https://wpnews.pro/news/show-hn-panini-a-zero-dependency-parser-for-chaotic-indian-bank-narrations", "canonical_source": "https://github.com/peopleofproduct/Panini", "published_at": "2026-10-17 09:14:13+00:00", "updated_at": "2026-10-17 09:30:19.002980+00:00", "lang": "en", "topics": ["developer-tools", "ai-infrastructure"], "entities": ["Panini", "@panini/core", "@panini/rules-engine", "@panini/standards-schema", "@panini/simulator", "ReBIT", "OCEN", "SBI"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/show-hn-panini-a-zero-dependency-parser-for-chaotic-indian-bank-narrations", "markdown": "https://wpnews.pro/news/show-hn-panini-a-zero-dependency-parser-for-chaotic-indian-bank-narrations.md", "text": "https://wpnews.pro/news/show-hn-panini-a-zero-dependency-parser-for-chaotic-indian-bank-narrations.txt", "jsonld": "https://wpnews.pro/news/show-hn-panini-a-zero-dependency-parser-for-chaotic-indian-bank-narrations.jsonld"}}