From a62e10cb1c8aa6952ed22624ae5dcb9ac4337840 Mon Sep 17 00:00:00 2001 From: Umesh Date: Sun, 20 Sep 2026 02:03:20 +0530 Subject: [PATCH] docs: create interactive documentation portal and GitHub Pages deployment workflow --- .github/workflows/pages.yml | 43 + docs/index.html | 2415 +++++++++++++++++++++++++++++++++++ 2 files changed, 2458 insertions(+) create mode 100644 .github/workflows/pages.yml create mode 100644 docs/index.html diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml new file mode 100644 index 0000000..f88c4f6 --- /dev/null +++ b/.github/workflows/pages.yml @@ -0,0 +1,43 @@ +name: Deploy GitHub Pages + +on: + push: + branches: + - main + paths: + - 'docs/**' + - '.github/workflows/pages.yml' + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Pages + uses: actions/configure-pages@v5 + with: + enablement: true + + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: docs + + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..39f1adc --- /dev/null +++ b/docs/index.html @@ -0,0 +1,2415 @@ + + + + + + go-app-kit ยท Production-Grade Enterprise Go Accelerator Kit + + + + + + + + + + + + + + + + + +
+
+
+
+ ๐Ÿš€ Production-Grade Enterprise Go Accelerator Kit +
+

Enterprise Domain Acceleration with Uncompromising Engineering Rigor

+

+ High-velocity business primitives: Indian localized fintech (GSTIN, PAN, IFSC, Aadhaar), transactional outbox with SKIP LOCKED, multi-channel notifications, PDF tax invoices, partitioned audit trails, and streaming CSV export. +

+ + +
+ $ + go get github.com/umesh0492/go-app-kit@v0.3.2 + +
+ + +
+ Release v0.3.2 + CI: Passing + Go 1.26.0 + 0 Vulns + 90.5% Coverage + GolangCI-Lint + License MIT +
+ + +
+
+
90.5%
+
Global Statement Coverage
+
+
+
0
+
Data Races (-race Verified)
+
+
+
0
+
Vulnerabilities (govulncheck)
+
+
+
6
+
Core Business Modules
+
+
+
100%
+
In-Memory Zero-Disk Safety
+
+
+
+
+ + +
+
+

Architecture & Hexagonal Layer Map

+

How modern enterprise microservices build upon go-app-kit and go-libs for zero-compromise reliability.

+
+ +
+ +
+
+ + โ— Layer 3: Enterprise Microservices + + Consumer Layer +
+
+ B2B Invoicing Engines, Order Management, Financial SaaS, Procurement Portals, Statutory Reporting. +
+
+ +
+ โ–ผ imports +
+ + +
+
+ + โ— Layer 2: github.com/umesh0492/go-app-kit + + Domain & Business Accelerator +
+
+ Statutory compliance algorithms, dual-write safety, document compilation, multi-channel dispatching, and streaming data export. +
+
+
+
+ india + 95.5% +
+
GSTIN (mod-36), PAN classification, IFSC, Aadhaar (Verhoeff D5), Money (paise math), INR words.
+
+
+
+ outbox + 90.0% +
+
PostgreSQL Transactional Outbox with SKIP LOCKED leasing, token fencing, and exponential backoff.
+
+
+
+ notifications + 92.3% +
+
Multi-channel broker (SMTP Email, Slack Webhooks, HMAC-SHA256 Signed Webhooks) via workerpool.
+
+
+
+ pdf + 80.7% +
+
HTML-to-PDF in-memory compiler with pluggable Renderer and embedded GST Tax Invoice template.
+
+
+
+ audit + 89.5% +
+
Range-partitioned PostgreSQL compliance audit trails with trigger-enforced append-only constraints and JSON diffing.
+
+
+
+ export + 93.8% +
+
Streaming CSV export with Excel UTF-8 BOM, cell formula injection escaping, and zero-allocation streaming.
+
+
+
+ +
+ โ–ผ builds upon +
+ + +
+
+ + โ— Layer 1: github.com/umesh0492/go-libs + + Microservice Systems Engineering +
+
+ Hardened concurrency primitives, zero-dependency resilience patterns, circuit breakers, rate limiters, and SRE logging. +
+
+ workerpool + circuitbreaker + ratelimit + retry (jittered) + logger (slog) + metrics +
+
+ + +
+
+ โšก End-to-End Enterprise Billing Transaction Pipeline +
+
+ 1. Client Request + โž” + 2. india.ValidateGSTIN + โž” + 3. india.Money Calc + โž” + 4. pdf.GenerateFromTemplate + โž” + 5. outbox.Insert (Postgres TX) + โž” + 6. audit.RecordAsync + โž” + 7. notifications.SendAsync +
+
+
+
+ + +
+
+

Core Business Accelerators

+

Six hardened packages architected for zero data races, high concurrency, and statutory precision.

+
+ + +
+ +
+ + + + + +
+
+ + +
+ + +
+
+
+
+
๐Ÿ‡ฎ๐Ÿ‡ณ
+
+
india
+
+
+ 95.5% Coverage +
+
+ import "github.com/umesh0492/go-app-kit/india" +
+

+ Zero-dependency statutory Indian validation algorithms, fiscal calendar arithmetic, and exact integer paise currency calculations. +

+
    +
  • GSTIN: 15-char official Mod-36 check digit validation and 38 state/UT registries.
  • +
  • PAN & Aadhaar: Entity classification (C, P, H, F, A, T, G) and UIDAI Verhoeff $D_5$ Dihedral checksum with privacy masking.
  • +
  • Fintech Money Type: Exact integer paise arithmetic (`Add`, `Sub`, `Mul`, `MulBasisPoints`, `Percentage`, `Split`), eliminating float errors.
  • +
  • Currency & Words: Indian numbering (`12,34,567.89`) and recursive words converter supporting arbitrary Crores.
  • +
+
+
+ Statutory Primitives + +
+
+ + +
+
+
+
+
๐Ÿ“ฆ
+
+
outbox
+
+
+ 90.0% Coverage +
+
+ import "github.com/umesh0492/go-app-kit/outbox" +
+

+ Guarantees at-least-once message delivery without dual-write race conditions using PostgreSQL row-level lease fencing. +

+
    +
  • Contention-Free Polling: SELECT ... FOR UPDATE SKIP LOCKED allows $N$ worker replicas to poll without lock contention.
  • +
  • Lease-Token Fencing: UUID fencing tokens prevent lease clobbering by stale workers.
  • +
  • Full-Jitter Exponential Backoff: Automatic retry policy with graceful transition of poison pills to DEAD_LETTER.
  • +
  • Workerpool Integration: Directly powered by go-libs/workerpool for bounded background concurrency.
  • +
+
+
+ PostgreSQL Dual-Write + +
+
+ + +
+
+
+
+
๐Ÿ””
+
+
notifications
+
+
+ 92.3% Coverage +
+
+ import "github.com/umesh0492/go-app-kit/notifications" +
+

+ Unified multi-channel alert broker supporting synchronous and asynchronous delivery powered by bounded workerpools. +

+
    +
  • SMTP Email: RFC 2822 / MIME multipart messaging (text/plain, text/html, attachments, and auth).
  • +
  • Slack Integration: Structured webhook adapter with priority color bars (Critical, High, Normal, Low) and metadata fields.
  • +
  • HMAC Webhooks: X-Signature-SHA256 tamper-proofing, timestamp binding, and constant-time signature verification.
  • +
  • Asynchronous Fan-out: Non-blocking broker dispatching via bounded worker queues keeping APIs sub-20ms.
  • +
+
+
+ Multi-Channel Broker + +
+
+ + +
+
+
+
+
๐Ÿ“„
+
+
pdf
+
+
+ 80.7% Coverage +
+
+ import "github.com/umesh0492/go-app-kit/pdf" +
+

+ Zero-disk in-memory HTML-to-PDF compilation engine with bundled statutory GST tax invoice and payment receipt templates. +

+
    +
  • Zero Disk I/O: Produces an in-memory *bytes.Buffer, eliminating temporary file leaks in containerized workloads.
  • +
  • Embedded GST Invoice: Compliant with Indian GST rules: Supplier/Buyer GSTINs, HSN/SAC codes, CGST/SGST/IGST breakdown.
  • +
  • Bounded Subprocess Concurrency: Instance semaphores prevent subprocess exhaustion under high traffic.
  • +
  • Pluggable Renderer: Decoupled Renderer interface allows mocking in unit tests or alternate render backends.
  • +
+
+
+ Document Engine + +
+
+ + +
+
+
+
+
๐Ÿ›ก๏ธ
+
+
audit
+
+
+ 89.5% Coverage +
+
+ import "github.com/umesh0492/go-app-kit/audit" +
+

+ Enterprise compliance audit logging with partitioned PostgreSQL persistence, append-only triggers, and JSON state diffing. +

+
    +
  • Partitioned Storage: Range-partitioned by created_at with trigger-enforced append-only constraints.
  • +
  • JSON State Diffing: ComputeDiff automatically calculates field-level before-and-after property deltas.
  • +
  • Context Extraction: Automatically captures Actor identity, IP address, and comments without polluting domain interfaces.
  • +
  • Asynchronous Ingestion: Decoupled queue prevents slow audit queries from slowing down business transactions.
  • +
+
+
+ Compliance Auditing + +
+
+ + +
+
+
+
+
๐Ÿ“Š
+
+
export
+
+
+ 93.8% Coverage +
+
+ import "github.com/umesh0492/go-app-kit/export" +
+

+ High-throughput, low-memory streaming CSV export directly to io.Writer or HTTP response streams. +

+
    +
  • Zero Memory Accumulation: Flushes rows iteratively; export million-row datasets without unbounded heap spikes.
  • +
  • Excel UTF-8 BOM: Automatically prepends UTF-8 Byte Order Mark (\xEF\xBB\xBF) for flawless Excel rendering.
  • +
  • Formula Injection Escaping: Sanitizes malicious Excel formulas (=, +, -, @) preventing CSV injection attacks.
  • +
  • Flexible Delimiters: Configurable comma, semicolon, tab, and custom CRLF row endings.
  • +
+
+
+ Streaming Export + +
+
+ +
+
+ + +
+
+
+

Interactive In-Browser Statutory Validator

+

Test statutory algorithms offline: GSTIN Mod-36 checksum, Aadhaar Verhoeff D5, PAN classification, and INR Paise calculation.

+
+ +
+ +
+ + + + + + + + +
+ + +
+
+ GSTIN State Code & Entity + 27 (Maharashtra) ยท Firm +
+
+ GSTIN Mod-36 Check Digit + โœ“ Valid Checksum +
+
+ Aadhaar Verhoeff D5 Checksum + โœ“ Valid Dihedral D5 +
+
+ Aadhaar Masked Format + XXXX-XXXX-0128 +
+
+ Paise Integer & 18% GST + 1500050 paise + 270009 CGST/SGST +
+
+ Amount in Words (INR) + Rupees Seventeen Thousand Seven Hundred and Fifty-Nine Paise Only +
+
+
+
+
+ + +
+
+

Reference Microservice Walkthrough

+

Complete production invoice processing pipeline combining all 6 modules located in examples/invoice_service.

+
+ +
+
+

Order & Invoicing Production Pipeline

+ Statement Coverage: 82.9% +
+

+ Demonstrates zero-compromise architectural decoupling: statutory checks run before database calls, documents render in memory without container disk I/O, events commit transactionally with PostgreSQL, and notifications queue asynchronously. +

+ +
+
+
1
+
Statutory Validation
+
ValidateGSTIN and ValidateIFSC run in sub-microsecond time before any expensive DB or PDF processing.
+
+
+
2
+
In-Memory PDF
+
GenerateFromTemplate compiles tax invoice directly into a *bytes.Buffer with zero disk leaks.
+
+
+
3
+
Transactional Outbox
+
outboxStore.Insert commits the domain event in the same Postgres TX. No split-brain states.
+
+
+
4
+
Compliance Audit
+
audit.RecordAsync writes partitioned, append-only logs with before/after state diffs.
+
+
+
5
+
Multi-Channel Alerts
+
broker.SendAsync delivers customer email with PDF attachment and Slack ops alert via workerpool.
+
+
+ +
+
+
โšก Fail-Fast Validation
+
Invalid GSTIN or PAN check digits abort instantly with zero database connections used.
+
+
+
๐Ÿ”’ Dual-Write Safety
+
Outbox SKIP LOCKED ensures at-least-once delivery with zero risk of phantom records if brokers go down.
+
+
+
๐Ÿš€ Sub-20ms Response
+
Slow external side-effects (SMTP, Slack, Audit persistence) run on background worker queues.
+
+
+
+
+ + +
+
+

Interactive Code Viewer

+

Production-ready idiomatic code patterns designed for clean integration and zero boilerplate.

+
+ +
+
+ + + + + + + +
+ + +
+
+ +
package main
+
+import (
+	"fmt"
+	"github.com/umesh0492/go-app-kit/india"
+)
+
+func main() {
+	// 1. Exact Paise Integer Arithmetic (Zero floating-point inaccuracies)
+	taxable := india.NewMoneyFromFloat(15000.50) // 1500050 paise
+	cgst := taxable.Percentage(9.0)              // 9% CGST
+	sgst := taxable.Percentage(9.0)              // 9% SGST
+	total := taxable.Add(cgst).Add(sgst)
+
+	fmt.Printf("Taxable: โ‚น%s\n", taxable.Format()) // "15,000.50"
+	fmt.Printf("Total:   โ‚น%s\n", total.Format())   // "17,700.59"
+
+	// 2. Amount to Words (INR)
+	words := india.AmountToWordsINR(total.Paise())
+	fmt.Printf("In Words: %s\n", words)
+
+	// 3. GSTIN Statutory Mod-36 Checksum Validation
+	gstin := "27AAPFU0939F1ZV"
+	if err := india.ValidateGSTIN(gstin); err != nil {
+		fmt.Printf("Invalid GSTIN: %v\n", err)
+	} else {
+		parsed, _ := india.ParseGSTIN(gstin)
+		fmt.Printf("State: %s (%s), Entity: %s\n",
+			parsed.StateCode, parsed.StateName, parsed.PAN.EntityType())
+	}
+
+	// 4. Aadhaar Verhoeff D5 Dihedral Checksum & Masking
+	aadhaar := "234567890128"
+	if india.IsValidAadhaar(aadhaar) {
+		fmt.Printf("Masked Aadhaar: %s\n", india.MaskAadhaar(aadhaar)) // "XXXX-XXXX-0128"
+	}
+}
+
+
+ + +
+
+ +
package main
+
+import (
+	"context"
+	"time"
+
+	"github.com/jackc/pgx/v5/pgxpool"
+	"github.com/umesh0492/go-app-kit/outbox"
+)
+
+func main() {
+	ctx := context.Background()
+	pool, _ := pgxpool.New(ctx, "postgres://user:pass@localhost:5432/app_db")
+	defer pool.Close()
+
+	// 1. Initialize PostgreSQL Outbox Store with lease fencing
+	store := outbox.NewPGStore(pool, outbox.WithLeaseDuration(30*time.Second))
+
+	// 2. Transactionally commit domain entity and outbox event in same DB transaction
+	tx, _ := pool.Begin(ctx)
+	defer tx.Rollback(ctx)
+
+	// ... execute business mutations on orders/invoices table ...
+
+	evt, _ := outbox.NewEvent("Invoice", "INV-2026-001", "InvoiceCreated", map[string]any{
+		"amount_paise": 1770059,
+		"customer_id":  "CUST-8821",
+	})
+	if err := store.Insert(ctx, tx, *evt); err != nil {
+		return
+	}
+	_ = tx.Commit(ctx) // Atomic commit: zero phantom records
+
+	// 3. Autonomous background relay using SELECT ... FOR UPDATE SKIP LOCKED
+	relay, _ := outbox.NewRelay(outbox.RelayConfig{
+		Store:        store,
+		Publisher:    kafkaPublisher,
+		PollInterval: 500 * time.Millisecond,
+		BatchSize:    100,
+	})
+	go relay.Start(ctx)
+}
+
+
+ + +
+
+ +
package main
+
+import (
+	"context"
+	"github.com/umesh0492/go-app-kit/notifications"
+)
+
+func main() {
+	ctx := context.Background()
+
+	// 1. Initialize multi-channel broker with bounded workerpool
+	broker := notifications.NewBroker(notifications.DefaultConfig())
+	defer broker.Close()
+
+	// 2. Register senders: Email (SMTP), Slack, and HMAC-Signed Webhook
+	broker.RegisterSender(notifications.NewEmailSender(notifications.EmailConfig{
+		Host: "smtp.mail.com",
+		Port: 587,
+		User: "alerts@domain.com",
+		Pass: "secret",
+		From: "Billing ",
+	}))
+	broker.RegisterSender(notifications.NewSlackSender(notifications.SlackConfig{
+		WebhookURL: "https://hooks.slack.com/services/T00/B00/X00",
+		Channel:    "#finance-alerts",
+	}))
+
+	// 3. Non-blocking asynchronous dispatch
+	_ = broker.SendAsync(ctx, notifications.Message{
+		Title:      "Statutory Tax Invoice Ready: INV-2026",
+		Body:       "Your invoice has been generated with GST breakdown.",
+		Priority:   notifications.PriorityHigh,
+		Recipients: []string{"client-finance@corp.com"},
+		Channels:   []notifications.Channel{notifications.ChannelEmail, notifications.ChannelSlack},
+		Attachments: []notifications.Attachment{
+			{Filename: "INV-2026.pdf", ContentType: "application/pdf", Data: pdfBytes},
+		},
+	})
+}
+
+
+ + +
+
+ +
package main
+
+import (
+	"bytes"
+	"fmt"
+	"github.com/umesh0492/go-app-kit/pdf"
+)
+
+func main() {
+	// Statutory B2B GST Invoice Data
+	invoiceData := pdf.InvoiceData{
+		InvoiceNumber: "INV-2026-0042",
+		InvoiceDate:   "2026-09-20",
+		SupplierName:  "Acme Cloud Technologies Pvt Ltd",
+		SupplierGSTIN: "27AAPFU0939F1ZV",
+		BuyerName:     "Enterprise Retailers Ltd",
+		BuyerGSTIN:    "29AAACI1681G1ZM",
+		Items: []pdf.InvoiceItem{
+			{
+				Description: "Cloud Infrastructure - September",
+				HSNSAC:      "998313",
+				Quantity:    1,
+				UnitPrice:   15000.50,
+				CGSTRate:    9.0,
+				SGSTRate:    9.0,
+			},
+		},
+	}
+
+	// In-memory HTML-to-PDF compilation (Zero disk I/O)
+	pdfBuf, err := pdf.GenerateFromTemplate(pdf.GSTInvoiceTemplate, invoiceData,
+		pdf.WithPageSize("A4"),
+		pdf.WithOrientation("Portrait"),
+		pdf.WithMargins(10, 10, 10, 10),
+	)
+	if err != nil {
+		fmt.Printf("PDF generation failed: %v\n", err)
+		return
+	}
+
+	fmt.Printf("Generated %d bytes in-memory PDF buffer!\n", pdfBuf.Len())
+}
+
+
+ + +
+
+ +
package main
+
+import (
+	"context"
+	"github.com/jackc/pgx/v5/pgxpool"
+	"github.com/umesh0492/go-app-kit/audit"
+)
+
+func main() {
+	ctx := context.Background()
+	pool, _ := pgxpool.New(ctx, "postgres://user:pass@localhost:5432/audit_db")
+	defer pool.Close()
+
+	// 1. Initialize asynchronous partitioned audit recorder
+	recorder, _ := audit.NewPGRecorder(audit.Config{
+		DB:        pool,
+		Workers:   4,
+		QueueSize: 500,
+	})
+	defer recorder.Close()
+
+	// 2. Calculate field-level state diff (Old vs New)
+	oldState := map[string]any{"status": "DRAFT", "amount": 10000}
+	newState := map[string]any{"status": "ISSUED", "amount": 10000, "gstin": "27AAPFU0939F1ZV"}
+
+	// 3. Construct event with context-propagated actor & IP
+	ctx = audit.WithActor(ctx, "admin@corp.com")
+	ctx = audit.WithIP(ctx, "192.168.1.50")
+
+	event := audit.NewEvent(ctx, "INVOICE_STATE_CHANGE", "Invoice", "INV-100", oldState, newState)
+	recorder.RecordAsync(event)
+}
+
+
+ + +
+
+ +
package main
+
+import (
+	"net/http"
+	"github.com/umesh0492/go-app-kit/export"
+	"github.com/umesh0492/go-app-kit/india"
+)
+
+type InvoiceExportRow struct {
+	ID          string
+	BuyerGSTIN  string
+	AmountPaise int64
+}
+
+func exportHandler(w http.ResponseWriter, r *http.Request) {
+	w.Header().Set("Content-Type", "text/csv; charset=utf-8")
+	w.Header().Set("Content-Disposition", "attachment; filename=\"invoices.csv\"")
+
+	columns := []export.Column[InvoiceExportRow]{
+		{Header: "Invoice ID", Extractor: func(r InvoiceExportRow) string { return r.ID }},
+		{Header: "Buyer GSTIN", Extractor: func(r InvoiceExportRow) string { return r.BuyerGSTIN }},
+		{Header: "Amount (INR)", Extractor: func(r InvoiceExportRow) string {
+			return india.FormatINRPaise(r.AmountPaise)
+		}},
+	}
+
+	// Streams directly to ResponseWriter with Excel UTF-8 BOM and formula sanitization
+	streamer := export.NewCSVStreamer(w, columns, export.WithBOM(true))
+	defer streamer.Flush()
+
+	// Iteratively stream millions of rows without loading all into memory
+	for rows.Next() {
+		streamer.WriteRow(fetchNextInvoiceRow())
+	}
+}
+
+
+ + +
+
+ +
package invoice_service
+
+import (
+	"context"
+	"github.com/umesh0492/go-app-kit/audit"
+	"github.com/umesh0492/go-app-kit/india"
+	"github.com/umesh0492/go-app-kit/notifications"
+	"github.com/umesh0492/go-app-kit/outbox"
+	"github.com/umesh0492/go-app-kit/pdf"
+)
+
+// ProcessInvoice combines validation, PDF generation, outbox, audit, and notifications.
+func (s *InvoiceService) ProcessInvoice(ctx context.Context, req InvoiceRequest) ([]byte, error) {
+	// Step 1: Statutory Validation (Fail-Fast)
+	if err := india.ValidateGSTIN(req.SupplierGSTIN); err != nil {
+		return nil, err
+	}
+	if err := india.ValidateGSTIN(req.BuyerGSTIN); err != nil {
+		return nil, err
+	}
+
+	// Step 2: Exact Money & Total Calculation
+	taxable := india.NewMoneyFromFloat(req.Amount)
+	cgst := taxable.Percentage(9.0)
+	sgst := taxable.Percentage(9.0)
+	total := taxable.Add(cgst).Add(sgst)
+
+	// Step 3: In-Memory PDF Document Compilation
+	pdfBuf, err := pdf.GenerateFromTemplate(pdf.GSTInvoiceTemplate, req.ToInvoiceData(total))
+	if err != nil {
+		return nil, err
+	}
+
+	// Step 4: Transactional Outbox (Postgres DB Transaction)
+	tx, err := s.pool.Begin(ctx)
+	if err != nil {
+		return nil, err
+	}
+	defer tx.Rollback(ctx)
+
+	evt, _ := outbox.NewEvent("Invoice", req.ID, "InvoiceCreated", total)
+	if err := s.outboxStore.Insert(ctx, tx, *evt); err != nil {
+		return nil, err
+	}
+	if err := tx.Commit(ctx); err != nil {
+		return nil, err
+	}
+
+	// Step 5: Asynchronous Audit Logging
+	s.auditRecorder.RecordAsync(audit.NewEvent(ctx, "INVOICE_ISSUED", "Invoice", req.ID, nil, total))
+
+	// Step 6: Multi-Channel Alerts via Workerpool
+	_ = s.broker.SendAsync(ctx, notifications.Message{
+		Title:      "Invoice Issued: " + req.ID,
+		Body:       "Attached is your GST Tax Invoice.",
+		Recipients: []string{req.BuyerEmail},
+		Channels:   []notifications.Channel{notifications.ChannelEmail, notifications.ChannelSlack},
+		Attachments: []notifications.Attachment{
+			{Filename: req.ID + ".pdf", ContentType: "application/pdf", Data: pdfBuf.Bytes()},
+		},
+	})
+
+	return pdfBuf.Bytes(), nil
+}
+
+
+ +
+
+ + +
+
+

Verified Statement Coverage

+

Continuous verification enforced by scripts/check_version.sh and scripts/check_coverage.sh.

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PackagePurposeDependenciesStatement Coverage
indiaStatutory Indian validations (GSTIN mod-36, PAN, IFSC, Aadhaar Verhoeff D5, INR Money, Aging)Zero external95.5%
exportLow-memory streaming CSV exporter with Excel UTF-8 BOM & formula injection protectionZero external93.8%
notificationsMulti-channel notification broker (SMTP Email, Slack, Webhook HMAC-SHA256 & versioning)go-libs/workerpool92.3%
outboxPostgreSQL transactional outbox engine with row-level locked poller & lease fencingjackc/pgx/v590.0%
auditPartitioned PostgreSQL audit logging with automated JSON diffing & append-only triggersjackc/pgx/v589.5%
pdfIn-memory HTML-to-PDF compilation & embedded GST invoice templatesPluggable / wkhtmltopdf80.7%
examples/invoice_serviceReference microservice with end-to-end integration test & exact paise mathInternal integration82.9%
Overall RepositoryVerified Statement Coverage across whole repository (Zero data races)Go 1.26.090.5%
+
+
+ + + + + +
Copied to clipboard!
+ + + +