rmb32 / barncept-gui
A web GUI for viewing and editing Barncept concept schemas
Requires
- php: ^8.5
- rmb32/barncept: ^1.0
- symfony/console: ^7.0
- symfony/process: ^7.0
Requires (Dev)
- infection/infection: ^0.35.4
- phpstan/phpstan: ^2.2
- phpunit/phpunit: ^13.3
- rector/rector: ^2.6
- squizlabs/php_codesniffer: ^4.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
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
| Method | Path | Behaviour |
|---|---|---|
| GET | /api/schemas | List schemas with id/name/category/kind/validity |
| POST | /api/schemas | Create a schema ({ id, from? }) |
| GET | /api/schemas/{id} | Load one |
| PUT | /api/schemas/{id} | Validate and save a full schema |
| POST | /api/schemas/{id}/rename | Rename/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}/roots | Implementation keys for the preview picker |
An {id} containing / must be URL-encoded as %2F.
Related packages
- Barncept — the schemas and model this edits.
- Barncept CLI —
barncept initfor project setup. - Barnscaff — scaffold folders from the schemas you edit here.
- Barnark GUI and Barnspec GUI — sibling browser tools.
More docs
License
Proprietary. See LICENSE. Copyright (c) Roger Barnfather.