Search by

rmb32 / barncept-gui

rogerbarnfather

A web GUI for viewing and editing Barncept concept schemas

v1.0.0 2026-10-07 12:15 UTC

This package is auto-updated.

Last update: 2026-10-07 18:34:27 UTC


README

Part of BarnSuite.

A browser-based editor for Barncept concept schemas: a browsable tree of Definitions, Abstractions and Implementations, with validation and a resolved-tree preview.

Requirements

  • PHP 8.5+
  • Node.js (only if you want to develop the frontend)

Installation

Install it alongside Barncept CLI, which then offers barncept gui:

composer require --dev rmb32/barncept-cli rmb32/barncept-gui

Run it

If the barncept CLI is installed in the same project, just run:

barncept gui                  # http://localhost:8082, opens your browser
barncept gui --port=9000 --no-open

It serves the schemas of the project you run it in — the schemaDirectory of the nearest parent directory with a barncept.json (written by barncept init), else that directory's concepts/ — and picks the next free port if the default is taken.

Or serve it by hand:

BARNCEPT_SCHEMA_DIR=/path/to/your-project/concepts php -S localhost:8080 -t public

Open http://localhost:8080. It scans BARNCEPT_SCHEMA_DIR (default: as above) recursively for *.json schemas; a schema's id is its path relative to that folder (templates/library.json → templates/library).

To work on the frontend with hot reload:

cd frontend
npm install
npm run dev     # proxies /api to localhost:8080, serves on :5173

JSON API

MethodPathBehaviour
GET/api/schemasList schemas with id/name/category/kind/validity
POST/api/schemasCreate a schema ({ id, from? })
GET/api/schemas/{id}Load one
PUT/api/schemas/{id}Validate and save a full schema
POST/api/schemas/{id}/renameRename/move ({ id: newId })
DELETE/api/schemas/{id}Delete a schema file
GET/api/schemas/{id}/preview?root={key}Resolved-tree text preview
GET/api/schemas/{id}/rootsImplementation keys for the preview picker

An {id} containing / must be URL-encoded as %2F.

Related packages

More docs

Internals · History

License

Proprietary. See LICENSE. Copyright (c) Roger Barnfather.