Hi @karthi-21,
Building on the previous two requests (enriched HSN data + calculation utilities), here are more high-value features that would complete this package as a one-stop GST utility library for Indian developers.
3. SAC Codes for Services (Very Important Gap)
Most GST applications deal with both Goods (HSN) and Services (SAC).
// New methods
getAllSac();
getSacByCode(code: string);
searchSac(query: string);
getSacWithRates(code: string); // if rates are added
This would allow unified lookup: getCodeDetails(code) that works for both HSN and SAC.
4. GSTIN & Compliance Validation Helpers
validateGSTIN(gstin: string): { isValid: boolean; stateCode: string; error?: string };
formatGSTIN(gstin: string): string;
getStateFromGSTIN(gstin: string): string;
isValidPAN(pan: string);
5. Data Export & Reporting Utilities
exportToCSV(data: any[], filename?: string);
exportToJSON();
generateGSTR1Summary(items: Item[]); // group by tax rate
6. Historical & Advanced Lookup
- Support for effective dates →
getTaxRateOnDate(hsnCode, date)
- Multi-language support (especially Hindi descriptions)
- Fuzzy / smart search improvements
7. Developer Experience Improvements
- CLI Tool (
hsn-cli search "cotton" or hsn-cli tax 52010011 10000)
- Better error messages and examples in docs
- Pre-built examples for popular frameworks (Express, NestJS, React, etc.)
- Caching layer for high-traffic apps
8. Bonus / Nice-to-Haves
getChapterSummary(chapter: string) – overview of rates in a chapter
- Reverse lookup:
findCodesByRate(rate: number)
- Bulk validation for invoice arrays
- Configurable options (custom rounding rules, language preference)
Overall Vision
With these additions, hsn-code-package could become the go-to library for GST in Node.js/TypeScript — covering:
- Data (HSN + SAC + Rates)
- Calculations
- Validation
- Exports & Reporting
This would save developers from combining multiple small packages.
I'm happy to help with testing, documentation, or even contributing code for any of these.
Hi @karthi-21,
Building on the previous two requests (enriched HSN data + calculation utilities), here are more high-value features that would complete this package as a one-stop GST utility library for Indian developers.
3. SAC Codes for Services (Very Important Gap)
Most GST applications deal with both Goods (HSN) and Services (SAC).
This would allow unified lookup:
getCodeDetails(code)that works for both HSN and SAC.4. GSTIN & Compliance Validation Helpers
5. Data Export & Reporting Utilities
6. Historical & Advanced Lookup
getTaxRateOnDate(hsnCode, date)7. Developer Experience Improvements
hsn-cli search "cotton"orhsn-cli tax 52010011 10000)8. Bonus / Nice-to-Haves
getChapterSummary(chapter: string)– overview of rates in a chapterfindCodesByRate(rate: number)Overall Vision
With these additions,
hsn-code-packagecould become the go-to library for GST in Node.js/TypeScript — covering:This would save developers from combining multiple small packages.
I'm happy to help with testing, documentation, or even contributing code for any of these.