Skip to content

Projects

Projects

Eleven pieces, listed inside-out. Each may only depend on the ones above it.

In plain words

This page lists the eleven pieces the code is split into (the .NET projects and the React front end), from the innermost out, and says what each one holds. Each piece may only depend on the ones listed above it.

What that is worth: a developer can tell where a change belongs and what it may touch before opening a file, and the organization can swap a storage adapter without rewriting the rules above it.

TheYard.Data

The innermost ring and the language every other layer speaks: the pure data records, Vehicle exactly as it appears in data/vehicles.json, and PhotoEntry from the photo manifest. Sealed records, value equality, zero dependencies, zero behavior. If it computes anything, it doesn't belong here.

TheYard.Database

The SQL Server schema, hand written, compiled to a DACPAC. The authority for what the database is.

TheYard.Domain

The business rules, as pure functions over Data: AuctionSchedule derives each vehicle's auction window from its id, BidRules owns increments, validation, and the buy-now override, VehicleFilter is the search predicate, VehicleOrdering ranks results, StandingRules holds the one rule for raising a vehicle's shown price over a bid (RaisedTo) and whether its reserve is met (Reserve), VehicleSearchIndex holds the lowercase text a search matches against, Fnv1a is the hash the schedule derives from, and PhotoGallery picks deterministic galleries. Every rule that needs the time takes its clock as an argument (AuctionClock), so it is testable with a fixed timestamp and no mocking.

TheYard.Application

The use cases, and the seams. Every request is a query or a command with one handler under Features/<Slice>/ (ADR-115: A request is a query or a command). One store's auction is three parts, each behind a reading and a writing interface: Stock plans every listing, facet and by-id read as queries against the store's catalogue, and fills an empty store from the seed once (ADR: The store does the work); BidBook holds the buyer's bid state, read from the database at startup and written through on every accepted bid; Room is the simulated room. StandingReader reads a vehicle through all three in the one order the rules need, and BidsOf gives a buyer's bids as BidViews; it hands the bid and room overlay to Stock.SearchAsync, which applies it before filtering, so prices never disagree with the listing. Both consume data through the auction's ports (IVehicleCatalogue, IVehicleSource, IPhotoManifestSource, IBidStore): the interfaces that make Infrastructure swappable and the tests trivial to fake. Beside them sit the operator's ports, which the Admin tab and the account flows read through: IActivityStore, ILogStore, IMachineHistory, ICostHistory, IResetLinks, IEmailSender, IStoreExperiment and the rest.

TheYard.Infrastructure

The adapters behind those ports: EF Core over Azure SQL Database or SQLite for the catalogue, the photo manifest, accounts and bids; JsonFileVehicleSource and JsonFilePhotoManifestSource, which deserialize the files on disk that seed a fresh database; and SyntheticVehicleSource decorates a source to expand 200 seeds into 100,000 deterministic records, proof the port design works, since nothing above it changed when the dataset grew 500×. It also holds the Identity user (YardUser), the context factory and the database readings the Admin tab shows (ResourceStats, YardDatabase.PingAsync).

TheYard.Infrastructure.Cosmos

The auction's ports, the operator's stores and the account store over Azure Cosmos DB, on the SDK directly, with every operation's request charge written to the store log (ADR: A second store on Cosmos DB, and what it costs). The partition key experiment the Admin tab runs is PartitionExperiment, behind IStoreExperiment.

TheYard.Migrations.Sqlite

The SQLite schema's history, applied by the process that uses it.

TheYard.Experiment

A console tool: seeds the 100,000-document catalogue and runs the partition key's query set in paired rounds (ADR: The partition key).

TheYard.Api

The host and the composition root, cut into vertical slices (ADR: The onion cut into vertical slices): Features/<Slice>/ holds one feature's routes and its own services, with a Module.cs that registers and maps it; Shared/ holds what every slice shares, the registration steps and the request pipeline (Shared/Wiring/RequestPipeline.cs), the hosted services (Shared/Hosted/) and the guest sites (Shared/Sites/); Program.cs registers the shared parts by name and loops over the modules, and each route asks one Application handler; Features/Vehicles/VehicleQueryParams binds and validates GET parameters, Clocks builds the request's clock (now, and the UTC midnight that began the day, the same for every caller), and VehicleWire stamps server-derived auction facts onto each outgoing vehicle. Endpoints contain no logic, only binding and delegation.

TheYard.Tests

One suite per ring: Domain rules with fixed clocks, Application services with in-memory fakes at the ports, Infrastructure against both fixtures and the real dataset, and integration tests that boot the actual host in-memory (WebApplicationFactory) to verify routes, parameters, error paths, and the full bid lifecycle, with no running server required. OnionTests reads the compiled assemblies and fails the gate when a dependency points outward (ADR: Onion and SOLID, how this codebase holds them). How many tests there are is counted in the README.

The rings, as that test reads them from the compiled assemblies, one fact per ring:

/// <summary>The namespaces every ring may use: the .NET base class library and nothing else.</summary>
private const string BaseClassLibrary = "System";

/// <summary>
/// The tracker the coverage collector writes into every assembly it measures. CI runs these
/// tests with coverage on, so without this the rings would fail on code nobody wrote.
/// </summary>
private const string CoverageTracker = "Coverlet.Core.Instrumentation";

/// <summary>
/// The parts of the base class library that reach the disk, the network or a database. The
/// rules above allow the whole library, so these are held out of the inner rings by name.
/// </summary>
private static readonly string[] TheDiskAndTheNetwork =
[
    "System.IO.File", "System.IO.Directory", "System.IO.FileStream", "System.IO.StreamReader", "System.IO.StreamWriter",
    "System.IO.FileInfo", "System.IO.DirectoryInfo", "System.IO.FileSystemInfo", "System.IO.Compression", "System.IO.MemoryMappedFiles", "System.IO.Pipes",
    "System.Net", "System.Data",
];

/// <summary>What a rule that takes everything it needs as a value never reads for itself: a clock, a process, a type found by its name.</summary>
private static readonly string[] TheMachine = ["System.Random", "System.TimeProvider", "System.Environment", "System.Diagnostics.Stopwatch", "System.Diagnostics.Process"];

[Fact]
public void Data_depends_on_nothing_outside_the_BCL()
{
    var result = InRing(typeof(Vehicle), "TheYard.Data")
        .ShouldNot().HaveDependencyOtherThan(BaseClassLibrary, CoverageTracker, "TheYard.Data")
        .GetResult();
    Assert.True(result.IsSuccessful, Explain(result));
    // System is allowed whole, so the disk, the network and the machine are held out by name.
    var reaches = InRing(typeof(Vehicle), "TheYard.Data").ShouldNot().HaveDependencyOnAny([.. TheDiskAndTheNetwork, .. TheMachine]).GetResult();
    Assert.True(reaches.IsSuccessful, Explain(reaches));
    Assert.Empty(TypeLookups(typeof(Vehicle).Assembly.Location, "TheYard.Data"));
}

[Fact]
public void Data_has_no_behaviour()
{
    // Pure records (CLAUDE.md): a property, a constructor, what the compiler writes for a record,
    // and nothing else. A computed rule in Data is a second Domain nobody tests as one.
    Assert.Empty(Behaviour(typeof(Vehicle).Assembly.Location));
}

[Fact]
public void Domain_depends_on_nothing_outside_the_BCL_and_Data()
{
    var result = InRing(typeof(BidRules), "TheYard.Domain")
        .ShouldNot().HaveDependencyOtherThan(BaseClassLibrary, CoverageTracker, "TheYard.Data", "TheYard.Domain")
        .GetResult();
    Assert.True(result.IsSuccessful, Explain(result));
}

[Fact]
public void Application_depends_only_on_Domain_Data_and_the_BCL()
{
    var result = InRing(typeof(StandingReader), "TheYard.Application")
        .ShouldNot().HaveDependencyOtherThan(BaseClassLibrary, CoverageTracker, "TheYard.Data", "TheYard.Domain", "TheYard.Application")
        .GetResult();
    Assert.True(result.IsSuccessful, Explain(result));
}

[Fact]
public void Domain_never_reaches_the_disk_the_network_or_the_clock()
{
    // A rule is a function of what it is handed: the vehicle, the bids and the clock. Reading
    // the time, a random number or a file itself would make it untestable with a fixed clock.
    var result = InRing(typeof(BidRules), "TheYard.Domain")
        .ShouldNot().HaveDependencyOnAny([.. TheDiskAndTheNetwork, .. TheMachine])
        .GetResult();
    Assert.True(result.IsSuccessful, Explain(result));
    Assert.Empty(ClockReads(typeof(BidRules).Assembly.Location, "TheYard.Domain"));
    Assert.Empty(TypeLookups(typeof(BidRules).Assembly.Location, "TheYard.Domain"));
}

[Fact]
public void Application_never_reaches_the_disk_or_the_network()
{
    // A use case reaches a store or a service through a port; the disk and the network belong
    // to the adapters behind those ports.
    var result = InRing(typeof(StandingReader), "TheYard.Application")
        .ShouldNot().HaveDependencyOnAny(TheDiskAndTheNetwork)
        .GetResult();
    Assert.True(result.IsSuccessful, Explain(result));
}

[Fact]
public void The_document_store_adapter_borrows_only_the_shared_user_from_the_relational_one()
{
    // Identity's user entity is the one type both stores keep accounts as. Anything else from
    // the relational adapter, and Entity Framework above all, stays on its own side.
    string[] relational = typeof(YardDbContext).Assembly.GetTypes()
        .Where(type => type.IsPublic && type != typeof(YardUser))
        .Select(type => type.FullName!)
        .Append("Microsoft.EntityFrameworkCore")
        .Append("Microsoft.AspNetCore.Identity.EntityFrameworkCore")
        .Append("Microsoft.Data")
        .ToArray();
    var result = Types.InAssembly(typeof(CosmosStore).Assembly)
        .ShouldNot().HaveDependencyOnAny(relational)
        .GetResult();
    Assert.True(result.IsSuccessful, Explain(result));
}
[Fact]
public void Infrastructure_adapts_and_decides_nothing()
{
    // An adapter turns a port's call into a store's and back. The web (beyond Identity's user
    // store) is the host's, and a rule about money is the Domain's: an adapter method that takes a
    // price or a bid by name and compares it, or reads a vehicle's price and compares it, is a
    // second copy of BidRules that no Domain test sees.
    var found = new List<string>();
    foreach (var adapter in new[] { typeof(YardDbContext).Assembly, typeof(CosmosStore).Assembly })
    {
        using var module = ModuleDefinition.ReadModule(adapter.Location);
        found.AddRange(module.GetTypeReferences()
            .Where(reference => reference.Namespace.StartsWith("Microsoft.AspNetCore", StringComparison.Ordinal) && !reference.Namespace.StartsWith("Microsoft.AspNetCore.Identity", StringComparison.Ordinal))
            .Select(reference => $"{adapter.GetName().Name} uses {reference.FullName}"));
        found.AddRange(MoneyDecisions(module));
    }
    Assert.True(found.Count == 0, string.Join(Environment.NewLine, found.Distinct()));
}

Live from api/TheYard.Tests/OnionTests.cs, region rings, read from this build at 99df7a8.

Frontend (src/)

React + TypeScript, deliberately thin. No business math runs in the browser:

  • main.tsx: entry point, read like Program.cs: one line per part with its file beside it. lib/adminKey.ts keeps the operator's key before the address bar is tidied, styles/globalStyles.ts loads the stylesheets in order, app/reportUncaughtErrors.ts reports crashes no boundary sees, and app/mount.tsx puts the site on the page: it takes over the landing page the build drew with hydrateRoot, or draws any other address with createRoot. The site itself, App inside the error boundary, is app/TheYard.tsx, the one tree the browser and the build both draw.
  • app/: the app shell. App.tsx is the composition root and reads like a table of contents: one line per hook, then the view the address names inside Shell.tsx (the frame), with Header.tsx, Footer.tsx and InventoryView.tsx beside it. app/hooks/ holds what the app knows, one file each: useAddressBar (view state and URL sync, the only writer of the address bar, Back and Forward), useNavigation (opening and closing views, focus, the announcement), useInventory (the debounced fetch effect and Load More, with useListingRefresh beside it), useOpenVehicle, useAccount, useRail and useRunningBuild.
  • library/: the documents the site serves, as data. records.ts (every decision record), pages.ts (every other document), documents.ts (the two joined, and the DocKey worked out from them), sections.ts (what each sidebar section holds), addresses.ts (?doc= both ways) and DocDialog.tsx (this dialog). Named library because the repository root already has docs/ for the markdown.
  • components/: presentation only, a folder per component with its .module.css when it has one. FilterBar, InventoryGrid, VehicleCard, VehicleDetail, BidPanel, the badge trio (ConditionBadge, TitleStatusBadge, ReserveBadge), AuctionCountdown, VehicleImage (graceful fallback).
  • hooks/: React-aware orchestration. useBids (relays bid actions to the API, mirrors the bid map), useNow (the one shared clock every countdown ticks on) and useMediaQuery (true while the window matches a media query, following resizes).
  • lib/: pure, framework-free modules with their unit tests beside them.
    • types.ts: the Vehicle wire shape, including the server-derived auction facts.
    • data.ts: the single API seam. Query building, the TTL response cache, request aborts, bid POSTs.
    • inventory.ts: filter and sort state, and its URL to GET-parameter serialization.
    • auction.ts: status recomputation from server-sent windows, reserve display.
    • format.ts: currency, odometer, countdown, and date formatting (one CURRENCY/LOCALE constant).
  • styles/colors.css, sizes.css, typography.css, effects.css: every design token, in the file named for what it controls. The Urban slate palette lives in colors.css (ADR-016): a light gray ground, brown-gray text, a teal accent with dark green and gold (ADR-016, addendum), every text and ground pair measured against WCAG AA by a unit test (colors.test.ts). A reskin is one file.
  • tests/e2e/ (repo root): Playwright smokes that prove the whole stack end to end.

Its architecture

The backend is an onion because the rules live there; the frontend keeps the onion's one load-bearing idea, imports only point inward, without the ceremony, because its core intentionally moved server-side. Three rings, enforced by a single convention:

components/   outer ring: presentation only, consumes hooks and lib
    ▼
hooks/        middle ring: React-aware orchestration (useBids, useNow)
    ▼
lib/          inner ring: pure functions and the API seam, imports NO React,
              so it unit-tests in Node with no rendering and no mocks

app/App.tsx is the composition root, the same role Program.cs plays on the API side, wiring the rings together; the view state it used to hold is in app/hooks/. And lib/data.ts is a genuine port: when data moved from a JSON import to an API to a paged API, every change landed in that one file.

Beside the projects: samples/

samples/theshed is The Shed, a sample that is not one of the eleven pieces: its own solution (TestProject.sln, net11.0, controllers, a page in TypeScript compiled by tsc alone), its own tests, its own twelve records served from its own running app; since 19 October it is built into TheYard's image and served by the one web app on its own name (Shared/Sites/HostedSiteMount.cs, ADR-105). It was built as a developer test project in September 2026 on the starter that came with it, in this project's working method: dependencies inward in four folders instead of five projects, sealed records on the wire, a problem document on every failure, a rules table beside the tests that hold it, and the palette carried over. Nothing in it is referenced by TheYard and nothing in TheYard is referenced by it; the repository's own tests skip the folder, because the sample holds its own copies of the rules. Live at theshed.stevenstout.biz; start at samples/theshed/README.md.

Where to start reading

  • docs/app-architecture/ARCHITECTURE.md: the layers, the rules that keep them, and where a change goes (served as Architecture overview under App Architecture).
  • docs/app-architecture/STYLE.md: naming, layering and commenting rules, with .editorconfig enforcing the mechanical half.
  • ADR: Program.cs, explained and ADR: The React configuration, explained walk the two entry points line by line; ADR: The tests, explained walks the three suites.
Store

The Yard, home

Steven StoutStaff .NET engineerRemote

Production .NET that stays up. Built with AI, measured on every version.

Steven Stout

Hi, I'm Steve. I build the systems that make delivery boring in the best way, then coach people inside them.

  • 200+

    production releases, none took the platform down

    Conway Investment Research, 2019 to 2024. Sole engineer for the first three years on a live financial advisory platform.

    See how
  • 50%

    shorter release cycle

    Storee Construction, 2024 to 2026. Four ASP.NET applications onto one .NET 10 platform on Azure, with a four-person team I hired and mentored.

    See how

01Verified

Steven Stout

A real person, and the work is mine.

  • Identity

    Checked by LinkedIn, not by me.

    LinkedIn verified my government ID.

  • Running system

    You are looking at it.

    Version 1.0.5.273 is live. Nothing ships unless it passes the automated gates first.

That's who I am. Here's how I work.

02Strengths

Ten strengths, each with the proof beside it. The numbers match my resume and LinkedIn, and the live ones are read from this site as you look.

  • 01

    Keeps production alive

    200+ releases on a live financial platform, and none took it down. Sole engineer for the first three years.

    See the Conway work

  • 02

    Simplifies messy systems

    Four ASP.NET applications onto one .NET 10 platform on Azure, and a release cycle 50% shorter.

    See the Storee work

  • 03

    Marries dev and infrastructure

    Blue-green releases at Storee that flipped in about 5 seconds with nobody signed out, and Azure Front Door at two employers.

    See this site's cloud

  • 04

    Designs data that holds up

    White-label clients on one shared database, the isolation built into the data, and no cross-client issues.

    See the Conway work

  • 05

    Keeps AI-written code honest

    15 quality numbers that may only improve: 273 releases in a row with none worse.

    See the quality numbers

  • 06

    Resourceful

    $30,000+ cut from Azure and vendor spend at Conway. This site's Azure bill is public, resource by resource.

    See the bill

  • 07

    Builds people up

    Hired and mentored a four-person team. 13 colleagues recommend me by name.

    Read the recommendations

  • 08

    Takes ideas to production

    This site: designed, built and run solo, with 352 versions measured through one gate.

    How it was built

  • 09

    Writes clearly

    Posts on real engineering problems, in plain words.

    Read the blog

  • 10

    Owns decisions

    153 decision records, each with its tradeoff and the call I made.

    See the decision records

Built with AI. Gated so quality never slides.

Steven Stout’s showcase: a used-vehicle auction on .NET and React, built and run by one engineer, live on Azure, with its decisions written down.

No quality number has gotten worse at any release since 1.0.5.1 on 10 November: 273 releases in a row.

One engineer, an AI agent and a gate that checks 15 quality numbers on every release. 352 versions measured, with every result public, the worst days included.

82 releases in the last 7 days, each through the same gate.

Async methods with no CancellationToken, may only fall

11091.0.3.1391.0.5.2731.0.4.115, the ratchet
Every number, on the Quality page

TheYard, right nowLive

Answering in

unread

02505007501,000

server time at p95, the usual five minutes of the last day.

Azure this month

unread

the bill, by resource, read from Azure. The Admin tab shows every line.

Since the last roll

unread

 

rolled in place by the pipeline, behind one gate.

People who have visited

unread

30 days agotoday

Scanners, my own tools' and my own reads left out.

03Start here

04Where teams are heading

How I see engineering with AI, and the setup on this site that backs it.

AI-augmented teams · Architecture and ownership

AI writes more of the code. Someone still has to own what ships.

Teams are going to be heavily AI-augmented. That moves the senior job toward architecture and technical ownership: deciding what to build in pieces small enough to verify, and owning what ships.

  • Task tracking will get automated too. Judgment stays human: seeing a design fail at scale before it does.
  • On this site the AI's first design held the whole catalogue in memory. I caught it when the App Service plan hit 82 per cent and moved the work to the store.

What the AI wrote, what I decided

07Tech stack

  •    
  •    
  •    

Read from the build, never typed by hand

What TheYard runs on

What we use, where it runs, its AWS twin, the version as built, and the file that proves it.

Cloud patterns, not one vendor: every Azure piece in this stack has a named AWS twin. Mapped, not yet run on AWS.

  • .NET 1114 projects
  • React 19.3TypeScript 7.0
  • Azure9 Bicep files
  • 11GitHub Actions workflows
The whole stack, with the file that proves each line

The last release the gate stopped was 1.0.5.258 on 2 December, at its browser 1 of 2 job.

08How it is built

09How it is run

10Who and why

Next step

11What has to work, where is it today, and what does success look like?

Book 20 minutes opens an email to me with those three questions in it, and I answer with a time.

Book 20 minutes

Your email app should have opened with this message. If it did not, copy it and send it from any mailbox.

Or message me on LinkedIn