FenixKit MongoDB + Keycloak + Redis .NET Minimal API Starter Kit
.NET 8  ·  .NET 10  — same price

.NET Minimal API
Starter Kit — MongoDB + Keycloak + Redis

The full stack. Persistence, JWT auth, and cache-aside — all wired up and integrated. One docker compose up starts everything.

Use code FIRSTXPEOPLE for €15 off → €40

What's inside.

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

Full MongoDB persistence layer

BaseRepository with 7 hooks, 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 in Swagger carry the token. Pre-built realm means no manual Keycloak setup.

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.

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

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

Everything, no trade-offs.

This kit combines all three layers — persistence, auth, and cache — and wires them together correctly from the start. You don't need to figure out how Keycloak and Redis interact with the repository pattern. It's already done.

Start in under a minute

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

Disable Redis without code changes

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

Private documentation included

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

Valkey compatible

A docker-compose.valkey.yml is included. Run with: docker compose -f docker-compose.valkey.yml up --build. No code changes needed.

One-time payment. Yours forever.

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

55

or €40 with code FIRSTXPEOPLE

Secure checkout via Lemon Squeezy  ·  Instant delivery

Want just persistence? See the MongoDB kit →