返回资讯中心
外部精选
软件工程
#开发者实时流

Show HN: Panini – a zero-dependency parser for chaotic Indian bank narrations

The First Grammatical Open-Finance Orchestration Core for India's Digital Public Infrastructure (DPI).

Hacker News 最新kapil_pawar2026/10/17 · 2026/10/1712 分钟阅读

以下正文同步自 Hacker News 最新,版权归原站所有,已转换为易读排版。

The First Grammatical Open-Finance Orchestration Core for India's Digital Public Infrastructure (DPI).

Named 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.

Just 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.

The 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.

┌────────────────────────────────────────────────┐ │ Client / Host Server │ │ │ narrations ──►│ @panini/rules-engine ──► @panini/core │ AA payloads ─►│ (JSON grammars) (Normalizer) │ │ │ │ │ ▼ │ │ NormalizedTransaction / AAProfile │ │ │ │ │ ▼ │ │ @panini/standards-schema (ReBIT / OCEN) │ └───────────┬────────────────────────────────────┘ │ (optional ops layer) ┌───────────▼────────────────────────────────────┐ │ EnterpriseProxy + HTTP adapter │ │ rate-limit • usage meter • opt-in telemetry │ │ (PII-free by construction — no raw narrations) │ └────────────────────────────────────────────────┘

Package Role

@panini/core Deterministic tokenizer + grammar-driven normalizer; optional ops layer (rate limiting, metering, HTTP adapter).

@panini/rules-engine Community-extendable JSON grammars for Indian banks (SBI, HDFC, ICICI, generic) + archetype rule set.

@panini/standards-schema Zero-dependency validators for ReBIT v2.0 AA profiles and OCEN 4.0 loan applications.

@panini/simulator Generative sandbox producing seeded, anomaly-injected ReBIT payloads for client-side testing.

✨ Design Guarantees

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.

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.

Strictly typed. Strict TypeScript throughout — no any, unknown at external boundaries, exactOptionalPropertyTypes enabled.

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.

🚀 Quick Start

npm install npm run build # tsc -b (project references) npm test # jest — 158 tests across 15 suites

Parse a narration

import { parseBankNarration } from '@panini/rules-engine';

parseBankNarration('NEFT-N3452618902-SALARY-OCTOBER 2026-TCS LTD'); // { // channel: 'NEFT', // type: 'CREDIT', // ref_no: 'N3452618902', // counterparty: 'TCS Ltd', // is_salary: true, // category: 'Income', // ... // }

Or use the raw engine for custom grammars:

import { Normalizer } from '@panini/core'; import { loadBuiltinRuleSets, loadCategories } from '@panini/rules-engine';

const normalizer = new Normalizer({ ruleSets: loadBuiltinRuleSets(), categories: loadCategories(), }); normalizer.normalize('UPI-SWIGGY-826384@okaxis-20261015-REV-DEBIT');

Validate DPI payloads

import { validateAAProfile, isOCENLoanApplication } from '@panini/standards-schema';

const result = validateAAProfile(payload); // { valid, errors[] } — zero deps

Generate sandbox traffic

npm run simulate -- --count=50 --seed=7 --anomaly-rate=0.2 npm run simulate -- --count=50 -o mocks.json --pretty

Streams deterministic ReBIT v2.0 FI profiles — including deliberate anomalies (truncated narrations, corrupt timestamps, dropped fields) for exercising client-side error handling.

import { createPaniniHttpHandler } from '@panini/core';

app.post('/v1/parse', createPaniniHttpHandler(proxy)); // bearer token → rate-limit bucket → normalize → usage meter → JSON

🛠️ Development

npm run build # strict project-reference build npm test # full monorepo suite npm run lint # eslint flat config npm run format # prettier

A pre-commit gate (scripts/pre-commit.sh, installed at .git/hooks/pre-commit) runs lint + tests before any commit finalizes.

Project Panini is an open-source initiative by People of Product™ — the team behind Product City, built to empower professionals with leading tech capabilities and to make India's open-finance infrastructure more open for everyone.

Contributions welcome — see CONTRIBUTING.md.

正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。

打开原文
去社区讨论 →