DotNetCode, part 9: UnifiedShopping — a full-stack e-commerce sample with web, admin and mobile
The largest project in DotNetCode is UnifiedShopping: a complete e-commerce sample — an OEM scarf store called "Silk & Loom" — with a customer web storefront, a separate admin sub-site, and an iOS/Android MAUI app, all sharing one API, one database and one set of domain logic. If you read only one project in the series, make it this one; every pattern from the earlier articles appears in a real job.
The project map
ShopCommon— entities, enums, DTOs, pricing math, coupon-code generation. Zero dependencies; every other project references it.ShopData— EF Core 8 context, migrations, demo seed. SQLite locally, Azure SQL in production, switched by one configuration value.ShopServices— cart, checkout, shipping, admin services, plus seams for payment gateways and carriers. All business rules live here, so every front end gets them for free.ShopApi— the ASP.NET Core minimal API: storefront endpoints,/api/admin/*, webhooks. The single backend both web and mobile talk to.ShopWeb— Razor Pages storefront + admin sub-site (order queue, coupons, carriers), session-based cart, typedHttpClientto the API.ShopMobile— the MAUI app: browse, cart, checkout, order status — the same endpoints as the web.
Seams: the pattern the sample teaches best
Payments and shipping are interfaces with swappable implementations — Stripe and PayPal behind one payment seam; UPS, FedEx, USPS and a custom carrier behind one rate/label seam. The domain code depends on the interface, never the vendor. That is why the same code runs as a demo with fake gateways and as a real store with live ones — the architecture, not luck.
Operations are part of the sample
CI/CD pipelines, coupon generation, an order queue for admins, inventory-aware checkout — the unglamorous parts that actually make a store work. And because it exists as a sample, the production cousin of this code runs the real Silk & Loom store — the sample and the live site share a lineage, which is the strongest argument for writing sample code well.
Repository: github.com/bobhuang1/DotNetCode/tree/master/UnifiedShopping