How kievmaia/springwolf-async-api-exemple works
Project type and purpose
• This is a Spring Boot backend application whose sole purpose is to demonstrate the automatic generation of AsyncAPI documentation (via Springwolf) for event-driven APIs built on AWS SNS/SQS.
• It also includes a simple publisher (SnsPublisherService) and a listener (SqsListenerService) to show how events flow, all wired to AWS emulated by LocalStack in Docker Compose.
High-level components (based on the file tree & README)
• Docker Compose / LocalStack: emulates AWS services locally (SNS, SQS).
• Spring Boot Application
• Configuration modules: AWS configs (SnsConfig, SqsConfig), Jackson (ObjectMapperConfig)
• DTOs & Enums: message payload definitions (ExamplePayloadDto, AnotherPayloadDto, ExampleEnum)
• Messaging services: SnsPublisherService (publishes messages to a topic), SqsListenerService (listens on a queue)
• Springwolf AsyncAPI generator: introspects publisher/listener annotations and generates UI & JSON docs.
• End-users/developers: consume the generated AsyncAPI UI or JSON endpoint.
Relationships and data-flow
• On application start, Docker Compose spins up LocalStack with SNS and SQS.
• Spring Boot app connects (via SnsConfig/SqsConfig) to LocalStack endpoints.
• SnsPublisherService → sends event → LocalStack SNS Topic → routed to LocalStack SQS Queue → SqsListenerService within the app
• Springwolf inspects these flows and exposes:
• HTTP GET /springwolf/docs → AsyncAPI JSON
• HTTP GET /springwolf/asyncapi-ui.html → interactive UI
Architectural patterns & design principles
• Event-driven, asynchronous microservice
• Clear separation of concerns:
• configuration (in /configuration)
• domain/messages (in /dtos and /enums)
• integration/messaging (in /messaging)
• documentation generation (Springwolf)
• Use of dependency injection for configuration and services (Spring Boot)
• Emulation of external dependencies via Docker Compose (LocalStack)
Detailed capture of architecture
• Don’t overthink: break the project into these core components and show how they interact.