Skip to content

Repository files navigation

SIT API Gateway

Overview

Central API Gateway for the SIT POS microservices architecture.

Features

  • Request routing and proxying
  • Authentication and authorization
  • Rate limiting
  • Circuit breaker pattern
  • Service health monitoring
  • Request/response logging
  • CORS handling
  • Request ID tracking

Setup

Prerequisites

  • Node.js 18+
  • Redis 7+

Installation

  1. Install dependencies:
npm install
  1. Copy environment variables:
cp .env.example .env
  1. Update .env with service URLs

  2. Start the gateway:

npm run dev

API Routes

All routes are prefixed with /api/v1/

Service Routes

  • /auth/* → Auth Service (port 3001)
  • /merchant/* → Merchant Service (port 3002)
  • /catalog/* → Catalog Service (port 3003)
  • /cart/* → Cart Service (port 3004)
  • /payment/* → Payment Service (port 3005)
  • /reports/* → Reporting Service (port 3006)

Gateway Routes

  • GET /health - Gateway and services health
  • GET /api/v1/services - Service discovery
  • GET /api/v1/status/circuit-breakers - Circuit breaker status

Docker

Build and run:

docker-compose up --build

License

Proprietary

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages