Skip to content

Building BFF (Backend for Frontend) of hipotetically simple e-commerce with NodeJS (Fastify), using Cache (Redis), and Circuit Breakers (Opossum). 📿

Notifications You must be signed in to change notification settings

kouyxi/bff-teikei

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BFF - MarketPlace Example

This project is a learning exercise focusing on implementing a Back-End For Front-End (BFF) with Circuit Breaker and Cache mechanisms using Typescript, Node.js + Fastify, Opossum, and Redis.

Purpose

This project aims to deepen understanding of fault-tolerance strategies and caching mechanisms in distributed systems.
It serves as a practical exploration of building resilient and performant applications, particularly in a microservices architecture.

Features

Circuit Breaker: Prevents cascading failures by monitoring downstream services and opening the circuit if failures exceed a threshold.
Cache with Redis: Improves performance by storing frequently accessed data in memory and serving it quickly without hitting the upstream services unnecessarily.

Getting Started

$ npm run start
$ make products
$ make users
$ make reviews

Example Routes (curl)

Get Users: $ curl http://localhost:3000/users
Get User by ID: $ curl http://localhost:3000/users/1
Get Products: $ curl http://localhost:3000/products
Get Product by ID: $ curl http://localhost:3000/Product/1

To get started:

Clone the repository.
Install dependencies with npm install.
Configure Redis connection settings.
Run the application with npm start.

ignore probability and potential errors, i am too shy >.<

About

Building BFF (Backend for Frontend) of hipotetically simple e-commerce with NodeJS (Fastify), using Cache (Redis), and Circuit Breakers (Opossum). 📿

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published