This repository contains a DIO Spring Boot learning track organized as incremental modules.
The track starts with architecture foundations and progressively moves through web APIs, data access, security, service integration, and AI-enabled workflows.
00-domain-driven-design
DDD foundations with a catalog domain and no web layer.01-spring-web
REST API design with Spring Web and API documentation with Spring REST Docs.02-spring-data
Data access in a multi-context application using MySQL, MongoDB, Redis, and PostgreSQL.03-spring-security
Authentication and authorization with Spring Security in a proposal management API.04-spring-cloud-openfeign
External service integration (KYC/AML) using Spring Cloud OpenFeign and resilience patterns.05-spring-ai
Final project using Spring AI for speech-to-text, tool calling, and text-to-speech.
00-domain-driven-design01-spring-web02-spring-data03-spring-security04-spring-cloud-openfeign05-spring-ai
The sections below consolidate architecture topics that are intentionally reused across modules.
Most modules follow the same conceptual split:
domain/ -> business model, invariants, contracts
application/ -> use cases, orchestration, application policies
infrastructure/ -> adapters (HTTP, persistence, external clients, framework glue)
Why this matters:
domainstays focused on business language and rules, not framework details.applicationcoordinates domain behavior for specific user/business actions.infrastructurecan change (database, web transport, external APIs) without forcing core business rewrites.
This separation reduces coupling and supports long-term maintainability.
A practical guideline used across the track:
- Use
classfor entities/aggregates that have identity and may evolve behavior over time. - Use
recordfor immutable value objects and DTO-style transport models.
Design trade-offs:
classsupports richer lifecycle behavior and controlled mutation.recordreduces boilerplate and makes immutability explicit.
This distinction improves code intent and keeps domain concepts clearer.
Instead of passing raw primitives (UUID, String) everywhere, modules wrap identifiers in explicit types such as BookId, TaskId, ProposalId, and TransactionId.
Benefits:
- Better compile-time safety (fewer accidental ID mix-ups).
- More expressive signatures (
findById(TaskId id)communicates intent). - Cleaner evolution path for ID rules and validation.
The repository contract belongs to the business side, while technology-specific implementations stay in infrastructure.
Pattern used in this repository:
- Domain contract:
XxxRepositoryindomain/. - Adapter implementation: JPA/in-memory/etc. in
infrastructure/.
Architectural impact:
- Business logic depends on abstractions, not persistence frameworks.
- Switching storage technology becomes an adapter change, not a domain rewrite.
- Unit testing use cases becomes simpler with fake/mock repositories.
Each use case models one business capability (for example, create task, list proposals, analyze company risk).
Common flow:
- Controller/listener receives an external request.
- It calls one application use case.
- The use case orchestrates domain objects and repository/gateway contracts.
- Infrastructure adapters handle persistence or external integrations.
Why this is important:
- Strong single-responsibility boundaries.
- Easier testability and refactoring.
- Better readability of business workflows.
Several modules include compose.yml and Spring Boot Docker Compose support.
Typical local development role:
- Start required infra services (database/cache/message dependencies).
- Keep local setup reproducible for all students.
- Reduce onboarding friction by standardizing environment dependencies.
Note: exact behavior can vary by module configuration and runtime profile.
Choose a module and run its local instructions:
cd 01-spring-web
./gradlew testFor module-specific details, always check each module README from the links above.