James Wampler wamplerj
  • Bainbridge Island, WA
  • Joined on 2026-03-26

BuyEngine (1.0.0-pre.10)

Published 2026-08-26 21:41:40 -07:00 by wamplerj

Installation

dotnet nuget add source --name wamplerj --username your_username --password your_token https://git.wampler.us/api/packages/wamplerj/nuget/index.json
dotnet add package --source wamplerj --version 1.0.0-pre.10 BuyEngine

About this package

BuyEngine is an open source library for adding e-commerce functionality to new or existing .NET projects.

BuyEngine

CI

BuyEngine is a .NET library designed to provide a simple, but fully-featured, e-commerce capability to new or existing .NET projects using patterns and technologies that are already familiar to .NET developers

Plenty of turnkey e-commerce solutions exist across languages and stacks. But rather than reinventing the wheel building e-commerce into an existing app, or fighting an e-commerce product's plugin/customization model to bend it to your needs, BuyEngine takes a different approach: use your existing toolset and workflow. No custom templating language, no custom execution or hosting model — just a library you add to a normal .NET project.

Roadmap

  • Version 0.1 - Basic Product Management functionality (Products, Suppliers, Brands)
  • Version 0.2 - Cart Management
  • Version 0.3 - SQL Data Provider, Testing Improvements
  • ~~Version 0.4 - Product Browse By Brand, Search
  • ~~Version 0.5 - Payment Processing - Stripe, Paypal, and Square
  • Version 0.6 - Shipping Providers
  • Version 0.7 - Additional Data Providers (MongoDb, CosomoDb)
  • Version 0.8 - API Security and documentation

Further Out

  • L10N
  • Tax Calculators

Configuration

AddBuyEngine is the front door for wiring BuyEngine into a host's IServiceCollection. It registers Catalog + Checkout with their sensible defaults (EF InMemory, store-pickup shipping, PayAtStorePaymentProvider), then hands you a BuyEngineBuilder to opt into providers from add-on packages:

services.AddBuyEngine(cfg =>
{
    cfg.UseSqlServer(sql => sql.ConnectionStringName = "BuyEngine");        // BuyEngine.Data.Sql
    cfg.UseStripeForPayment(pay => pay.ApiKeyName = "Stripe:ApiKey");       // BuyEngine.Payment.Stripe
    cfg.UseWebApi(web => web.HostPrefix = "be-api");                       // BuyEngine.WebApi
});

// ...
app.MapBuyEngineWebApi(); // reads the HostPrefix configured above

Each Use* method lives in the package it configures (core has no reference to BuyEngine.Data.Sql, .WebApi, or any payment package) and is an extension on BuyEngineBuilder, so only the packages you reference show up as options. Use*ForPayment methods are mutually exclusive - configuring a second payment provider throws, matching the "one provider wins" behavior of the underlying IPaymentProvider registration.

*Name-suffixed options (ConnectionStringName, ApiKeyName, ...) are resolved from IConfiguration at first use, so the host can add configuration sources after calling AddBuyEngine. The plain-value options (ConnectionString, ApiKey, ...) are used verbatim - set one or the other, never both.

The original à-la-carte methods (AddCatalogServices(), AddCheckoutServices(), AddSqlDataServices(...), AddStripePaymentServices(...), AddBuyEngineWebApiServices(), ...) remain available for hosts that don't want the builder.

Dependencies

ID Version Target Framework
Microsoft.EntityFrameworkCore 10.0.11 net10.0
Microsoft.EntityFrameworkCore.InMemory 10.0.11 net10.0
Microsoft.Extensions.Caching.Abstractions 10.0.11 net10.0
Microsoft.Extensions.DependencyInjection 10.0.11 net10.0
Microsoft.Extensions.Logging.Abstractions 10.0.11 net10.0
Details
NuGet
2026-08-26 21:41:40 -07:00
3
James Wampler
89 KiB
Assets (2)
Versions (9) View all
0.6.0-pre.12 2026-08-27
0.6.0-pre.11 2026-08-27
1.0.0-pre.10 2026-08-26
1.0.0-pre.9 2026-08-26
1.0.0-pre.8 2026-08-26