Architecture Tiers
Dependencies flow inward: a package may depend only on packages of the same or a lower tier. Tier 0 means it depends on no other Zudo package. The tiers below are the ones defined in scripts/package-tiers.js, the single source of truth the architecture tests enforce — a category spanning a range simply groups packages that sit at different tiers.
Foundation
11 packagesThe building blocks everything else rests on. @zudojs/errors and @zudojs/types are tier 0 — they depend on no other Zudo package. The other nine sit at tier 1, depending only on those two.
Shared error base class, error codes, and error handling utilities for the Zudo framework.
Shared type guards, utility types, and type converters for the Zudo framework.
Shared constants, enums, and type-safe literals for the Zudo framework.
Token-based dependency injection container for managing application dependencies and service lifetimes.
Structured logging with transports, log levels, and context propagation for Zudo applications.
Cryptographic primitives for hashing, encryption, tokens, and secure random generation.
Schema validation with Zod integration, constraints, parsers, composers, and depth/size checks.
Type-safe schema definition, parsing, and validation engine for data contracts.
Layered configuration management with multiple sources, validation, and environment-specific overrides.
Composable middleware pipeline with composition, timing, error handling, and context propagation.
Data translation layer with JSON serializer, type transformers, envelopes, and registry.
Runtime Primitives
11 packagesInfrastructure for events, messaging, lifecycle, storage, and background processing.
Event-driven architecture with event bus, emitter, middleware, and registry for decoupled communication.
In-process message bus infrastructure with handlers, middleware, and publish/subscribe patterns.
Application and component lifecycle orchestration with state machine, dependency ordering, graceful shutdown.
Transaction lifecycle and coordination with state machine, AsyncLocalStorage, savepoints, and hooks.
Caching primitives, abstractions, and adapters for the Zudo framework.
Storage abstractions including database, object storage, repository, serialization, locking, and lifecycle.
Background job and asynchronous task infrastructure with in-memory and adapter-based queue implementations.
Scheduled task and job infrastructure with cron-like scheduling, persistence, and worker management.
Boundary layer between Zudo and external platforms with adapter contracts, registry, and transport abstractions.
Database abstraction layer with clients, repositories, transactions, and query building.
Structured logging, metrics, tracing, context propagation, and exporters for Zudo applications.
Application Architecture
7 packagesHigh-level application patterns: CQRS, runtime, API operations, auth, RPC, and OpenAPI.
Application lifecycle management, execution context propagation, and runtime orchestration.
CQRS primitives for separating read and write operations.
Authentication and authorization services — JWT tokens, sessions, RBAC, and password hashing.
Sign in with Google, GitHub, Microsoft, Apple or Discord — authorization URLs, PKCE, state checks, and code exchange.
Application lifecycle orchestrator with dependency ordering, rollback, signals, and readiness checks.
Application-facing API layer — operation definitions, execution context, interceptors, and result types.
Remote procedure call infrastructure for Zudo applications.
OpenAPI 3.1 specification generation, validation, and SDK generation for Zudo applications.
Transport
2 packagesExternal interfaces — HTTP server and CLI tooling.
HTTP primitives, request handling, routing, middleware, and server infrastructure.
Command-line interface for scaffolding, generating, and managing Zudo framework projects.
Security
4 packagesAuthentication, authorization, input validation, and cryptographic security.
Security primitives for input validation, header security, CORS, CSRF, rate limiting, and security headers.
Generic authorization engine with RBAC, ABAC, resource authorization, wildcards, role hierarchy, and policies.
Cryptographic primitives for hashing, encryption, tokens. Listed in Foundation above.
Authentication and authorization. Listed in Application above.
OAuth 2.0 sign-in. Listed in Application above.
Platform & DX
4 packagesMulti-tenancy, feature flags, plugins, documentation infrastructure, and testing utilities.
Multi-tenant context and isolation with tenant resolution, AsyncLocalStorage propagation, and guard middleware.
Feature flag system with deterministic rollouts, rule engine, providers, variants, and evaluation context.
Plugin system for extending Zudo applications with modular capabilities.
Documentation infrastructure with structured document model, registry, validation, navigation, and generation.
Test helpers, fixtures, mocks, and utilities for testing Zudo applications.