Skip to content

About

Collection of services to compute and present financial positions

Topics

Resources

Stars

4 stars

Watchers

1 watching

Forks

Latest commit

 

History

1,719 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Financial Transaction Processing Services

This service transforms financial transaction data into portfolio positions for valuation against market data.

Check out the demo stack.

Components

Quick Start

Prerequisites

  • Java 21
  • Gradle 8.14+
  • Docker (for containerized services)

Building the Project

Standard Build

Contract stubs flow between modules as regular Gradle artifacts (svc-data and svc-position expose a stubs configuration consumed by jar-client, svc-position and svc-event), so a plain build works from a clean checkout:

# Build everything (clean checkout OK)
./gradlew build

# Run all tests
./gradlew testAll

Individual Module Builds

# Build specific module (Gradle builds any stub producers it needs first)
./gradlew :jar-client:build
./gradlew :svc-data:build

Stub Management

# Optionally publish contract stubs to ~/.m2 (not required for building)
./gradlew publishStubs

Utility Tasks

# Clean all projects
./gradlew cleanAll

# Validate dependencies
./gradlew validateDependencies

# Format Kotlin code
./gradlew formatKotlin

# Lint Kotlin code
./gradlew lintKotlin

Project Structure

Core Libraries

  • jar-common: Shared utilities, models, and contracts
  • jar-auth: Authentication and authorization
  • jar-client: Client libraries for service communication

Services

  • svc-data: Data persistence and market data services
  • svc-position: Portfolio position calculations
  • svc-event: Corporate event processing

Contract Testing

The project uses Spring Cloud Contract for contract testing with a hybrid approach:

  • Shared Context: Most tests share Spring context for ~4-6x faster execution
  • Isolated Context: Complex tests (like Kafka) use isolated contexts for reliability

See CONTRACT_TEST_ARCHITECTURE.md for detailed information.

Development

Running Tests

# Run all tests
./gradlew testAll

# Run specific module tests
./gradlew :jar-client:test
./gradlew :svc-data:test

# Run with coverage
./gradlew testAll jacocoTestReport

Code Quality

# Format code
./gradlew formatKotlin

# Lint code
./gradlew lintKotlin

# Check for issues
./gradlew check

Docker Builds

# Build Docker images
./gradlew :svc-data:bootBuildImage
./gradlew :svc-position:bootBuildImage
./gradlew :svc-event:bootBuildImage

CI/CD

GitHub Actions builds the project on GitHub-hosted ubuntu-24.04-arm runners:

  • build: a single ./gradlew build --parallel on every PR and push (Gradle handles stub ordering)
  • package: arm64 Docker images for the five services, tagged with the run number and latest (main and deploy/** only)
  • publish-jars, coverage (Codacy, Codecov) and security-scan (Snyk, main only)

bc-deploy reads the run number of this workflow as each chart's appVersion. See .github/workflows/build.yml.

About

Collection of services to compute and present financial positions

Topics

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages