mamonet GitHub avatar

spring-tax-calc-service

mamonet

A Java 17 and Spring Boot reference implementation for financial calculation and regulatory reporting with versioned configuration-driven rules, full audit trails, and XML compliance file generation with XSD validation.

Stars

5

7-day growth

No data

Forks

1

Open issues

0

License

No data

Last updated

2026-07-29

AI repository intelligence
FR-AI / ANALYSIS

Why it is worth attention

It directly addresses three common failures in financial platforms (hard-coded rules, unexplainable figures, schema-welded reports) with a clean hexagonal architecture and domain purity.

Who it is for

  • Developers building enterprise financial platforms
  • Architects designing configurable calculation engines
  • Compliance engineers requiring auditable results
  • Technical leads evaluating Spring Boot patterns

Use cases

  • Implementing dynamic tax or fee calculation that can change without code releases
  • Generating auditable compliance statements with per-figure derivation
  • Producing XML regulatory reports validated against XSD schemas
  • Creating a modular financial service that can adapt to new jurisdictions via configuration

Strengths

  • Hexagonal architecture with domain core free of framework dependencies
  • Versioned rule sets selected by effective date for historical reproducibility
  • Every computed figure includes a full audit trail of rules, inputs, and intermediates
  • XML compliance output validated against its XSD before being returned, preventing silent schema violations

Considerations

  • Jurisdiction-neutral reference implementation – not ready for any specific country's regulatory filing
  • Benchmark results against the stated design targets are not yet provided
  • Status checklist indicates some features (e.g., benchmark run, Docker CI pipeline) may still be in progress

README quick start

spring-tax-calc-service

A Java 17 and Spring Boot service for financial calculation and regulatory reporting, built the way an enterprise platform has to be built: rules that change without code changes, results that are auditable, and an architecture that survives a decade of amendments.

Financial and tax-compliance platforms fail in a predictable way. Calculation rules are hard-coded, so every rate change or new jurisdiction means a release. Results can't be explained after the fact, so nobody can answer why a figure came out the way it did. Report formats are welded to the domain model, so a new schema version rewrites half the system.

spring-tax-calc-service is a reference implementation that avoids all three. It takes financial transactions, applies a versioned, configuration-driven rule set to compute liabilities, keeps a full audit trail of how every figure was derived, and emits both a financial report and a structured XML compliance file validated against its schema.

Scope note: a generic, jurisdiction-neutral reference implementation for calculation and regulatory reporting. It demonstrates the architecture and the engineering practice, not any one country's filing product.


Architecture

Hexagonal (ports and adapters), so the domain has no idea what a database or an XML schema is.

flowchart LR
    API[REST API\nSpring Web] --> APP[Application services]
    APP --> DOM[Domain core\ncalculation engine]
    DOM --> RULES[(Versioned rule sets\nconfiguration)]
    APP --> REPO[(PostgreSQL\nJPA adapter)]
    APP --> RPT[Report adapter\nfinancial summary]
    APP --> XML[Compliance adapter\nXML + XSD validation]
    DOM --> AUDIT[Audit trail\nper-figure derivation]
  • Domain core. Pure Java 17, no framework annotations: money as BigDecimal with explicit rounding, immutable value objects, records and sealed types for the transaction model.
  • Calculation engine. Rules are data, not code. A rule set is versioned and selected by effective date, so a rate change is configuration and historical periods stay reproducible. Strategy and chain-of-responsibility keep each rule small and independently testable.
  • Audit trail. Every computed figure records the rules applied, the inputs, and the intermediate values, so any number can be explained line by line.
  • Reporting adapters. One produce

Description

Hexagonal Spring Boot tax calculation service where rules are configuration, every figure carries its derivation, and the compliance XML is validated before it leaves the process.

Related repositories

Similar projects matched by category, topics, and programming language.

deerwork-ai
Featured
deerwork-ai GitHub avatar

deer-workflow

An open-source Dynamic Workflow runtime that combines deterministic TypeScript orchestration with replaceable Agent runtimes.

AI & Machine LearningLarge Language Models
312
gavamedia
Featured
gavamedia GitHub avatar

deltafin

Deltafin is a research project that runs the 2.8-trillion-parameter Mixture-of-Experts model Kimi K3 on a single Apple Silicon Mac (e.g., M1 Max with 64 GB) at about 16 seconds per token, using exact, reproducible inference with local or streaming expert loading.

AI & Machine LearningLarge Language Models
304
7-e1even
Featured
7-e1even GitHub avatar

learn-agent

A collection of notes on building coding agents, derived from the production development of the desktop agent Reina, with each mechanism simplified into a zero-dependency, single-file Node.js demo.

AI & Machine LearningLarge Language Models
218