An EPCIS 2.0 Repository in 45 Seconds: OpenEPCIS Community Edition 0.9.4

An EPCIS 2.0 Repository in 45 Seconds
The fastest way to understand EPCIS is to capture an event and query it back. Reading the standard helps, a sequence diagram helps, and both make far more sense once a real repository has answered 202 Accepted on your own machine. So the first goal of the Community Edition is that this takes less time than making coffee.
curl -fsSLO https://raw.githubusercontent.com/openepcis/epcis-repository-ce/main/docker/docker-compose.yml
docker compose up -d --wait
When the second command returns, the repository is ready to capture. On a laptop with the OpenSearch and Kafka images already pulled, that took 45 seconds from the first curl, including 19 seconds to pull the Community Edition image itself. The first ObjectEvent was captured, validated, stored and back from a query four seconds later:
curl -fsSLO https://raw.githubusercontent.com/openepcis/epcis-repository-ce/main/examples/getting-started/object-event.json
curl -i -H 'Content-Type: application/json' --data @object-event.json http://localhost:8080/capture
curl http://localhost:8080/events
There is no account to create, no realm to import and no token to copy, because the Community Edition has no login at all. More on that below, since it is the most important thing to know about it.
What runs on your machine
The compose file starts three things: OpenSearch as the event store, Kafka as the capture pipeline, and the OpenEPCIS service. It also creates the Kafka topics the pipeline needs and binds every port to the loopback interface. Nothing else is downloaded, and nothing is configured by hand.
What you get is the EPCIS 2.0 repository of OpenEPCIS:
- Capture at
/capture, with schema validation, event hashing and deduplication. A document with a broken event fails as a job with a readable error, and the pipeline carries on with the next one. - Queries at
/events, named queries at/queries, pagination that survives a reconnect. - Subscriptions that fire the moment an event is indexed, over WebSocket or webhook, and scheduled ones.
- JSON-LD and XML, EPCIS 2.0 and 1.2. Ask for
application/xmlwithGS1-EPCIS-Version: 1.2.0and the same events come back as an EPCIS 1.2 query document, converted by XSLT. - The OpenEPCIS DPP extensions of ref.openepcis.org, with their schemas and JSON-LD contexts inside the image. Events using them are captured without registering anything and without network access.
- OpenAPI at
/q/swagger-ui, health at/q/health.
Every endpoint of the EPCIS 2.0 REST bindings can be tried from the browser in the Swagger UI:
The full walkthrough, including subscriptions and your own extension schemas, is on the documentation page Run the Community Edition.
Every caller is admin
The Community Edition has no authentication. Every request gets the roles capture, query and admin and sees all data. OpenSearch runs without its security plugin, Kafka in plaintext, and a subscription can call any URL you give it.
We made this choice on purpose. Authentication that is half there invites people to trust it, and a repository that holds a company's supply chain events needs a lot more than a password: tenants that cannot see each other, rules on which fields a partner may read, checks on who may commission which serial number. That is the work of the Business edition, and it is where we put our security effort. The Community Edition is for trying out, for development and for research, and it says so in the README, in the compose file and in this post. Run it on your own machine or in a closed network, never on the internet. As a small safety net, the compose file publishes nothing beyond 127.0.0.1, and browsers may only call the API from localhost pages.
Open from source to image
The repository epcis-repository-ce assembles the service from two modules on Maven Central, quarkus-rest-application and quarkus-capture-topology, and nothing else. Their sources are public on GitHub under Apache-2.0 in openepcis-core and openepcis-rest-quarkus. A Maven enforcer in the build refuses any Business edition artifact, so every build checks the line between the two editions. What you run is what you can read, build and change yourself.
Built to keep capturing
Release 0.9.4 also makes the repository sturdier where it matters most in daily use, for both editions:
- Every query answer is a valid EPCIS 2.0 document. Results of
/eventscarry thequeryNamethe standard requires,SimpleEventQueryfor unnamed queries, so strict clients accept them. - A bad document fails alone. EPCs are checked during validation. A document with an invalid one fails as a capture job with a clear error, and the pipeline carries on with the next document.
- Validation works offline. The EPCIS JSON Schema and the JSON-LD contexts are part of the image, so capture needs no network access and does not depend on any remote server.
- One conversion path. XSLT does all format conversion in the Community Edition, including EPCIS 2.0 to 1.2.
The libraries, for your own build
The repository is one way to use OpenEPCIS. All twelve modules of release 0.9.4 are on Maven Central under Apache-2.0, among them the document converter between XML and JSON-LD, the event hash generator, the EPC and Digital Link translator and the EPCIS models. Import the bom and pick what you need:
<dependency>
<groupId>io.openepcis</groupId>
<artifactId>openepcis-bom</artifactId>
<version>0.9.4</version>
<type>pom</type>
<scope>import</scope>
</dependency>
The feature matrix shows what lives in the libraries, what the Community Edition adds and what is reserved for the Business edition.
Try it, break it, tell us
The Community Edition is meant to be taken apart. Capture your own events, point a subscription at a local webhook, compare the 1.2 and 2.0 output, read the code behind it. When something does not behave the way the standard says it should, open an issue on GitHub.
When you are ready to run EPCIS for real partners and real data, talk to us about the Business edition. It runs on the same artifacts, so nothing you learned on your laptop is wasted.