Skip to content

Feature Request: Expand to Full GST Toolkit – SAC Codes, Validation, Export & More #4

Description

@karthi-21

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 datesgetTaxRateOnDate(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.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions