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
Tech stack
BaseRepository with 7 hooks, offset + cursor pagination, ErrorOr result pattern, RFC 7807 error handler, health checks, Swagger with XML docs, Docker Compose.
Token validation through Keycloak's OIDC discovery endpoint. Role-based policies (Authenticated, AdminOnly). 401 and 403 responses return ProblemDetails.
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.
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.
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.
Four checks: API liveness, MongoDB, Keycloak, Redis. All exposed via /health/live and /health/ready.
Why this kit
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.
Copy .env.example to .env, run docker compose up --build. MongoDB, Keycloak, Redis, and the API all start together.
Set Cache:Enabled = false and NullCacheService takes over. The Redis health check is removed automatically. Useful for simpler deployments.
Detailed docs covering the architecture, configuration reference, and notes. Delivered with the ZIP alongside the public GitHub docs.
A docker-compose.valkey.yml is included. Run with: docker compose -f docker-compose.valkey.yml up --build. No code changes needed.
Pricing
Full source code, private docs, unlimited projects, entire team included.
or €40 with code FIRSTXPEOPLE
Secure checkout via Lemon Squeezy · Instant delivery
Want just persistence? See the MongoDB kit →