Skip to main content
Components are embeddable UI widgets built with JSX/HTML/JS and compiled by Sinas into browser-ready bundles. They can call agents, functions, queries, and access state through proxy endpoints. Key properties:
PropertyDescription
namespace / nameUnique identifier
titleDisplay title
source_codeJSX/HTML/JS source
compiled_bundleAuto-generated browser-ready JS
input_schemaJSON Schema for component configuration
enabled_agentsAgents the component can call
enabled_functionsFunctions the component can call
enabled_queriesQueries the component can execute
enabled_componentsOther components it can embed
enabled_storesStores the component can access ({"store": "ns/name", "access": "readonly|readwrite"})
css_overridesCustom CSS
visibilityprivate, shared, or public
Components use the sinas-ui library (loaded from npm/unpkg) for a consistent look and feel. Management endpoints:
POST   /api/v1/components                                  # Create component
GET    /api/v1/components                                  # List components
GET    /api/v1/components/{namespace}/{name}               # Get component
PUT    /api/v1/components/{namespace}/{name}               # Update component
DELETE /api/v1/components/{namespace}/{name}               # Delete component
POST   /api/v1/components/{namespace}/{name}/compile       # Trigger compilation
Share links allow embedding components outside Sinas with optional expiration and view limits:
POST   /api/v1/components/{namespace}/{name}/shares        # Create share link
GET    /api/v1/components/{namespace}/{name}/shares        # List share links
DELETE /api/v1/components/{namespace}/{name}/shares/{token} # Revoke share link
Runtime rendering:
GET    /components/{namespace}/{name}/render               # Render as full HTML page
GET    /components/shared/{token}                          # Render via share token
Proxy endpoints allow components to call backend resources from the browser securely — the proxy enforces the component’s enabled_* permissions:
POST   /components/{ns}/{name}/proxy/queries/{q_ns}/{q_name}/execute    # Execute query
POST   /components/{ns}/{name}/proxy/functions/{fn_ns}/{fn_name}/execute # Execute function
POST   /components/{ns}/{name}/proxy/states/{state_ns}                   # Access state