architecture-boundaries

Official

Clarify robust app boundaries.

Authorlatitude-dev
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Layering and boundaries, web vs public API, app layout (clients, routes, logging), ports/adapters, runtime-portable domain/shared/utils code, multi-tenancy, DDD layout, or anti-patterns.

Core Features & Use Cases

  • App boundaries: Apps only handle input validation, authentication/authorization, organization access enforcement, and routing to domain use-cases. No business logic in handlers, controllers, or jobs.
  • Application layout: Clients initialize integrations in apps/*/clients.ts and import from boundaries; Routes use registerRoutes() to keep the HTTP surface modular; Logging uses createLogger() from @repo/observability; Tracing rules require withTracing in Effect pipelines; Configuration reads env via parseEnv/parseEnvOptional.
  • Web vs public API: apps/api is the stable public surface; apps/web should not proxy through apps/api for internal features; keep web-private server functions modular; share domain rules; ensure machine-facing surfaces exist.
  • Cross-cutting constraints: Public request/response schemas should remain boundary-specific; reuse domain schemas; prefer Web standards; avoid Node-only dependencies at runtime.
  • Domain layer: Domain entities are Zod-first; canonical schemas and inference lives in packages/domain/*/src/entities; domain errors, constants, and helpers live in their respective domain paths.
  • Infrastructure: Platform adapters; how to structure Effect-based clients; bootstrap, error handling via tagged errors; env parsing; layering and health checks.
  • Shared utilities: Place generic helpers in @repo/utils; ensure web-standards-first.
  • Multi-tenancy: Every request is organization-scoped; membership checks at boundaries; telemetry paths include organizationId.
  • Domain design: Bounded contexts, single-responsibility domains, in-memory adapters for tests.
  • Anti-patterns to reject: e.g., cross-domain logic without ownership, new provider integrations without contracts, unnecessary env vars, etc.

Quick Start

Consult this Skill to structure and enforce boundaries across your codebase, from apps/* to domain layers, implementing proper ports/adapters and separation of concerns.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: architecture-boundaries
Download link: https://github.com/latitude-dev/latitude-llm/archive/main.zip#architecture-boundaries

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.