This service transforms financial transaction data into portfolio positions for valuation against market data.
Check out the demo stack.
- Viewer: User interface.
- Data Service: Data persistence and retrieval.
- Position Service: Computes portfolio positions.
- Corporate Events: Manages corporate actions.
- Java 21
- Gradle 8.14+
- Docker (for containerized services)
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# Build specific module (Gradle builds any stub producers it needs first)
./gradlew :jar-client:build
./gradlew :svc-data:build# Optionally publish contract stubs to ~/.m2 (not required for building)
./gradlew publishStubs# Clean all projects
./gradlew cleanAll
# Validate dependencies
./gradlew validateDependencies
# Format Kotlin code
./gradlew formatKotlin
# Lint Kotlin code
./gradlew lintKotlin- jar-common: Shared utilities, models, and contracts
- jar-auth: Authentication and authorization
- jar-client: Client libraries for service communication
- svc-data: Data persistence and market data services
- svc-position: Portfolio position calculations
- svc-event: Corporate event processing
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.
# Run all tests
./gradlew testAll
# Run specific module tests
./gradlew :jar-client:test
./gradlew :svc-data:test
# Run with coverage
./gradlew testAll jacocoTestReport# Format code
./gradlew formatKotlin
# Lint code
./gradlew lintKotlin
# Check for issues
./gradlew check# Build Docker images
./gradlew :svc-data:bootBuildImage
./gradlew :svc-position:bootBuildImage
./gradlew :svc-event:bootBuildImageGitHub Actions builds the project on GitHub-hosted ubuntu-24.04-arm runners:
- build: a single
./gradlew build --parallelon every PR and push (Gradle handles stub ordering) - package: arm64 Docker images for the five services, tagged with the run number and
latest(mainanddeploy/**only) - publish-jars, coverage (Codacy, Codecov) and security-scan (Snyk,
mainonly)
bc-deploy reads the run number of this workflow as each chart's appVersion. See .github/workflows/build.yml.