This project is a Book Management System built using microservices architecture. It is designed to demonstrate how individual services can communicate through a centralized API Gateway. Each microservice runs independently and handles a specific domain in the system.
| Service Name | Description | Port | 
|---|---|---|
| Author Service | Manages authors (CRUD operations) | localhost:3001 | 
| Book Service | Manages books (CRUD operations) | localhost:3002 | 
| Category Service | Manages categories (CRUD operations) | localhost:3003 | 
| Auth Service | Handles user authentication & authorization | localhost:3004 | 
| API Gateway (bms-api-gateway) | Centralized entry point to access all services | localhost:3005 | 
- Node.js (v16 or higher)
 - npm / yarn
 - MYSQL / PostgreSQL (based on your implementation)
 
bms-project/ │
 ├── author-service/ # Runs on port 3001
 ├── book-service/ # Runs on port 3002
 ├── category-service/ # Runs on port 3003
 ├── auth-service/ # Runs on port 3004
 └── bms-api-gateway/ # Runs on port 3005
Each service should be run independently. Open separate terminal tabs/windows for each.
  cd author-service
  npm install
  npm start
  # Runs on http://localhost:3001  cd book-service
  npm install
  npm start
  # Runs on http://localhost:3002  cd category-service
  npm install
  npm start
  # Runs on http://localhost:3003  cd auth-service
  npm install
  npm start
  # Runs on http://localhost:3004cd bms-api-gateway
npm install
npm start
# Runs on http://localhost:3005- 
Auth service manages JWT-based authentication.
 - 
API Gateway validates incoming tokens and routes requests accordingly.
 - 
Role-based access control (RBAC) can be implemented via the auth-service.
 
- 
Services communicate via HTTP through the centralized API Gateway.
 - 
You can also implement service discovery or use a message broker (e.g., RabbitMQ, Kafka) for event-driven architecture.
 
All requests go through the API Gateway (http://localhost:3005).
Examples:
- 
GET /authors
 - 
POST /books
 - 
GET /categories
 - 
POST /auth/login
 
Developed by Rimanshu Singh