Thanks for contributing. This guide defines the project workflow and contribution standards.
- Development Environment Setup
- Local Run Modes
- Post-start Smoke Checks
- Project Structure
- Coding Standards
- Branch Naming
- Commit Messages
- Pull Request Process
- Testing
- Docker Compose Quick Commands
- Troubleshooting Quick Checks
- Code Review Checklist
| Tool | Version |
|---|---|
| Java (JDK) | 25+ |
| Maven | 3.9+ |
| Node.js | 20+ |
| Docker Desktop | recent stable |
| Git | 2.40+ |
- Clone repo and enter directory.
- Start local infrastructure from
deploy/. - Build backend modules.
- Compile and test blockchain module.
PowerShell example:
Set-Location <repo-root>
Set-Location deploy
Copy-Item .env.example .env -ErrorAction SilentlyContinue
docker compose up -d
Set-Location ..\backend
mvn clean compile -DskipTests
Set-Location ..\blockchain
npm install
npm run compile
npm testImportant: always launch services from the
backend/reactor root using-pl <module> -amso Maven can resolve the siblingcommon/*modules. Runningmvn spring-boot:runfrom inside a service directory will fail on a clean checkout becauseevent-model/shared-contractsare not yet installed.
Set-Location <repo-root>\deploy
docker compose up -d
# Install shared modules once (from backend/)
Set-Location ..\backend
mvn clean install -pl common/event-model,common/shared-contracts -DskipTests
# Command Service (port 8081) — from backend/
mvn spring-boot:run -pl command-service -amRun other services in separate terminals (all from backend/):
Set-Location <repo-root>\backend
mvn spring-boot:run -pl event-store-service -amSet-Location <repo-root>\backend
mvn spring-boot:run -pl audit-writer-service -amSet-Location <repo-root>\backend
mvn spring-boot:run -pl query-service -amSet-Location <repo-root>\backend
mvn clean verify
Set-Location ..\blockchain
npm testInvoke-WebRequest http://localhost:8081/actuator/health
Invoke-WebRequest http://localhost:8082/actuator/health
Invoke-WebRequest http://localhost:8083/actuator/health
Invoke-WebRequest http://localhost:8084/actuator/healthInfra checks:
docker exec dal-kafka kafka-topics --bootstrap-server localhost:9092 --listInvoke-WebRequest http://localhost:8545 -Method Post -ContentType "application/json" -Body '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'Source: docs/diagrams/project-structure.puml
- Java 25.
- Spring Boot 4.
- WebFlux-first for backend HTTP APIs.
- Keep controllers thin; business logic in services.
- Keep request path reactive end-to-end (
Mono/Flux). - Avoid
.block()in production code. .block()is acceptable in tests for setup/assertions.- Do not call
subscribe()in business request flow.
- Shared DTOs/events must live in
backend/common/*. - Postgres schema is
audit(explicit in SQL and mappings). - For blockchain write path changes, update
blockchain/test/AuditLedger.test.jsin the same change.
Mandatory convention for all issue branches:
<type>/#XX-description
Allowed type values:
feature | fix | docs | test
Examples:
feature/#5-command-service-skeleton
fix/#7-retry-logic
docs/#12-architecture-update
test/#8-query-filters
Project convention:
[#XX] short message
Examples:
[#4] Setup backend multi-module pom
[#6] Add reactive Kafka consumer skeleton
[#12] Update deployment docs
- Branch from
main. - Implement code and tests.
- Run local validation.
- Open PR with linked issue.
- Address review comments.
PR description should include:
## Description
<what changed>
## Closes
Closes #XX
## Related
Relates to #YYBackend:
Set-Location <repo-root>\backend
mvn test
mvn verifyBlockchain:
Set-Location <repo-root>\blockchain
npm testRun a specific backend module:
Set-Location <repo-root>\backend
mvn -pl command-service testSet-Location <repo-root>\deploy
docker compose up -d
docker compose ps
docker compose logs -f
docker compose down
docker compose down -vdocker compose -f <repo-root>\deploy\docker-compose.yml ps
docker compose -f <repo-root>\deploy\docker-compose.yml logs kafkadocker compose -f <repo-root>\deploy\docker-compose.yml logs postgresVerify table exists in audit schema (audit.events).
docker compose -f <repo-root>\deploy\docker-compose.yml logs ganache- Issue scope is clear and linked in PR (
Closes #XX). - Reactive flow preserved in backend request path.
- Shared contracts/events updated in
backend/common/*if needed. - Tests added or updated for behavior changes.
-
mvn verify(backend) andnpm test(blockchain) pass locally. - Docs updated when architecture/workflow changed.
