squid-std is a batteries-included standard library for .NET, distilled from years and years of building real-world server software. Instead of re-solving the same problems on every project, it bundles the foundations you reach for again and again behind small, well-defined contracts:
- Security & hashing — password hashing and verification (
HashUtils), AES-GCM secret protection and a pluggable secret store (ISecretProtector/ISecretStore). - Configuration — a YAML-backed config manager with section registration and environment-variable expansion.
- Serialization — unified JSON/YAML utilities (
JsonUtils,YamlUtils) and a sharedIDataSerializer/IDataDeserializer. - String & platform helpers — case converters (camel/kebab/snake/pascal/…), network, version, platform and resource utilities.
- Runtime services — DI bootstrap, event bus, job system, timer/cron scheduler, metrics and storage.
- Infrastructure modules — messaging (in-memory + RabbitMQ), caching (in-memory + Redis), database access, networking (TCP/UDP) and Lua scripting.
Everything is modular: take only the packages you need, each behind a clean abstraction with an in-memory implementation for tests and an external backend for production.
- .NET 10 SDK
- Docker — only for running the integration tests (Testcontainers spin up RabbitMQ and Redis).
dotnet add package SquidStd.Services.Core
dotnet add package SquidStd.Cachingusing SquidStd.Caching.Abstractions.Interfaces;
using SquidStd.Caching.Extensions;
using SquidStd.Services.Core.Services.Bootstrap;
// Create the bootstrapper (registers the core services), then opt into the modules you need.
var bootstrap = SquidStdBootstrap.Create()
.ConfigureServices(container => container.AddInMemoryCache());
await bootstrap.StartAsync();
var cache = bootstrap.Resolve<ICacheService>();
await cache.SetAsync("answer", 42, TimeSpan.FromMinutes(5));
var answer = await cache.GetAsync<int>("answer");
await bootstrap.StopAsync();SquidStdBootstrap owns a DryIoc container, wires the core services, and drives the
StartAsync / StopAsync lifecycle of every registered ISquidStdService. Use RunAsync to
block until cancellation for long-running hosts.
- Felix Network — a standalone secure binary
mesh-networking library for .NET (and a constrained C/ESP32 target): AES-256-GCM encrypted,
optionally DEFLATE-compressed messages over ENet (reliable UDP) behind a portable frame, with an
optional self-forming mesh layer and a pluggable transport (
ITransport). Published asSquidStd.Felix,SquidStd.Felix.MemoryPack,SquidStd.Felix.MeshandSquidStd.Felix.Transport.Serialon NuGet. See the Felix Network guide for an overview.
squid-std follows a few consistent principles across every module:
- KISS — small, focused types; one class / record / enum per file.
- Abstractions first — each capability is split into an
*.Abstractionspackage (interfaces, DTOs, shared facade) plus one or more provider packages. Consumers depend on the abstraction. - In-memory + external provider — every infrastructure module ships an in-memory provider (great for tests and local dev) and a production backend behind the same interface (messaging: in-memory / RabbitMQ; caching: in-memory / Redis).
- DI-driven — services are registered with DryIoc through
AddXxx(...)extensions and resolved throughSquidStdBootstrap, which manages theISquidStdServicelifecycle. - Convention over restructure — interfaces under
Interfaces, DTOs underData, enums underTypes, internals underInternal. SeeCODE_CONVENTION.md.
Full API documentation is published with DocFX to GitHub Pages: tgiachi.github.io/squid-std. Each package also ships its own README (linked in the table above).
dotnet build SquidStd.slnxdotnet test SquidStd.slnxIntegration tests (RabbitMQ, Redis) need Docker running; they use Testcontainers to start disposable containers automatically.
- Work happens on
develop;mainholds released code. - Use Conventional Commits for messages
(
feat:,fix:,refactor:,docs:,build:,test:). - Follow the project conventions in
CODE_CONVENTION.md. - Add tests for new behaviour and keep the suite green before opening a PR.
Releases are automated with semantic-release: version numbers and the changelog are derived from the conventional-commit history, and the NuGet packages are published on release. Package versions follow Semantic Versioning.
MIT - see LICENSE.