A microservices-based educational platform demonstrating DDD and modern software architecture
| Microservice | Quality Gate | Coverage | Bugs | Code Smells |
|---|---|---|---|---|
| Discount Management | ||||
| Open Trainings | ||||
| Payment Gateway | ||||
| Personal Data | ||||
| Reviews | ||||
| Trainings Catalogue | ||||
| Training Offer | ||||
| Training Programs |
This repository demonstrates how to build and maintain a modern microservices architecture following best practices and industry-standard patterns:
- Microservices Architecture - Decomposing a complex domain into manageable, independently deployable services
- Event Storming - Collaborative domain exploration technique to identify bounded contexts
- Port and Adapters Architecture (Hexagonal) - Separation of business logic from external concerns
- Domain-Driven Design - Designing software to reflect the business domain and ubiquitous language
This documentation provides insights into the tools, techniques, and decisions made throughout the project:
- Getting Started - Setup and installation instructions
- Technology Stack - Core technologies used in the project
- Project Artifacts - Event storming outputs and architecture decisions
- Business Overview - Domain understanding and requirements
- Educational Resources
- Articles - Blog posts explaining project evolution
- Books Worth Reading
- External Resources
- Contributing - Guidelines for contributors
- Java 21
- Docker and Docker Compose
- Maven
-
Clone the repository:
git clone https://github.com/your-username/training-center.git cd training-center -
Build the project:
./mvnw clean install
-
Start the infrastructure services:
docker-compose up -d
-
Start each microservice:
./mvnw spring-boot:run -pl open-trainings ./mvnw spring-boot:run -pl payment-gateway ./mvnw spring-boot:run -pl personal-data-management ./mvnw spring-boot:run -pl discount-management ./mvnw spring-boot:run -pl training-offer ./mvnw spring-boot:run -pl training-programs ./mvnw spring-boot:run -pl reviews ./mvnw spring-boot:run -pl trainings-catalogue
- Java 21 - Core programming language
- Spring Boot - Application framework
- Spring Data JPA - Data access
- Kafka - Event streaming
- Docker - Containerization
- annotations - Java annotations for marking architectural patterns like CQRS and Ports and Adapters, as well as domain-driven design concepts
- annotations-test - Annotations for categorizing and organizing tests, particularly in a JUnit and Spring Boot context
- schema-registry - Classes for managing metadata and schemas in an event-driven architecture
- discount-management - Responsible for managing discount codes for training offers
- open-trainings - Responsible for managing open training sessions, including registration, booking, and order processing
- payment-gateway - Responsible for processing payments for training purchases
- personal-data-management - Responsible for managing personal data of users, trainers, and participants
- training-offer - Responsible for managing training offers, including pricing and availability
- training-programs - Responsible for managing training programs
- reviews - Responsible for reviewing training programs
- trainings-catalogue - Responsible for viewing training programs and training offers
All event storming sessions are documented in our Miro Board, which includes:
- Big Picture Event Storming - Holistic view of the domain
- Bounded Contexts - Service boundary identification
- Core/Supporting/Generic Domains - Domain categorization
- Process Level Event Storming - Detailed workflow mapping
We document significant architectural decisions in our Architecture Decision Records (ADRs) to provide context for future development.
The Training Center is an institution that provides structured training and education in various professional fields, connecting qualified trainers with individuals and organizations seeking to develop their skills.
Management of training programs that are ready for delivery or in preparation:
- Discoverability: Allow potential participants to browse available trainings
- Administration: Support for creating and modifying training content
- Supervision: Each training program has designated supervisors
Activities designed to attract potential attendees:
- Webinars: Free introductory sessions on relevant topics
- Conference Presentations: Professional talks at industry events
- Internal Events: Knowledge-sharing sessions within organizations
System for managing relationships with training professionals:
- Expertise Tracking: Record of which trainings each trainer can conduct
- Skills Database: Comprehensive skills inventory for each trainer
- Financial Management: Tracking of trainer rates and payments
- Performance History: Record of past trainings with participant feedback
- Contractual Management: Handling trainer agreements and terms
Public training sessions open to individual registration:
- Scheduling: Management of training dates and times
- Payment Processing: Handling of participant payments
- Cancellation Handling: Process for participant resignations
- Trainer Agreements: Management of contracts with training providers
- Capacity Planning: Enforcement of minimum/maximum group sizes
- Cancellation Policies: Rules for training cancellations
Custom training programs for corporate clients:
- Customization: Ability to adjust training content to company needs
- Client Communication: Interface for discussions with company representatives
- Confidentiality: Management of Non-Disclosure Agreements
The following resources explain the evolution of this project and the reasoning behind key decisions:
| Category | Pattern/Concept | Miro Board | Code Example |
|---|---|---|---|
| π― Event Storming | Big Picture | View | - |
| Process Level | View | - | |
| Design Level | View | - | |
| ποΈ DDD Strategic | Domain Types | View | - |
| Bounded Contexts | View | - | |
| ποΈ DDD Tactical | Aggregate | View | Offer Aggregate |
| Entity | - | Participants | |
| Value Object | - | OfferNumber | |
| Repository | - | OfferRepository | |
| Factory | - | OfferFactory | |
| Domain Event | - | Offer Events | |
| Domain Service | - | TrainingOfferDomainService | |
| Policy | - | ReviewerAssignmentPolicy | |
| Specification | - | TrainingProgramProposalReviewSpecification | |
| Saga (Choreography) | - | Training Program Events | |
| Saga (Orchestration) | View | OfferAcceptanceSaga | |
| ποΈ Architecture | Architecture Decision Record | - | ADR Records |
| Architecture Tests | - | ArchUnit | |
| Event-Driven | - | Training Program Events | |
| Ports & Adapters | - | Open Trainings Module | |
| Outbox Pattern | - | JpaOutboxMessageRepository | |
| Event Sourcing | - | OfferAcceptanceSaga | |
| CQRS (Within Service) | - | Application vs Query | |
| CQRS (Between Services) | - | Commands: training-programs, training-offer / Query: trainings-catalogue | |
| π§ͺ Testing | Unit Tests | - | OfferApplicationServiceTest |
| Integration Tests | - | JpaOfferRepositoryIntegrationTest | |
| System Tests | - | OfferRestControllerSystemTest | |
| π CI/CD | CI Pipeline | - | GitHub Actions |
| Code Quality | - | SonarCloud Analysis |
A chronological series of blog posts documenting the project journey:
- Introduction
- Event Storming Introduction
- Big Picture Event Storming
- Navigating the Storm: A Guide to Big Picture Event Storming
- Taming the Storm: How Chaotic Exploration Shapes Big Picture Event Storming
- Event Storming Big Picture β How to enforce the Timeline?
- So⦠Which Event Goes First?
- Big Challenges of Event Storming Big Picture
- After the Big Picture: Turning Insights into Action
- Software Architecture Introduction
- Domain-Driven Design Introduction
- Discovering Language Boundaries
- Ubiquitous Language - Boundaries, Words, and the Hidden Cost of Ignoring Them
- Speaking Many Languages in One System
- Ubiquitous Language in Action: Boundaries Made of Words
- Core, Supporting, Generic β How to Stop Treating All Domains the Same
- So⦠Which Part of Your System Is Actually Worth Building?
- Architecture Decision Record
- What ADR is?
- Monolith or Microservices?
- Defining initial Bounded Contexts
- Problem and Solution Space
- What Bounded Context is?
- Defining Bounded Contexts
- Process Level Event Storming
- What is the goal of it?
- Process Level Example: Releasing Training Program
- Process Level Example: Purchase Open and Dedicated Training
- Updating Bounded Contexts
- Defining Context Mapping
- What context maps are?
- Team collaboration and context maps
- Architecture and context maps
- Made decision and ADRs
- Design Level Event Storming
- Why we need it?
- Open Training Purchase
- Architecture of the Code
- Short story about the architecture types.
- How to pick the right architecture for your context?
- Open Training Purchase and Decision
- Command Query Responsibility Segregation
- CQRS for dummies
- Data Model vs. Domain Model
- Anemic Domain Model - where to use it?
- Trainings Catalogue and Decision
- Design Level - how to convert sticky notes into code?
- Port and Adapters in details
- Port and Adapters - various implementation
- Application layer - what is that
- ...
- Domain-Driven Design
- Domain-Driven Design Distilled by Vaughn Vernon
- Implementing Domain-Driven Design by Vaughn Vernon
- Learning Domain-Driven Design by Vlad Khononov
- Event Storming
- Introducing EventStorming by Alberto Brandolini
- Microservices
- Building Microservices by Sam Newman
- Microservices Patterns by Chris Richardson
- Monolith to Microservices by Sam Newman
- Production-Ready Microservices by Susan J. Fowler
- Strategic Monoliths and Microservices: Driving Innovation Using Purposeful Architecture by Vaughn Vernon, Tomasz Jaskula
- Software Architecture
- Architecture for Flow: Adaptive Systems with Domain-Driven Design, Wardley Mapping, and Team Topologies by Susanne Kaiser
- Balancing Coupling in Software Design by Vlad Khononov
- Building Evolutionary Architectures by Neal Ford, Rebecca Parsons, Patrick Kua, Pramod Sadalage
- Clean Architecture by Robert C. Martin
- Designing Data-Intensive Applications by Martin Kleppmann
- Event Processing. Designing IT Systems for Agile Companies by K. Chandy, W. Roy Schulte
- Software Architecture: The Hard Parts by Neal Ford, Mark Richards, Pramod Sadalage, Zhamak Dehghani
- The Software Architect Elevator by Gregor Hohpe
- Software Development
- Growing Object-Oriented Software, Guided by Tests by Steve Freeman, Nat Pryce
- Release It! by Michael T. Nygard
- The Phoenix Project by Gene Kim, Kevin Behr, George Spafford
- Testing
- Developer Testing: Building Quality into Software by Alexander Tarlinder
- Architecture Decision Record
- Architecture decision record (ADR) by Joel Parker Henderson
- Event Storming
- Awesome EventStorming by Mariusz Gil
- Introducing Event Storming by Alberto Brandolini
- Testing
Contributions are welcome! Here's how you can help improve this project:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow the existing code style and architectural patterns
- Write tests for new features
- Update documentation as needed
- Adhere to DDD principles when implementing domain logic
This project is licensed under the MIT License - see the LICENSE file for details.