Search by

Plug-and-play headless REST / JSON:API and dynamic OpenAPI 3.1 module for PhrameCMS.

Package info

github.com/PhrameCMS/api

pkg:composer/phramecms/api

Statistics

Installs: 18

Dependents: 1

Suggesters: 0

Stars: 0

Open Issues: 0

v0.1.0 2026-12-04 21:15 UTC

This package is auto-updated.

Last update: 2026-12-04 21:34:12 UTC


README

Plug-and-play headless REST / JSON:API and dynamic OpenAPI 3.1 module for PhrameCMS.

Responsibilities

  • Zero-Boilerplate Content Endpoints: Automatically exposes every configured Entity Type and Bundle under /api/v1/content/{entity_type}/{bundle} (GET list, POST create, GET /{id}, PATCH /{id}, DELETE /{id}, GET /{id}/revisions, POST /{id}/transitions).
  • Query Capabilities: Standardized filtering (?filter[status]=published), sorting (?sort=-created_at), cursor/page pagination, sparse fieldsets (?fields[article]=title,slug), and relationship inclusion (?include=author,tags).
  • Config & Schema Introspection Endpoints:
    • /api/v1/schema and /api/v1/schema/entities/{type}/{bundle} exposing live JSON Schemas.
    • /api/v1/config/{name} and /api/v1/config/diff (RBAC-protected, supporting ?dry_run=true).
  • Dynamic OpenAPI 3.1 Specification: Automatically generates /api/v1/openapi.json from active modules, entity bundles, field types, and registered Core Operations — staying permanently in sync with site configuration.
  • Thin Adapter Architecture: Contains zero duplicated domain logic; every request translates into a Core OperationBus invocation with the authenticated actor context.

Dependencies

  • PHP ^8.5
  • phramecms/core
  • phramecms/routing
  • phramecms/entity
  • phramecms/config
  • phramecms/user (optional — enforces token auth & RBAC when installed)

Ecosystem

Part of the PhrameCMS multi-repo suite. See PhrameCMS/cms for the starter distribution and architecture docs.