Selegic CRM Docs
ServerRoutes & API

Overview

Routing, Hono integration, RPC contract exposure, and route architecture.

The CRM server uses Hono for HTTP routing with a single router factory (createHonoRouter) in routes/index.ts.

Key Concepts

  • Route Factory: createHonoRouter composes all feature routes
  • RPC Types: Frontend derives types from routes at build-time
  • Feature Groups: Routes grouped per feature (CRUD, Flows, Dynamic Objects, Extensions)

File Structure

routes/
├── index.ts           # Main router factory
├── gen/               # Auto-generated routes from Prisma
├── flows.routes.ts    # Flow execution endpoints
└── dynamic.routes.ts # Dynamic object endpoints

Quick Navigation

On this page