Skip to main content

Solution Development

Solution Development is how you build complete, branded business applications on Qefro: a restaurant manager, a hospital front desk, a CRM, a hotel property system, a school administration portal, or an inventory back office — all shipped as a single installable package.

The SDK process is the application (ADR-003): domain logic lives in required src/ (Node / Rust / Python) on signed /qefro. Optional YAML workflows, prompts, and UI only orchestrate and present. Solution-owned documents persist via managed storage from inside the SDK (ctx.storage). External systems of record stay behind pool connectors.

Start here: Build your first app (qefro create-app warehouse-pro → publish → install).

Deprecated

YAML-only packages that call storage/* from workflows or UI sources are incorrect. See Managed apps.

What you can build

Any business domain that fits the Qefro model — an SDK app with tools, optional workflows/events, managed storage and/or pool connectors, and an optional portal-rendered UI — can be packaged as a solution:

DomainTypical pagesTypical data plane
Restaurant managementDashboard, reservations, tables, kitchen, orders, paymentsSDK + managed storage (+ optional POS)
Hospital managementAppointments, wards, billing, duty rosterSDK + storage + HMS connectors
CRMPipeline, contacts, activities, reportsSDK + storage + CRM hub
Hotel managementRooms, bookings, housekeeping, foliosSDK + storage + PMS
School managementClasses, attendance, fees, timetablesSDK + storage + SIS
Inventory managementStock levels, transfers, purchase ordersSDK + storage + WMS

Throughout this section, restaurant-pro is the canonical reference solution. Every concept page uses it as the running example.

Core principles

  1. The SDK process is required. Business logic runs in src/ on /qefro. The platform must not encode domain rules (reservation, menu, …).
  2. UI is declarative data. Theme, nav, pages, and widgets are YAML — no package JS in the portal UI (no iframes, no injected scripts).
  3. Capability mediation is mandatory. Host interactions pass through the capability registry; negotiated at install and re-checked on every call.
  4. Event-driven communication is mandatory. Solutions react to the platform event bus and emit ui.* lifecycle events — no out-of-band signaling.
  5. Persist only via ctx.storage. Workflows/UI call app tools ({solution}/{tool}), never storage/* directly.

Platform rules

These rules are enforced at publish time and at render time. Packages that violate them are rejected:

#Rule
1No arbitrary JavaScript
2No direct DOM access
3No iframe execution
4No direct database access
5No direct Redis access
6No direct network access
7Capability mediation is mandatory
8Event-driven communication is mandatory

See Security model for how each rule is enforced.

The delivery pipeline

A solution travels a fixed pipeline from your editor to a tenant's portal:

StageResponsibilityDetails
Solution packageRequired src/ SDK + optional UI/workflows/connectorsPackage structure
RegistrySigned global catalog (platform-admin publish only)Publishing
InstallerActivation, capabilities, installation bindingInstallation
RuntimeExecutes workflows, serves runtime data sourcesWorkflows
SDK appDomain tools on /qefroManaged apps
Managed storageDocuments via ctx.storage → MongoManaged storage
Connector bridgeExternal pool connectorsConnectors
Portal rendererDeclarative pages/widgets/themesPages

The full architecture is covered in Architecture.

Package structure

Prefer qefro create-app <id> — see App scaffold. Every solution is a directory with this layout:

restaurant-pro/
├── manifest.yaml # identity, hosting, endpoint, permissions, settings
├── src/ # required — SDK application (/qefro)
├── package.json # and/or Cargo.toml / pyproject.toml
├── Dockerfile # required for hosting: managed
├── assets/ # images only (png/jpg/jpeg/svg/webp)
├── workflows/ # optional — tool steps → {solution}/{tool}
├── connectors/ # optional — external pool connector contracts
├── ui/ # optional declarative staff UI
│ ├── theme.yaml
│ ├── navigation.yaml
│ ├── pages.yaml
│ ├── layouts.yaml
│ ├── widgets.yaml
│ └── sources.yaml # runtime | {solution}/{tool} | pool connector
└── README.md

YAML sources are assembled into a canonical JSON package, checksummed and signed at build time — see Packaging.

Documentation map

TopicPage
Managed apps (start here)Managed apps
Platform architectureArchitecture
Build your first solutionQuickstart
Tenant-side activationInstallation
manifest.yaml referenceManifest
BrandingThemes
Sidebar + routesNavigation
Pages & layoutsPages · Layouts
WidgetsMetric · Table · Chart · Markdown · Form · Timeline
Host capabilitiesCapabilities
Event modelEvents
Data sourcesSources
Managed document storageManaged storage
Images & branding filesAssets
Connector dependenciesConnectors
Workflow definitionsWorkflows
Publish-time checksValidation
Building a signed packagePackaging
Publishing to the registryPublishing
Security model & rulesSecurity
Fixing common failuresTroubleshooting
Complete reference solutionrestaurant-pro

How this differs from playbooks

Solution playbooks are outcome-oriented guides that compose existing platform features (customer support, order tracking, refunds). Solution Development produces new installable packages with their own manifest, UI, workflows and data-plane requirements (managed storage and/or connectors).

  • Runtime — the execution engine that runs installed workflows.
  • Events — the platform event bus that solutions ride.
  • Managed storage — document plane via ctx.storage (SDK-only).
  • Connectors — stateless integration containers behind the bridge.
  • Business Flows — the flow model workflows compile to.