The Java counterpart to Foundgine.SupplyChain.
It demonstrates the same application-controlled boundary using the Java packages published under
io.github.cristianbarragan (foundgine-core, foundgine-runtime, foundgine-providers) instead of
the .NET NuGet packages:
Caller → application → semantic model (via @FoundgineEntity + AOT annotation processing) → authorization → Foundgine planning/execution → storage
SupplyChainDomain) expressed as Java records and
annotated with @FoundgineEntity so the foundgine-aot-generator annotation processor can emit
compiled metadata at build time — no runtime reflection, mirroring the C# Roslyn source generator.Authorization) with tenant-scoped, role-based checks
(CUSTOMER, ANALYST, WAREHOUSE_OPERATOR, SUPPLY_CHAIN_MANAGER).Scenarios): recursive bill-of-materials traversal with cycle detection, and a
tenant-isolation check for warehouse reads.This module is the Java domain and authorization port: the semantic model, authorization
context, and adversarial scenario helpers are in place, and Main wires them up as a smoke test.
Provider/database wiring — the equivalent of the C# starter’s MCP + PostgreSQL stack
(SemanticSqlQueryExecutor, Program.cs) — has not been added to this module yet; it is being
built out incrementally as the Java provider contracts stabilize.
If you want to see the complete MCP → semantic model → authorization → planning/execution →
PostgreSQL path already wired up in Java today, use
../foundgine-supply-chain-advanced — its
AdvancedMcpServer, AdvancedMutationPipeline, and PostgresSupplyChainStore are the Java
equivalent of what the C# starter’s Program.cs and SemanticSqlQueryExecutor do.
../foundgine-supply-chain-advanced — the full
semantic/authorization/MCP/PostgreSQL proving ground, with its own
step-by-step tutorial.cd src/java
mvn -pl samples/foundgine-supply-chain -am compile exec:java \
-Dexec.mainClass=com.foundgine.samples.supplychain.Main
This compiles the module (running the foundgine-aot-generator annotation processor over
SupplyChainDomain) and runs Main, which prints the configured FoundgineOptions as a smoke
test that the Java foundgine-core / foundgine-runtime packages resolve correctly from this
module.