Skip to content

o-s-expert/ddd-workshop-labs

Repository files navigation

DDD in Action: Strategies and Tactics for Java Solutions

This repository contains the labs used in the DDD in Action Workshop. Each lab demonstrates how to apply strategic and tactical DDD patterns in Java, with persistence support using MongoDB or Oracle NoSQL.

Check website for more details: Click Here

Requirements

  • Java 21 or higher

  • Git

  • Maven

  • An IDE of your choice (IntelliJ IDEA, Eclipse, VS Code, etc.)

  • Docker

  • Docker Compose (optional, for starting databases)

  • Postman (optional, for testing REST endpoints)

Project Structure

All labs are organized inside a single Maven project, and each one builds upon the previous step. Follow them to get the best learning experience.

Database Setup

The labs require either MongoDB or Oracle NoSQL. You can choose one of them depending on which database you want to explore.

Option 1: Run with Docker Compose

A docker-compose.yml file is included at the root of the project to start both databases:

docker-compose up -d

This will start: * MongoDB on port 27017 * Oracle NoSQL on port 8080

To change the ports, edit the docker-compose.yml file.

Option 2: Run Containers Individually

You can also start only one database using docker run:

Start MongoDB:

docker run -d --name mongodb-instance -p 27017:27017 mongo

Start Oracle NoSQL:

docker run -d --name oracle-instance -p 8080:8080 ghcr.io/oracle/nosql:latest-ce

Running the Labs

Build the project:

mvn clean install

Run a specific lab (replace labX with the module name):

mvn exec:java -pl labX

How to Use

  1. Start either MongoDB or Oracle NoSQL (or both using Docker Compose).

  2. Open the project in your IDE.

  3. Build with Maven.

  4. Navigate to the desired lab module.

  5. Run it following the provided examples.

Notes

  • Ensure Docker is running before starting.

  • If using Docker Compose, data will persist in Docker volumes.

  • To reset everything, run:

docker-compose down -v

Postman Collection

To simplify testing the REST endpoints, a Postman collection is included: DDD_Workshop.postman_collection.json.

Importing into Postman

  1. Open Postman.

  2. Click on Import (top-left corner).

  3. Select the file DDD_Workshop.postman_collection.json from the project root.

  4. The collection will appear in your workspace under Collections.

You can now run the predefined requests for each lab directly from Postman.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors