Skip to content

Phase 0: Project scaffolding with Gradle 9, Helidon 4 SE, and test infrastructure#44

Merged
Puneethkumarck merged 7 commits intomainfrom
feature/phase-0-scaffolding
Apr 10, 2026
Merged

Phase 0: Project scaffolding with Gradle 9, Helidon 4 SE, and test infrastructure#44
Puneethkumarck merged 7 commits intomainfrom
feature/phase-0-scaffolding

Conversation

@Puneethkumarck
Copy link
Copy Markdown
Owner

@Puneethkumarck Puneethkumarck commented Apr 10, 2026

Summary

  • SOL-1: Multi-module Gradle 9.4.1 project with prism (service) and prism-api (library) modules, convention plugins in buildSrc/, Java 25 toolchain, Spotless formatting, Jib containerization, and libs.versions.toml with all dependencies pinned to latest stable versions
  • SOL-2: 8 shared API DTOs as Java records (Page<T>, TransactionResponse, TransferResponse, MemoResponse, AccountResponse, StatsResponse, HealthResponse, ErrorResponse) — all with @Builder(toBuilder = true), zero framework imports
  • SOL-3: Flyway migrations — 5 core tables (transactions, failed_transactions, large_transfers, memos, accounts), staging table for COPY protocol, 7 concurrent indexes
  • SOL-4: 5 ArchUnit rules enforcing hexagonal architecture boundaries (domain isolation from infrastructure/application/frameworks/JDBC)
  • SOL-5: Docker Compose with PostgreSQL 16, Prometheus, Grafana, optional app service, .env.example with all config variables
  • SOL-6: Test infrastructure — PostgresExtension (Testcontainers JUnit 5), TestDataSourceFactory (HikariCP), TestUtils (eqIgnoringTimestamps/eqIgnoring for BDDMockito recursive comparison)

Closes #1
Closes #2
Closes #3
Closes #4
Closes #5
Closes #6

Test plan

  • ./gradlew build passes (compile + Spotless + ArchUnit)
  • ./gradlew test passes (5 ArchUnit rules with allowEmptyShould)
  • ./gradlew spotlessApply runs without error
  • Both modules resolve: prism, prism-api
  • Java 25 toolchain configured
  • All dependency versions verified against Maven Central as latest stable
  • make infra-up starts PostgreSQL, Prometheus, Grafana (requires Docker)
  • make infra-clean removes volumes

🤖 Generated with Claude Code

Puneethkumarck and others added 6 commits April 10, 2026 12:21
Set up root build, settings, and buildSrc convention plugins (prism.service
+ prism.library) for prism and prism-api modules. Configure Java 25
toolchain, Spotless formatting, Jib containerization, integrationTest
source set, and MapStruct compiler args. Add Gradle 9.4.1 wrapper,
libs.versions.toml with latest stable dependency versions, .editorconfig,
.gitignore, and Makefile with all build targets.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Create 8 Java records in prism-api module: Page<T> (generic paginated
wrapper), TransactionResponse, TransferResponse, MemoResponse,
AccountResponse, StatsResponse, HealthResponse, and ErrorResponse.
All records use @builder(toBuilder = true) with zero framework imports.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Create three migrations: V1 defines 5 core tables (transactions,
failed_transactions, large_transfers, memos, accounts), V2 adds
staging_transactions for COPY protocol bulk inserts, V3 creates 7
performance indexes using CONCURRENTLY with non-transactional execution.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add 5 ArchUnit rules enforcing hexagonal architecture: domain must not
depend on infrastructure or application, domain must not import framework
or JDBC packages, infrastructure must not depend on routing. Add JUnit
Platform Launcher dependency required by Gradle 9.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Configure PostgreSQL 16, Prometheus, and Grafana services with named
volumes. App service uses profile for optional inclusion. Add .env.example
with all 8 configuration variables defaulting to websocket mode. Add
infra-status and infra-logs Makefile targets.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Create PostgresExtension (JUnit 5 BeforeAllCallback starting PostgreSQL
16 container), TestDataSourceFactory (HikariCP over Testcontainers),
TestUtils (eqIgnoringTimestamps and eqIgnoring for BDDMockito recursive
comparison), and fixtures base package in testFixtures source set.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Puneethkumarck Puneethkumarck added the phase:0-scaffolding Project scaffolding label Apr 10, 2026
@Puneethkumarck Puneethkumarck self-assigned this Apr 10, 2026
…Jib update

Use static initializer for Testcontainers singleton pattern instead of
volatile+isRunning() for thread-safe container lifecycle. Parameterize
username/password in TestDataSourceFactory to avoid hardcoded credentials.
Update Jib Gradle plugin from 3.4.5 to 3.5.3 (latest stable).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 10, 2026

📝 Walkthrough

Walkthrough

Establishes foundational project infrastructure including multi-module Gradle build system with convention plugins, dependency management catalog, API response data classes, database migrations, Docker Compose environment for local development, test utilities, and configuration files for build, code style, and Git management.

Changes

Cohort / File(s) Summary
Root Configuration
.editorconfig, .env.example, .gitignore, settings.gradle.kts, build.gradle.kts
Global editor formatting rules, environment variable defaults, Git ignore patterns, and root Gradle project structure with two submodules (prism, prism-api).
Gradle Build System & Wrapper
buildSrc/build.gradle.kts, buildSrc/settings.gradle.kts, buildSrc/src/main/kotlin/prism.*.gradle.kts, gradle/libs.versions.toml, gradle/wrapper/gradle-wrapper.properties, gradlew, gradlew.bat
Gradle wrapper (v9.4.1) and buildSrc configuration with convention plugins (prism.library, prism.service), version catalog with pinned dependency coordinates, and wrapper shell/batch scripts.
Infrastructure & Deployment
docker-compose.yml, infra/prometheus.yml, Makefile
Docker Compose with PostgreSQL, Prometheus, and Grafana services; Prometheus scrape config; Makefile targets for build, test, Docker, and infrastructure management.
API Response Models
prism-api/src/main/java/com/stablebridge/prism/api/*.java
Ten public records: AccountResponse, ErrorResponse, HealthResponse, MemoResponse, Page<T>, StatsResponse, TransactionResponse, TransferResponse, and supporting build configuration; all annotated with Lombok builders.
Service Build & Dependencies
prism/build.gradle.kts
Service module configuration applying prism.service plugin with dependencies on Helidon, Avaje Inject, PostgreSQL/HikariCP, Jackson, MapStruct, Flyway, Resilience4j, Micrometer, logging stack, and test fixtures/integration test support.
Database Schema & Migrations
prism/src/main/resources/db/migration/*.sql
Three Flyway migrations: V1 creates five tables (transactions, failed_transactions, large_transfers, memos, accounts); V2 adds staging_transactions table; V3 creates performance indexes.
Test Infrastructure & Utilities
prism/src/testFixtures/java/com/stablebridge/prism/testutil/*, prism/src/testFixtures/java/com/stablebridge/prism/fixtures/package-info.java, prism/src/test/java/com/stablebridge/prism/ArchitectureTest.java
Test fixtures with PostgresExtension (JUnit 5, Testcontainers), TestDataSourceFactory, TestUtils (Mockito matchers for timestamp-agnostic comparison), and ArchUnit rules enforcing domain layer isolation.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related issues

  • Issue #6: Directly implements test infrastructure utilities (PostgresExtension, TestDataSourceFactory, TestUtils) and testFixtures package structure for integration testing support.
  • Issue #4: Directly implements ArchitectureTest with ArchUnit rules enforcing domain layer independence from infrastructure, application, and framework dependencies.
  • Issue #1: Directly implements multi-module Gradle build scaffolding (root settings, buildSrc convention plugins, libs.versions.toml, editor config, Makefile) and project structure.

Poem

🐰 Hop, hop—the warren's tools are set!
Build commands, databases, configs in net,
With Gradle's might and Docker's grace,
We've built a foundation, a solid place!
Tests shall run swift, schemas take shape,
This project now has proper escape! 🎉

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: establishing foundational project structure with specific tech stack (Gradle 9, Helidon 4 SE, test infrastructure), which aligns with the comprehensive scaffolding across multiple files.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/phase-0-scaffolding

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

phase:0-scaffolding Project scaffolding

Projects

None yet

1 participant