Skip to content

Guides ​

Practical guides for working with Archipel packages in your NestJS application.

Foundations ​

GuideWhat you'll learn
Getting StartedInstall packages, register your first module, implement ports, and run the app.
Migrating to v1Move a consuming NestJS 12 application to Archipel's ESM-only package contract.
Configuration ManagementType-safe config keys, strategy-based resolution, central registry, and validation.
Application BootstrapCompose NestJS startup with platform-bootstrap, Express middleware, security, sessions, and OpenAPI.
Composition ContextStage-aware, configuration-driven module composition without direct process.env access.
Implementing PortsHow the port/adapter pattern works, how to write adapters, and how to test them.
Controller Best PracticesStructure controllers with Standard Schema, ResponseReturn2, guards, DI, and the @Api decorator.
Request & Response ModelsStandard Schema contracts and the decorated class DTO migration fallback.
TestingUnit testing services, testing port adapters, integration testing with real databases.
TSDoc GuidelinesDocumentation standards for public APIs and generated reference pages.

Security & Identity ​

GuideWhat you'll learn
Authentication & AuthorizationJWT tokens, role-based access, custom scopes, MFA, sessions, and OAuth social login.
Cryptography & OTPBcrypt password hashing, prefixed UUIDs, and TOTP multi-factor authentication.

Data & Storage ​

GuideWhat you'll learn
Database SetupPostgreSQL via Prisma, Accelerate, repositories, queries, transactions, and health.
Blob StorageMulti-provider file storage, uploads, signed URLs, and metadata tracking.
Document GenerationGenerate PDF and DOCX from templates with variable substitution and image processing.
E-Signing IntegrationElectronic signature workflows, provider setup, and webhook handling.

Communication & Payments ​

GuideWhat you'll learn
Email DeliveryMulti-provider email sending, template engines, and verification flows.
Email TemplatesCreate, register, and override email templates with ResourceManager.
Payments & Feature GatingPayment provider integration, webhook handling, and feature-based access control.

Operations & Observability ​

GuideWhat you'll learn
Feature FlagsToggle features at runtime with Azure App Configuration or Vercel Edge Config.
Telemetry & ObservabilityOpenTelemetry metrics, distributed tracing, and structured logging.
Analytics & Error TrackingCapture errors and user context with Sentry, AppInsights, or Datadog.
CachingIn-memory LRU and Redis layered caches with TTL, stale-while-revalidate, and metrics.
Queue InfrastructureIn-memory FIFO, BullMQ (Redis), and Azure Service Bus job queues.
Health IndicatorsIntegrate health checks from all platform libraries using the unified health architecture.

AI & Extensibility ​

GuideWhat you'll learn
Intelligence Prompts Warm-upDefine, bind, execute, validate, and test reusable text and structured prompts.
AI Language GenerationProvider-neutral text, structured output, streaming, tools, agents, and per-request model policy.
AI Image GenerationProvider-neutral image generation with tree-shakable provider model loaders.
AI Realtime VoiceServer-owned live audio/text sessions, interaction modes, durable streaming, metering, and explicit recovery.
MCP ServerBuild MCP servers with tools, resources, and prompts for AI agent integration.

Platform Internals ​

GuideWhat you'll learn
OpenAPI & Feature DiscoveryMulti-document Swagger UI, the @Api decorator, and automatic per-module doc discovery.
Resource ManagementLoad templates, assets, and files from disk, blob storage, or memory via ResourceManager.

Released under the MIT License.