FenixKit MongoDB + Keycloak + Redis + Garage .NET Minimal API Starter Kit
๐Ÿ”ฅ Most complete
.NET 8  ยท  .NET 10  โ€” same price

.NET Minimal API
Starter Kit โ€” MongoDB + Keycloak + Redis + Garage

The full stack, with file storage. Auth, cache, persistence, and S3-compatible uploads โ€” pre-wired. Three access modes, per-bucket configuration, and one docker compose up starts everything.

Use code FIRSTXPEOPLE for โ‚ฌ15 off → โ‚ฌ50

What's inside.

MongoDB Keycloak JWT Bearer / OIDC OAuth2 PKCE Redis 8 Valkey 7.2 StackExchange.Redis Garage S3 AWS S3 compatible AWSSDK.S3 ErrorOr Docker Compose Swagger / Swashbuckle .NET 8 .NET 10

Full MongoDB persistence layer

BaseRepository with 19 overridable hooks across 5 groups (error, cache key, invalidation, validation, lifecycle, mapping), offset + cursor pagination, ErrorOr result pattern, RFC 7807 error handler, health checks, Swagger with XML docs, Docker Compose.

Keycloak JWT Bearer via OIDC

Token validation through Keycloak's OIDC discovery endpoint. Role-based policies (Authenticated, AdminOnly). 401 and 403 responses return ProblemDetails.

OAuth2 PKCE in Swagger

The Swagger UI Authorize button is wired to the Keycloak PKCE flow. Log in once, and all requests carry the token. Pre-built realm โ€” no manual Keycloak setup needed.

Cache-aware BaseRepository

Redis cache-aside is transparent โ€” your service calls the repository and the cache layer is handled automatically. Tag-based invalidation at three levels keeps the cache consistent.

S3 file storage โ€” three access modes

Public for CDN-served assets with a direct URL. PresignedUrl for time-limited signed links โ€” expiry configured per bucket. Proxy streams the file through the API; the bucket is never exposed. Each bucket gets its own access mode.

Per-bucket configuration

Each bucket is configured independently in appsettings.json โ€” its own access mode, allowed content types, max file size, and credentials. Add as many buckets as your app needs. Compatible with AWS S3, Garage or any S3-compatible backend.

Two test users ready

admin-test and user-test are created in the realm on first boot. Open Swagger, click Authorize, log in, and test role-protected endpoints immediately.

Health checks for all services

Five checks: API liveness, MongoDB, Keycloak, Redis, and S3 storage. All exposed via /health/live and /health/ready.

Everything pre-wired, including storage.

This kit adds a complete S3 file storage layer on top of the full-stack kit. File uploads, access control per bucket, and three different serving strategies โ€” all integrated and ready to use from day one.

Start in under a minute

Copy .env.example to .env, run docker compose up --build. MongoDB, Keycloak, Redis, Garage, and the API all start together.

Self-hosted or cloud storage

Works with AWS S3 out of the box โ€” same SDK, same config shape. Switch to Garage, MinIO, or Cloudflare R2 by changing only the endpoint and credentials. No code changes, no abstraction layers to maintain.

Disable Redis without code changes

Set Cache:Enabled = false and NullCacheService takes over. The Redis health check is removed automatically.

Private documentation included

Detailed docs covering the architecture, S3 configuration reference, access modes, and integration notes. Delivered with the ZIP alongside the public GitHub docs.

One-time payment. Yours forever.

Full source code, private docs, unlimited projects, entire team included.

โ‚ฌ65

or โ‚ฌ50 with code FIRSTXPEOPLE

Secure checkout via Lemon Squeezy  ยท  Instant delivery

Want the full stack without file storage? See the MongoDB + Keycloak + Redis kit →