Skip to content

Blueprint Server ​

vyuh_blueprint_server hosts your Blueprint as an API. It handles queries and actions using your configured database, authentication, and integrations.

Configure a server ​

Supply the Blueprints to host, the API base path, and your database plugin:

dart
final config = BlueprintProtocolsConfig(
  blueprints: [blueprint],
  name: 'my_app.blueprint.protocol',
  basePath: '/my_app',
  persistence: const BlueprintPersistenceConfig(
    runtimeSchema: 'my_app_app_runtime',
    outboxSchema: 'my_app_app_runtime',
  ),
  protectedPaths: const ['/my_app/actions'],
);

final runtime = await VyuhServer.bootstrap(
  name: config.name,
  plugins: [dbPlugin],
  features: [blueprintProtocolsFeature(config)],
);

Your application supplies blueprint and dbPlugin in this example. Configure authentication and permissions before exposing protected actions.

Reach a private workflow service ​

WorkflowTrustedProxyPlugin forwards workflow calls from your API to the workflow service. If that service only admits callers with a platform identity token, pass upstreamIdentity: a function that returns a token for the service origin. The proxy sends it in X-Serverless-Authorization, leaves Authorization alone, and never returns it to the browser. If no token can be had, the call fails with 502 and workflow.proxy.upstream_identity_unavailable instead of going out without one.

Store files ​

A Blueprint with storage buckets needs BlueprintServerPlugin(storage: BlueprintStorageConfig(...)). The server then mounts the upload, download and audit routes under <basePath>/storage, keeps their records in the runtime schema, and refuses to start when buckets exist and the configuration does not.

Run and update ​

Use development profiles to run your server locally. Use migrations to evolve the database and populate initial data.

Clients connect through the shared protocol. The server checks permissions and business rules when requests are executed.