Prerequisites
Before you start, make sure you have the following installed:- Java 17+ — the service targets Java 17
- Maven 3.8+ — or use the included
./mvnwwrapper - Docker — required to run LocalStack
- AWS CLI — used to inspect LocalStack resources and retrieve the KMS key ARN
Local services used
pn-paper-channel depends on the following AWS services, all emulated by LocalStack:| Service | Purpose |
|---|---|
| DynamoDB | All application tables (requests, addresses, tenders, costs, etc.) |
| SQS | Internal and external queues |
| KMS | Symmetric AES-256-GCM key for address encryption |
| EventBridge | Publishing PaperChannelOutcomeEvent to the core event bus |
Running locally
Start LocalStack via Docker
Start LocalStack with the services the application needs:Wait until LocalStack is healthy:
Retrieve the KMS key ARN from LocalStack logs
When LocalStack starts, it creates a default KMS key. Retrieve the ARN from the container logs:Alternatively, create a key explicitly and capture the ARN:Copy the returned ARN — you need it in the next step.
Set the KMS key ARN in the local config
Open The rest of the config file already points to LocalStack at
config/application.properties and set the aws.kms.keyId property to the ARN you copied:http://localhost:4566 and defines all DynamoDB table names and SQS queue names for local use.Run the application with Maven
Use the Spring Boot Maven plugin with the The service starts on port 8088 (set by
local profile (which loads config/application.properties):server.port=8088 in config/application.properties).You can verify it is running:pn-paper-channel uses Testcontainers for integration tests. Docker must be running when you execute
./mvnw test so that Testcontainers can spin up any required containers automatically.Local environment variables quick reference
The fileconfig/application.properties contains all defaults for local development. Key values:
*-basepath properties accordingly.