Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

devsaas-devops-examples

Working, runnable code examples that accompany deep-dive articles on devsaas.dev/blog.

Each article on DevSaaS walks through why a problem happens and how to reason about it. This repo is the companion: the actual code you can clone, run with docker compose up, and poke at — so you're not copy-pasting snippets out of a blog post and hoping they work.

Examples

Folder Article What it demonstrates
jwt-revocation-redis/ Revoke a JWT Before It Expires Redis-backed token blacklist with automatic TTL cleanup
refresh-token-reuse-detection/ Detecting Refresh Token Reuse with Redis Refresh token rotation + reuse detection using Redis token families

Running any example

Each folder is self-contained:

cd jwt-revocation-redis
docker compose up -d      # starts Redis
npm install
npm start

Every example folder has its own README with the exact endpoints to hit and what to expect.

Why this repo exists

Most "JWT tutorial" code online either skips revocation entirely or hand-waves the storage layer. These examples show the actual Redis data structures, TTL strategy, and edge cases (clock skew, race conditions on logout, token family invalidation) that the DevSaaS articles discuss in depth.

Stack

  • Node.js 20+
  • Express
  • Redis 7 (via ioredis)
  • Docker Compose for local Redis

License

MIT — use it, fork it, adapt it to your own stack.

More

Full write-ups, troubleshooting guides, and architecture breakdowns: devsaas.dev/blog

About

Runnable code examples for devsaas.dev articles — Redis-backed JWT revocation and refresh token reuse detection with Express + Docker Compose.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages