Skip to main content

Architecture

Hile is intentionally split into small packages. Choose only the package that owns the boundary you are implementing.

Project Startup And Lifecycle

Read Core lifecycle when the task mentions:
  • service container
  • boot files
  • startup/shutdown
  • auto-loaded services
  • hile start
  • graceful exit
Packages: @hile/core, @hile/bootstrap, @hile/cli, @hile/logger, @hile/ioredis, @hile/typeorm.

HTTP APIs

Read HTTP API when the task mentions:
  • REST endpoints
  • Koa middleware
  • controllers
  • Zod validation
  • response formatting
  • file-system routes
Packages: @hile/http, @hile/loader.

Business Logic And Context

Read Model and context when the task mentions:
  • reusable domain logic
  • pipeline middleware
  • request/work-unit context
  • logger context bindings
  • context propagation into micro calls or queue jobs
Packages: @hile/model, @hile/context.

Messaging And Microservices

Read Messaging and Micro when the task mentions:
  • WebSocket/IPC/worker messaging
  • defineMicroMessage or transport-neutral defineMessage
  • service registry
  • Application.call
  • streaming RPC
  • pub/sub topics
Packages: @hile/message-modem, @hile/message-ws, @hile/message-ipc, @hile/message-worker-thread, @hile/message-loader, @hile/micro, @hile/micro-dynamic-configs, @hile/reloader.

Redis Reliability

Read Redis reliability when the task mentions:
  • distributed locks
  • idempotency
  • rate limits
  • durable queues
  • retries
  • DLQ
  • singleflight
Packages: @hile/redis-lock, @hile/redis-idempotency, @hile/redis-rate-limit, @hile/redis-stream-queue.

Boundary Rule

Use @hile/model for reusable business behavior, @hile/http or @hile/http-next for request boundaries, @hile/micro for RPC, and @hile/redis-stream-queue for durable background work.