A modern TypeScript SDK for EPCIS, GS1 identifiers, and traceability applications.
Axis is a framework for building traceability software.
Axis helps developers build serialization, inventory management, supply chain visibility, product intelligence, and recall management software without starting from raw EPCIS XML.
Instead of forcing developers to work directly with XML nodes, Axis provides strongly typed TypeScript objects for EPCIS documents, events, identifiers, inventory, genealogy, and application development.
npm install @buildonaxis/coreMost EPCIS tooling focuses on XML generation and parsing.
Axis focuses on the application layer.
Developers should be able to work with:
const shipment = new Shipment(...);
const item = SerializedItem.fromBarcode(...);
const graph = document.buildTraceGraph();instead of:
<ObjectEvent>
...
</ObjectEvent>Axis transforms EPCIS data into a developer-friendly domain model that can be queried, validated, visualized, and extended.
Create and manipulate EPCIS events using TypeScript objects.
Supported event types:
- Object Events
- Aggregation Events
- Transformation Events
- Transaction Events
- Association Events
Work with:
- GTIN
- GLN
- SSCC
- Serialized Items
- Lot-Tracked Items
Parse identifiers directly from GS1 barcode strings.
const item = SerializedItem.fromBarcode(
"01000312345678901726123121ABC123"
);Generate EPCIS documents programmatically.
const document = new EpcisDocument({
body: new EpcisBody({
events: [...]
})
});Export as:
document.toJSON();
XmlWriter.write(document);Convert XML into application-ready objects.
const document = XmlParser.parse(xml);Then immediately query:
document.stats();
document.allEpcs();
document.eventsByBizStep("shipping");Build product genealogy and relationship graphs from EPCIS data.
const graph = document.buildTraceGraph();Generate:
graph.toJSON();
graph.toMermaid();Produces:
graph TD
P["Pallet 123"]
CA["Case A"]
CB["Case B"]
BA["Bottle A"]
BB["Bottle B"]
BC["Bottle C"]
BD["Bottle D"]
P --> CA
P --> CB
CA --> BA
CA --> BB
CB --> BC
CB --> BD
Reconstruct serialized inventory directly from EPCIS Aggregation Events.
const inventory = InventorySnapshot.from(document);
console.log(inventory.stats());
console.log(inventory.roots());
console.log(inventory.container(pallet));
console.log(inventory.find(item));
console.log(inventory.toHierarchy());Built-in capabilities include:
- Inventory reconstruction
- Parent / child relationships
- Recursive container traversal
- Root container discovery
- Inventory statistics
- Container views
- Inventory hierarchy
- Relationship exports
- Tabular inventory views
A comprehensive validation framework is planned for an upcoming release.
Future capabilities include:
- EPCIS document validation
- GS1 compliance rules
- Custom validation profiles
- Regulatory validation packs
import {
SerializedItem
} from "@buildonaxis/core";
const item = SerializedItem.fromBarcode(
"01000312345678901726123121ABC123"
);
console.log(item.toJSON());Output:
{
gtin: "00031234567890",
serial: "ABC123",
expiration: "2026-12-31"
}const document = new EpcisDocument({
body: new EpcisBody({
events: [...]
})
});
const xml = XmlWriter.write(document);const document = XmlParser.parse(xml);
console.log(document.stats());
console.log(document.allEpcs());const graph = document.buildTraceGraph();
console.log(graph.toMermaid());Axis includes several runnable examples.
| Example | Description |
|---|---|
| Barcode Parsing | Parse GS1 barcodes and identifiers |
| Generate EPCIS | Generate EPCIS JSON and XML |
| Inventory Reconstruction | Build serialized inventory from Aggregation Events |
| Parse EPCIS | Convert EPCIS XML into domain objects |
| Product Genealogy | Build product relationship graphs |
| Recall Analysis | Perform genealogy and impact analysis |
Axis is designed as a foundation for traceability applications.
Examples include:
- Product commissioning
- Packaging workflows
- Aggregation management
- Serialized inventory
- Lot-tracked inventory
- Warehouse operations
- Product genealogy
- Product history
- Product movement analysis
- Impact analysis
- Containment analysis
- Investigation workflows
- Shipment visibility
- Partner integrations
- Event monitoring
- EPCIS reporting
- Event aggregation
- Relationship analysis
- Traceability dashboards
GS1 Barcodes
│
▼
Identifiers
│
▼
EPCIS Events
│
▼
EPCIS Documents
│
├──────────────┐
▼ ▼
Inventory Genealogy
│ │
└──────┬───────┘
▼
Traceability Applications
Axis provides the application layer between raw EPCIS data and production software.
Axis models EPCIS concepts directly.
Developers work with events and documents rather than XML structures.
Strong typing improves developer experience and reduces implementation errors.
Axis is designed for building software applications, not simply generating XML.
Use Axis with:
- Node.js
- React
- Next.js
- Express
- NestJS
- Electron
- Serverless Platforms
- EPCIS Domain Model
- EPCIS Parsing
- EPCIS Generation
- GS1 Identifier Support
- Validation
- Traceability Graphs
- Query Engine
- Advanced Validation Profiles
- Digital Link Support
- Master Data APIs
- Graph Visualization Components
- Traceability Analytics
- Partner Integration Helpers
- Documentation (coming soon)
- Examples (
/examples) - GitHub Issues
- GitHub Discussions
Contributions, ideas, bug reports, and feedback are welcome.
Please open an issue before submitting large changes.
MIT License