Prerequisites
Before you start, make sure you have the following tools installed:| Tool | Minimum version | Notes |
|---|---|---|
| Java (JDK) | 17 | Required by pn-parent 2.1.2-SPRINGBOOT3 |
| Maven | 3.8+ | Used for build and code generation |
| Docker | 20.10+ | Required to run LocalStack |
| AWS CLI | 2.x | Used to bootstrap LocalStack resources |
| LocalStack | 2.x | Emulates DynamoDB, SQS, and KMS locally |
Start LocalStack and obtain the KMS key ARN
Start LocalStack with the services that Paper Channel depends on:Create a KMS key for address encryption:Save the printed ARN — you will need it in the next step. It looks like:
The README explicitly calls out this step: for local testing with LocalStack you must retrieve the KMS key ARN from the LocalStack logs (or from the
create-key output) and set it as aws.kms.keyId in your configuration.Create the required SQS queues and DynamoDB tables
Create the SQS queues that the service listens on:
Configure the application
Create a local properties override file at the project root. Replace
<KMS_KEY_ARN> with the value from step 2:Build and run
Generate OpenAPI stubs and compile the project:Run the application with the local profile:The service starts on port 8080 by default. Verify it is healthy:You should receive HTTP 200.
Send a test prepare request
Submit a paper-delivery prepare request. The A
requestId path parameter must be between 5 and 100 characters.204 No Content response means the request was accepted for asynchronous processing. A 200 OK with a PrepareEvent body means the address was confirmed immediately and the cost is available.Poll the prepare result at any time:Introduction
Learn what Paper Channel does and which services it integrates with.
Architecture
Explore the REST controllers, DynamoDB tables, and queue topology in depth.