YAML reference
socotra.yaml reference
Schema 1.1. Every field, type, default, and validation rule.
Full example
socotra.yaml
socotra:
version: "1.1"
solution:
name: "MyApp"
rootNamespace: "MyCompany.MyApp"
dotnetVersion: "net9.0"
outputPath: "./src"
nullable: true
implicitUsings: true
treatWarningsAsErrors: true
architecture:
pattern: modular-monolith
enforceLayerConstraints: true
allowedDependencies:
- from: "*.Domain"
to: "*.Domain"
modules:
- name: "Orders"
namespace: "MyApp.Orders"
description: "Order processing module"
layers:
- name: "Domain"
type: ClassLib
templates: ["base-entity", "value-object"]
- name: "Application"
type: ClassLib
references: ["Orders.Domain", "../SharedKernel"]
packages: ["FluentValidation:11.9.2"]
- name: "Infrastructure"
type: ClassLib
references: ["Orders.Application"]
packages: ["Microsoft.EntityFrameworkCore.SqlServer:8.0.0"]
- name: "Api"
type: WebApi
references: ["Orders.Application", "../SharedKernel"]
shared:
- name: "SharedKernel"
type: ClassLib
templates: ["base-entity", "result-pattern"]
host:
name: "MyApp.Api.Host"
type: WebApi
references: ["**/*.Api"]Root: socotra
SCT-000
At least one of
solution or modules must be present.socotra.solution
Valid dotnetVersion: net8.0, net9.0, net10.0, netstandard2.0, netstandard2.1
socotra.architecture
Patterns
- modular-monolith — monolithic solution decomposed by business modules with DDD-style layers (Domain, Application, Infrastructure, Api). Recommended for large team-scale monoliths that may later extract to microservices.
- clean-architecture — single-module solution with strict layer dependency inversion (WebApi → Application → Domain). Recommended for smaller projects or strict onion/hexagonal architectures.
socotra.modules[]
layers[]
socotra.shared[]
Shared projects not tied to any specific module but referenceable by any layer.
socotra.host
Host / entry-point project — typically a WebApi or Worker that references module Api projects.
Reference resolution
Glob patterns support * (single-segment) and ** (multi-segment).
ProjectType enum
Package format
packages:
- "FluentValidation:11.9.2"
- "Microsoft.EntityFrameworkCore.SqlServer:8.0.0"
- "Serilog.AspNetCore:8.0.0"Both PackageId and Version are validated against NuGet naming conventions (SCT-009).
Schema migration: 1.0 → 1.1
socotra.architecturefor constraint enforcementsocotra.sharedfor cross-module shared projectssocotra.hostfor explicit entry-point projectsallowedDependenciesfor fine-grained layer access
Use socotra migrate to upgrade a 1.0 file. The original is backed up with a .bak extension.
Schema 1.1 · CLI 1.0