ddd-by-examples/factory
53.6
Weak · 22 September 2026
2.3k
lines of production code
Java
primary language
7
measurements over time
What this system is
This system is a supply chain planning application that predicts stock shortages and forecasts product demand. It provides capabilities for managing daily demand adjustments, generating delivery and production output schedules, and monitoring inventory levels to trigger alerts when shortages are detected. The architecture is a modular monolith built with Spring Boot and Gradle, utilizing PostgreSQL for persistence and Liquibase for schema management.
How it got here
2017 — Initial project scaffolding and domain modeling
4 changes.
This period established the foundational infrastructure, including CI/CD pipelines, containerization, and database configuration. Concurrently, the core domain logic for demand forecasting and delivery planning was implemented, supported by comprehensive test coverage and integration test resources.
2018 — shortage prediction and demand forecasting
10 changes.
This period focused on implementing core supply chain analytics, specifically introducing models and adapters for demand forecasting, production planning, and shortage prediction. The work established new database schemas, REST endpoints, and event-driven propagation for stock and demand data, supported by comprehensive integration and end-to-end tests.
Features
Add product description persistence and database schema
Introduces the ability to persist and query product descriptions. This includes a new JPA entity and Spring Data repository for product descriptions, backed by a new database schema (Liquibase YAML changelog) that creates the 'product\_management' schema and 'product\_description' table. A corresponding Spock test verifies the persistence layer works correctly.
product-management-adapters · high confidence
Added Gradle wrapper configuration
The project now includes a Gradle wrapper configuration file (gradle-wrapper.properties) that specifies the use of Gradle version 4.8. This allows users to build the project using the specified Gradle version without requiring a pre-existing Gradle installation.
gradle · high confidence
Added production planning projection tables and JPA entities
New JPA entities and Spring Data repositories were added for daily and general production outputs, exposing REST endpoints at /production-outputs and /production-outputs-daily. Corresponding Liquibase changelogs create the production\_planning schema and the production\_daily\_output and production\_output tables, enabling the system to track and query production output metrics.
production-planning-adapters · high confidence
Added project configuration and infrastructure files
Added configuration files for code coverage (.codecov.yml), CI (.travis.yml), and build tools (gradlew, gradlew.bat, lombok.config). Also added a docker-compose.yml for local development with PostgreSQL, a manifest.yml for Cloud Foundry deployment, and a CODE\_OF\_CONDUCT.md.
(repo-wide) · high confidence
Added shortage prediction monitoring and notification capabilities
Introduced new components for tracking and alerting on shortage predictions. This includes a \ShortagePredictionProcess\ repository and entity to persist shortage data, a \MonitoringConfiguration\ to wire the prediction service, and a \NotificationConfiguration\ that triggers alerts when shortages are detected. The database schema now includes a \shortages\_prediction\ schema with tables for shortage and stock forecast data, along with Liquibase changelogs to manage these changes.
adapter-commons, shortages-prediction-adapters/src/main · high confidence
Initial implementation of demand forecasting and delivery planning models
The demand-forecasting-model module introduces the core domain logic for managing product demand and delivery schedules. This includes the \ProductDemand\ aggregate which handles document processing, demand adjustments, and review workflows, supported by value objects like \DailyDemand\, \Adjustment\, and \ReviewDecision\. Additionally, the \DeliveryAutoPlanner\ and \DeliveriesSuggestion\ classes provide logic for generating delivery suggestions based on demand forecasts. The change also includes comprehensive test coverage via Groovy specifications and Gherkin scenarios for demand adjustments and production planning.
demand-forecasting-model · high confidence
Introduce shortage prediction and demand forecasting models
Added new domain models for factory demand forecasting and shortage prediction. The shared-kernel-model now includes classes for daily IDs, demand levels, and change events. The shortages-prediction-model introduces a complete calculation engine that forecasts stock levels, production outputs, and delivery schedules to identify potential shortages. This includes monitoring processes that detect when shortages appear or disappear, and a notification system that alerts planners and adjusts task priorities based on the severity and timing of the predicted shortages.
shared-kernel-model, shortages-prediction-model · high confidence
Introduce stock and shortage prediction capabilities
The application now includes a new 'shortages\_prediction' module containing components for stock forecasting and shortage prediction. This adds a REST endpoint at 'stock-forecasts' that exposes daily stock, demand, and output forecasts for each product. The system also introduces event-driven propagation for demand changes, delivery planning updates, and product lifecycle events, enabling the new prediction and monitoring features.
app-monolith/src/main/java · high confidence
Introduced demand forecasting and delivery planning adapters
Added new persistence and projection layers for demand forecasting and delivery planning. This includes JPA entities and Spring Data repositories for tracking current demand, managing demand adjustments and reviews, and storing delivery planner definitions and forecasts. The change introduces database schema migrations for the \demand\_forecasting\ and \delivery\_planning\ schemas, along with Spring components that handle command processing (adjustments, reviews, documents) and event projections (current demand, delivery forecasts).
demand-forecasting-adapters · high confidence
Behavioural changes
Configured PostgreSQL database connectivity and Liquibase schema management
The application now explicitly configures PostgreSQL as the primary database, with specific connection settings for local, Docker, and Cloud Foundry environments. Environment-specific property files (application-cloud.properties, application-docker.properties, and application.properties) define datasource URLs, credentials, and connection pool limits. Additionally, Liquibase is configured to manage database schema changes using a YAML-based changelog that includes multiple domain-specific migration files.
app-monolith/src/main/resources · medium confidence
Test coverage
Added end-to-end and smoke tests for the shortages prediction adapters; Added integration tests for demand forecasting and shortage detection; Added test resources for integration testing.
Dependencies
Migrate build system to Gradle with Spring Cloud Contract support
The project has switched its build system to Gradle, introducing a multi-module structure that includes an app-monolith, adapter modules, and model modules. This change adds Spring Cloud Contract support for API compatibility testing in the shortages-prediction-adapters module, enabling automated contract verification. The build configuration also integrates Spring Boot 2.0.2.RELEASE, Spring Cloud Finchley.BUILD-SNAPSHOT, and various testing libraries like Spock and H2.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 57 → 54 (-3.1)
- Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 100 → 100 (+0.0)
- Architecture 100 → 96 (-4.2)
- Maturity 73 → 73 (+0.0)
- Readiness 26 → 20 (-5.9)
- Security 94 → 94 (+0.0)
Resolved (5)
- Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
- Medium IaC: CKV_DOCKER_3 (app-monolith/Dockerfile)
- Medium IaC: CKV_DOCKER_6 (app-monolith/Dockerfile)
- No exposed public API
- dormant codebase — no living knowledge left to concentrate
New (8)
- Dependency hygiene PARTLY measured — Maven/Gradle declarations read, no dependency graph resolved
- Documentation: no installation or build instructions (README.md)
- Documentation: no usage examples (README.md)
- Medium IaC: WD-COMPOSE-0002 (docker-compose.yml)
- Medium IaC: WD-DOCKER-0003 (app-monolith/Dockerfile)
- No dependency advisory monitoring
- Rotate the exposed credentials — git history can't be un-committed
- Secret: generic-api-key (app-monolith/src/main/resources/application-openshift.properties)
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
ddd-by-examples/factory was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 22 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 95c751ccefb879e02ecc959c712caa31f4cd9bcf — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-90d5d2fe38ee.