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
| Primitive | Purpose |
|---|---|
| Operation Pipeline | Standardizes "Prepare → Execute → After" pattern |
| Hook Executor | Generic engine for pre/post hooks with timeout controls |
| API Bridge | Converts Effect-TS programs to Hono/JSON responses |
Design Goals
- Predictability: Every operation has span, metric, and logging
- Resilience: Hooks isolated and timed out to prevent cascading failures
- Type Safety: Effect-TS for end-to-end typed error handling
Quick Navigation
- Operation Pipeline — Organizing logic into stages
- Hook Executor — Implementing hook systems
- API Bridge — Effect to HTTP interface