Foundgine

Foundgine Supply Chain (Java) — Starter Sample

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

What it demonstrates

Current state

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.

Where to go next

Run

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.