ServerlessIRCd Docs

Docs home

ADR-008: Monorepo and tooling stack

Date: 2025-01-10 (Phase 0) Status: Accepted Supersedes: — Superseded by: —

Context

ServerlessIRCd is a multi-package TypeScript project: a platform-agnostic core (irc-core), an orchestration layer (irc-server), a reference runtime (in-memory-runtime), two cloud adapters (cf-adapter, aws-adapter), and several apps (local-cli, cf-worker, aws-stack). The toolchain must support cross-package type checking, incremental builds, a unified test runner, and CI that enforces coverage gates per package.

Decision

Concern Choice Rationale
Package manager pnpm (workspaces) Fast, disk-efficient, first-class monorepo support
Build orchestration turbo (caching) Incremental builds, remote cache, task dependency graph
TypeScript Project references + tsconfig.base.json Strict mode, exactOptionalPropertyTypes, noUncheckedIndexedAccess
Test runner vitest ESM-native, fast, integrates with Workers (vitest-pool-workers), built-in coverage
Coverage v8 provider, gate ≥90% (100% on irc-core) Enforced in CI (.github/workflows/ci.yml)
Lint/format Biome Single tool (replaces ESLint + Prettier), fast, zero config drift
CF bundler wrangler (esbuild internally) Native Workers toolchain
AWS bundler esbuild (Lambda bundles) + CDK v2 (infra) Tree-shaking, fast cold starts
Runtime target Node 20 (Lambda) + latest Workers runtime; ES2022+ Aligns with platform-supported runtimes

Consequences

Positive:

Negative:

References