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.
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, annotate, and implement controllers — regions, DI, ResponseReturn, guards, and the @Api decorator.
Request & Response DTOsDTO naming conventions, validation decorators, cross-field validation, and class-transformer integration.
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
AI Text GenerationMulti-provider text completions, capability registry, and intent orchestration.
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.