LPG Modeler
Examples

Four models to start from

Each one is a complete, valid model file. Download it, drop it in a workspace, open the canvas beside it, and generate. Every example on this page is checked in continuous integration, so none of them can drift out of date with the tool.

Start here

Save any of these as <name>.lpg.yaml — the extension matches on that suffix — then run:

npx lpg-modeler-cli check social.lpg.yaml
npx lpg-modeler-cli emit  social.lpg.yaml --target shacl --out ./schema

social.lpg.yaml download

The starter. An abstract parent contributing a key to its subtypes, a mixin contributing a shared property, and three edges — one of which has an abstract endpoint, and one of which carries no properties at all.

Shows: abstract types · inheritance · mixins · keys · edge properties · gradual reification in the RDF output.


catalog.lpg.yaml download

Where the targets start disagreeing. An enum, two list-valued properties, a composite key and an open type. Generate all seven targets from this one and read the downgrade comments — that is the fastest way to see what each target can and cannot hold.

Shows: enums · lists · composite keys · open types · GQL type spellings.


kinship.lpg.yaml download

Endpoint bounds. A person has exactly two parents — a constraint none of the four named multiplicities can express. SHACL enforces it exactly; LadybugDB emits the strongest keyword it has and reports what it cannot hold.

edges:
  HAS_PARENT:
    from: Person
    to: Person
    cardinality: { to: "2" }

Shows: exact counts · ranges · bounds in both directions.


booking.lpg.yaml download

Constraints. Bounds and patterns on values, three named constraints across properties and edges, and a raw SHACL fragment for the long tail. Five of the seven targets can hold none of it, and each says so.

constraints:
  - name: endAfterStart
    assert: { lessThan: [startDate, endDate] }
    message: a booking must end after it starts
  - name: oneLeadGuest
    assert: { count: { edge: BOOKED_BY, of: Guest, min: 1, max: 1 } }

Shows: value bounds · patterns · cross-property assertions · qualified counts · the escape hatch.

What to try next

Open booking.lpg.yaml beside the canvas and select the Booking box. The inspector on the right lists its constraints and lets you add one: pick a kind, pick the operands from the type's own properties, and it is written into the file as a targeted edit.

Then generate the shacl target and the ladybug target from the same file. The first carries every constraint; the second reports each one it cannot. That difference is the whole design in one screen.