Apply strategic and tactical DDD without equating every bounded context with a microservice: model subdomains, define context boundaries, enforce aggregate invariants with JPA, and publish durable integration events through an outbox.
Decide when PostgreSQL sharding is justified, choose a stable shard key, route Spring Boot transactions safely, preserve uniqueness and idempotency, plan cross-shard queries, and migrate data without losing writes.