Skip to content

Installation

Vyuh Server packages are published on Vyuh's pub registry. Before adding dependencies, configure your pub token — see Pub Token Setup.

Core

yaml
# pubspec.yaml
dependencies:
  vyuh_server:
    hosted: https://pub.vyuh.tech
    version: ^0.2.0

That's enough to bootstrap a server, register features, and mount routes. No database, no auth, no telemetry — just the Relic transport, the plugin framework, and the vyuh global accessor.

Adding Plugins

Add a plugin only when you need its role. Each plugin owns one singleton or contributes into one chain.

Database — Postgres

yaml
dependencies:
  vyuh_server:
    hosted: https://pub.vyuh.tech
    version: ^0.2.0
  vyuh_server_plugin_postgres:
    hosted: https://pub.vyuh.tech
    version: ^0.2.0

Storage — Supabase files

yaml
dependencies:
  vyuh_server_plugin_storage:
    hosted: https://pub.vyuh.tech
    version: ^0.1.1

Auth — JWT + API key

yaml
dependencies:
  vyuh_server_plugin_auth_jwt:
    hosted: https://pub.vyuh.tech
    version: ^0.2.0
  vyuh_server_plugin_auth_apikey:
    hosted: https://pub.vyuh.tech
    version: ^0.2.0

Both plugins can coexist — the framework concatenates their strategies into a single chain. A request walks the chain until one strategy returns an Actor or one throws AuthFailed.

Telemetry — pick one

Dev / tests:

yaml
dependencies:
  vyuh_server_plugin_telemetry_console:
    hosted: https://pub.vyuh.tech
    version: ^0.2.0

Production:

yaml
dependencies:
  vyuh_server_plugin_telemetry_otel:
    hosted: https://pub.vyuh.tech
    version: ^0.2.0

The framework enforces this at boot: registering two TelemetryPlugins throws SingletonCollisionError. Use environment-based wiring in main to swap between them.

Filters and CRUD

yaml
dependencies:
  cdx_query_server_postgres:
    hosted: https://pub.vyuh.tech
    version: ^0.1.1
  vyuh_server_plugin_entity_crud:
    hosted: https://pub.vyuh.tech
    version: ^0.2.5
  vyuh_entity_crud_types:
    hosted: https://pub.vyuh.tech
    version: ^0.2.2

Realtime — SSE fan-out

yaml
dependencies:
  vyuh_server_plugin_realtime:
    hosted: https://pub.vyuh.tech
    version: ^0.2.1

OpenAPI

yaml
dependencies:
  vyuh_server_plugin_openapi:
    hosted: https://pub.vyuh.tech
    version: ^0.2.0

Full SaaS Stack

A complete production stack:

yaml
dependencies:
  vyuh_server:
    hosted: https://pub.vyuh.tech
    version: ^0.2.0
  vyuh_server_plugin_postgres:
    hosted: https://pub.vyuh.tech
    version: ^0.2.0
  vyuh_server_plugin_storage:
    hosted: https://pub.vyuh.tech
    version: ^0.1.1
  vyuh_server_plugin_auth_jwt:
    hosted: https://pub.vyuh.tech
    version: ^0.2.0
  vyuh_server_plugin_telemetry_otel:
    hosted: https://pub.vyuh.tech
    version: ^0.2.0
  cdx_query_server_postgres:
    hosted: https://pub.vyuh.tech
    version: ^0.1.1
  vyuh_server_plugin_entity_crud:
    hosted: https://pub.vyuh.tech
    version: ^0.2.5
  vyuh_entity_crud_types:
    hosted: https://pub.vyuh.tech
    version: ^0.2.2
  vyuh_server_plugin_realtime:
    hosted: https://pub.vyuh.tech
    version: ^0.2.1
  vyuh_server_plugin_openapi:
    hosted: https://pub.vyuh.tech
    version: ^0.2.0
  # Your domain types, validators, etc.
  json_annotation: ^4.9.0

dev_dependencies:
  build_runner: ^2.4.0
  json_serializable: ^6.8.0

Run dart pub get, then jump to the Quick Start.

Dart SDK

Vyuh Server requires Dart 3.8+:

yaml
environment:
  sdk: ^3.8.0