Architecture Packages

An architecture package is a complete blueprint for a software architecture style. Each package includes metadata, documentation, skills, and templates that ensure every generated solution follows consistent patterns.

What is an architecture package?

An architecture package encodes an architect's decisions into a reusable, executable format. It captures not just the folder structure, but the full set of patterns, conventions, and implementation details that make an architecture work in practice.

Each package contains:

  • Metadata — Name, description, layers, and tech stack of the architecture
  • Documentation — Markdown-based description of the architecture's patterns, conventions, and decision rationale — used by the AI as context when executing skills
  • Skills — Step-by-step instructions for common tasks (create solution, add service, implement feature)
  • Templates — Source code files with variable placeholders for consistent code generation
  • Configuration — Customizable options like layer naming, endpoint styles, and ID strategies

Choosing the right architecture

The right architecture depends on your team size, deployment needs, and complexity requirements. Consider these questions:

  • How many teams will work on the codebase? Independent teams benefit from stronger boundaries.
  • How do you deploy? Single deployable vs. independently deployable services.
  • How complex is the domain? Rich business logic benefits from domain-centric designs.
  • What's your scale? Independent scaling requirements push toward service boundaries.

Built-in example packages

Golden Path ships with three .NET architecture packages that serve as both ready-to-use solutions and reference implementations for building your own packages.

PackageBest forDeployment
Clean ArchitectureComplex domain logic, single teamSingle deployable
Modular MonolithModule boundaries, shared databaseSingle deployable
MicroservicesIndependent teams, separate scalingMultiple deployables

EXAMPLE

Clean Architecture

Domain-centric design with strict dependency rules. The domain layer has zero external dependencies — all infrastructure concerns point inward.

  • Name
    Domain
    Type
    layer
    Description

    Entities, value objects, domain events, aggregate roots. No external dependencies.

  • Name
    Application
    Type
    layer
    Description

    Use cases, command/query handlers (MediatR), interfaces for infrastructure.

  • Name
    Infrastructure
    Type
    layer
    Description

    EF Core DbContext, repositories, external service clients, message bus.

  • Name
    Api
    Type
    layer
    Description

    Controllers or minimal API endpoints, middleware, DI composition root.

Key patterns: CQRS with MediatR, Repository pattern, Domain Events, Rich Domain Models

Skills included: create-solution, add-module, implement-feature, add-authentication, add-authorization


EXAMPLE

Modular Monolith

Independent modules within a single deployable. Each module owns its data and communicates with other modules through well-defined contracts — not direct database access.

  • Name
    Module
    Type
    boundary
    Description

    Each module has its own Domain, Application, Infrastructure, and API layers.

  • Name
    SharedKernel
    Type
    shared
    Description

    Common abstractions: IDomainEvent, AggregateRoot, IIntegrationEvent.

  • Name
    Contracts
    Type
    shared
    Description

    Public interfaces and DTOs that modules expose to each other.

Key patterns: Module isolation, Integration Events between modules, Outbox Pattern, per-module DbContext

Skills included: create-solution, add-module, implement-feature, add-authentication, add-authorization


EXAMPLE

Microservices

Independently deployable services, each with its own database and communication via asynchronous events. Built for teams that need independent release cycles and isolated scaling.

  • Name
    Service
    Type
    boundary
    Description

    Each service is a standalone solution with Domain, Application, Infrastructure, and API layers.

  • Name
    SharedKernel
    Type
    shared
    Description

    Minimal shared types: IIntegrationEvent with JsonDerivedType for polymorphic deserialization.

  • Name
    Message Bus
    Type
    infrastructure
    Description

    RabbitMQ with fanout exchanges for pub/sub event distribution.

Key patterns: Event-Driven Architecture, Outbox Pattern, Eventual Consistency, per-service database, API Gateway

Skills included: create-solution, add-service, implement-feature, add-authentication, add-authorization, add-aspire, add-otel


Creating your own packages

You can create architecture packages for any tech stack and architecture style. Point plan_architecture at an existing reference repo, and the AI analyzes the codebase, designs the skill set, extracts templates, and registers the complete package — ready to use.


Configurable options

The built-in .NET packages support these configurable options:

  • Name
    Layer naming
    Type
    option
    Description

    Customize layer names: Domain/Core, Application/UseCases, Api/Web.

  • Name
    Endpoint style
    Type
    option
    Description

    Choose between controller, minimal-api, or fast-endpoints for your API layer.

  • Name
    ID strategy
    Type
    option
    Description

    Use standard guid or strongly-typed IDs (typed-id) for entity identifiers.

Was this page helpful?