Selegic CRM Docs
ServerShared

Overview

Building blocks for consistent features: pipelines, hook executors, and API bridges.

The features/shared directory contains core primitives used to build consistent features across the CRM server.

Core Primitives

PrimitivePurpose
Operation PipelineStandardizes "Prepare → Execute → After" pattern
Hook ExecutorGeneric engine for pre/post hooks with timeout controls
API BridgeConverts Effect-TS programs to Hono/JSON responses

Design Goals

  1. Predictability: Every operation has span, metric, and logging
  2. Resilience: Hooks isolated and timed out to prevent cascading failures
  3. Type Safety: Effect-TS for end-to-end typed error handling

Quick Navigation

On this page