Selegic CRM Docs
Server

Introduction

Overview of the CRM backend package — runtime, routing and the server-side features.

Provides a concise overview of the crm/server package and links to feature-level pages (CRUD, Dynamic Objects, Flows, Extensions, Pub-Sub, metadata hooks and shared utilities).

Quick facts

  • Package: crm/server
  • Entry point: app.ts
  • Router factory: routes/index.tscreateHonoRouter
  • Middleware: lib/middleware/* (sessionMiddleware, tenantMiddleware, lifecycleMiddleware)
  • Feature surface: features/* (per-feature layers & services)

Runtime & request flow

Features HTTP calls tenant-prisma executes Client Hono app — app.ts requestId sessionMiddleware tenantMiddleware lifecycleMiddleware createHonoRouter CrudService.execute CrudRepository -> Prisma OperationHandlerService -> DynamicRepository FlowExecutionEngine FlowRepo RecordService WebhookClient CRUD routes - features/crud Dynamic objects - features/dynamic-objects Flow automation - features/flows Extensions - features/extensions

File map (important locations)

  • app.ts — server bootstrap + global middleware + subscribers
  • routes/ — Hono route modules that expose the public API
  • features/ — feature modules (see feature pages linked below)
  • lib/middleware/ — tenant/session/lifecycle middleware
  • lib/hooks/ — request lifecycle hooks registry

Where to start reading


Technical reference

For deeper maintenance guides, including sequence diagrams and runbooks, explore the sub-directories for each feature.

On this page