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)
This project has circular dependencies that affect the build process. Clean builds (Day 0) will fail with dependency resolution errors. This is expected behavior.
# Fast build - checks for stubs first
./gradlew buildSmart
# Fast test - checks for stubs first
./gradlew testSmart# Manual build order to handle circular dependencies
./gradlew :jar-common:build :jar-auth:build
./gradlew :svc-data:build
./gradlew :svc-data:pubStubs
./gradlew :svc-position:build
./gradlew :svc-position:pubStubs
./gradlew :svc-event:build
./gradlew :jar-client:build :jar-shell:build
# Or use the build script
./build-with-stubs.sh# Build core libraries
./gradlew buildCore
# Build all services
./gradlew buildServices
# Build specific module
./gradlew :jar-client:build
./gradlew :svc-data:build# Publish contract stubs
./gradlew publishStubs
# Verify stub availability
./gradlew verifyStubs# 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
- jar-shell: Command-line interface
- 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.
For detailed information about the build process and stub management, see BUILD_PROCESS.md.
# Run all tests
./gradlew testSmart
# Run specific module tests
./gradlew :jar-client:test
./gradlew :svc-data:test
# Run with coverage
./gradlew testSmart 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:bootBuildImageThe project uses CircleCI with optimized build pipelines:
- build-core: Builds core libraries and publishes stubs
- build-services: Tests services using published stubs
- package-*: Creates Docker images (master branch only)
See .circleci/config.yml for configuration details.