Skip to content

Workspace Packages

The repo is an npm workspace monorepo. The @dexian/* packages under packages/ back the Express server (auth, email, SVG, settings, brand). They are referenced by @dexian/<name> specifiers and compiled by npm run build:workspace-libs.

Packages vs the v2 video engine

The v2 Director video system lives entirely under web/ (its own document model in web/remotion/document/, its own 216-module template library, its own renderer). It does not depend on these packages. Several packages below — @dexian/ir, @dexian/timeline-ir, @dexian/templates — were the v1 video schema/templates and are now used only by retired, unreachable Express routes. The ones still live in production are the ones the email / SVG / brand features use: @dexian/brand-config, @dexian/voice, @dexian/asset-providers, @dexian/observability, @dexian/renderers/email.

packages/
├── brand-config/        ✅ live (email/svg/brand)
├── voice/               ✅ live (email narration, TTS)
├── asset-providers/     ✅ live (footage/image lookup for email)
├── observability/       ✅ live (cost/trace on Express LLM calls)
├── renderers/email/     ✅ live (MJML → HTML)
├── ir/                  ⚠️ v1 video schema — retired for v2
├── timeline-ir/         ⚠️ v1 timeline → IR — retired for v2
└── templates/           ⚠️ v1 8-template video system — retired for v2

@dexian/brand-config

Brand primitives — immutable color/typography/motion/tone/photo/data-viz rules. Consumed by the email and SVG generators for brand-consistent output.

@dexian/voice

Voiceover generation abstracted across providers (generateVoiceover, callAzureTts, getAudioDuration, VOICE_PROFILES). Used by the email pipeline's narration path.

The video narration path is separate — it lives in web/src/director/voiceover.ts and calls Azure TTS directly.

@dexian/asset-providers

The footage/image lookup chain (findAsset, SharePoint → brand uploads → Pexels with semantic reranking). Feeds the email pipeline and any Express media lookups.

The video editor sources media from storage/ via /api/assets + /api/media, not this chain.

@dexian/observability

Token usage, cost, and tracing (CostTracker, recordTrace, sendTrace → LangSmith). Wired into the Express LLM call sites.

@dexian/renderers/email

MJML-based email renderer (renderEmail(input) → { html, text }). Used at the email pipeline's html stage. See Email Generator.


@dexian/ir ⚠️ retired for v2

The v1 canonical video schema (IRDocument, IRScene, IRLayer, IROverlay, …). The v2 system uses its own ResolvedIR in web/remotion/document/ir.ts instead. Retained only for legacy Express routes.

@dexian/timeline-ir ⚠️ retired for v2

The v1 timeline editor model + timelineToIR(). Superseded by the v2 editor's ResolvedIR store (web/src/document/irStore.ts).

@dexian/templates ⚠️ retired for v2

The v1 8-template video block system. Superseded by the 216-module template library under web/remotion/templates/modules/. See Blueprints & Templates. Do not edit packages/templates/src/video/ — it is not the live system.


Adding a new package

  1. Create packages/<name>/ with package.json (@dexian/<name>), tsconfig.json, src/index.ts
  2. It's covered by the packages/* workspace glob; add it to the build:workspace-libs script in the root package.json in dependency order
  3. Reference from the server with import { … } from '@dexian/<name>'

The Next.js web/ app is a separate install and does not consume @dexian/* packages — add video/editor code under web/ instead.