Skip to content

mostafasayed/backend-patterns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 

Repository files navigation

Senior Backend Engineering Patterns

This repository acts as an entry point to a set of production-ready backend patterns I frequently use when building Node.js microservices.

The actual implementations live as GitHub Gists to keep each concept focused, reviewable, and easy to discuss.


📌 Core Patterns

1️⃣ Idempotent APIs

Ensuring the same request does not produce duplicated side effects.

🔗 https://gist.github.com/mostafasayed/155137f22e6244725077a820d5886b6a


2️⃣ Retry with Exponential Backoff

Handling transient failures without overloading dependencies.

🔗 https://gist.github.com/mostafasayed/bdde10e078e0be7e7decae1f9c81badc


3️⃣ Circuit Breaker

Preventing cascading failures when dependencies are unhealthy.

🔗 https://gist.github.com/mostafasayed/46eb26d8ca2ad93981fbf2a5328805c5


4️⃣ Observability with Correlation IDs (NestJS)

Tracing requests across services.

🔗 https://gist.github.com/mostafasayed/3e5fc7ae88afd654e4822dde7036b667


5️⃣ Transactions with TypeORM

Ensuring atomic operations using QueryRunner.

🔗 https://gist.github.com/mostafasayed/c56bc106fe4cc4ed6c8dece497e7d3f6


6️⃣ Transactions with Prisma

Clean transaction boundaries using $transaction.

🔗 https://gist.github.com/mostafasayed/983e0a4fb96d2c25b4007f18b8695213


Why Gists?

  • One concept per file
  • Clean version history
  • Easy to reference in interviews and discussions

This repo is intentionally minimal and acts as a navigation layer.

About

Backend patterns for real-world Node.js systems.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors