BaryoDev / BaryoDev/barakoCMS

Meta: a describe document for field types, rules, capabilities, workflow actions and modules

Open
#931 0 comments 0 reactions 0 assignees View on GitHub
core design
Dominant language
C#
Stars
6
Forks
7
Avg merge
4h 42m
Merged PRs (30d)
307

Description

`GET /api/meta` returns `Version`, `ApiContractVersion` and `SwaggerEnabled` and nothing else (`barakoCMS/Features/Monitoring/Meta/Models.cs:5-14`). The accepted field types and their editor hints live in `barakoCMS/Core/Validation/FieldTypeRegistry.cs:48-93`, but no endpoint returns them, so barakoBrew copies the list into `src/types/schema.ts:73` with a comment saying it mirrors the registry. Capabilities, workflow action parameters and module details each answer in their own shape, or not at all.

### Why it is too specific

Every client keeps a private copy of what is valid. When #820 adds `choice`, barakoBrew, the CLI (#345), MCP tool schemas (#582) and VS Code completion (#843) each need an edit, and whichever lags accepts or refuses the wrong thing. A module adding a capability or workflow action for a clinic cannot reach any of those copies.

### The general concept

One describe document from the API: field types with their options and rules, capabilities, workflow actions with parameter schemas, enabled modules, and shapes a renderer registers such as blocks. It is versioned with the contract and filtered to what the caller may see. Clients generate from it or read it at runtime instead of transcribing.

### Where it lives

Core: a describe endpoint beside `/api/meta`, built from the registries modules already add to.

### Compatibility

New endpoint, additive. `/api/meta` keeps its shape.

### Done when

- A field type added to the registry appears in the describe document with no other change, with a test that fails before the change.
- An enabled module's capabilities and workflow actions appear, and a disabled module's do not.
- barakoBrew can generate its field type list from the document (tracked in barakoBrew).

Part of the decision on the API as the only home of schema, rules and dry run, linked from the umbrella issue. Relates #582, #843, #892.

Found in the architecture sweep of 15 September 2026.

Contributor guide

Open the contributing guide

Research direction

Start with barakoCMS/Features/Monitoring/Meta/Models.cs and the /api/meta endpoint, then read barakoCMS/Core/Validation/FieldTypeRegistry.cs:48-93 and the module registries it references. Compare the current copied field types in barakoBrew's src/types/schema.ts:73. Done means the new versioned document covers registry and enabled-module data, excludes disabled modules, and has tests for these cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, typescript
Domain
api, backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.