{"id":50148677,"url":"https://github.com/nevin100/backend-microservices-project","last_synced_at":"2026-05-24T07:02:34.764Z","repository":{"id":339430720,"uuid":"1130878491","full_name":"Nevin100/Backend-Microservices-Project","owner":"Nevin100","description":"A fully Dockerized Microservices-based backend system built using Node.js, Express, MongoDB, Redis, RabbitMQ, Cloudinary, and JWT Authentication following scalable production-grade architecture.","archived":false,"fork":false,"pushed_at":"2026-02-19T16:42:36.000Z","size":248,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-19T20:15:11.369Z","etag":null,"topics":["amqp","api-versioning","argon2","cloudinary","docker","express","javascript","jwt-authentication","mongodb","mongoose","multer","node","nodemon","proxy-server","rabbitmq","rate","redis","rest-api","winston-logger"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Nevin100.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-09T06:28:35.000Z","updated_at":"2026-02-19T16:42:40.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Nevin100/Backend-Microservices-Project","commit_stats":null,"previous_names":["nevin100/backend-microservices-project"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/Nevin100/Backend-Microservices-Project","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nevin100%2FBackend-Microservices-Project","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nevin100%2FBackend-Microservices-Project/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nevin100%2FBackend-Microservices-Project/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nevin100%2FBackend-Microservices-Project/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Nevin100","download_url":"https://codeload.github.com/Nevin100/Backend-Microservices-Project/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nevin100%2FBackend-Microservices-Project/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33424573,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-23T22:14:44.296Z","status":"online","status_checked_at":"2026-05-24T02:00:06.296Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["amqp","api-versioning","argon2","cloudinary","docker","express","javascript","jwt-authentication","mongodb","mongoose","multer","node","nodemon","proxy-server","rabbitmq","rate","redis","rest-api","winston-logger"],"created_at":"2026-05-24T07:02:30.663Z","updated_at":"2026-05-24T07:02:34.756Z","avatar_url":"https://github.com/Nevin100.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🚀 Backend Microservices Architecture Project\n\nA fully Dockerized Microservices-based backend system built using **Node.js, Express, MongoDB, Redis, RabbitMQ, Cloudinary, and JWT Authentication** following scalable production-grade architecture.\n\nThis project consists of:\n\n- 🧑‍💻 User Service (Authentication \u0026 Authorization)\n- 🖼️ Media Service (Cloudinary + Event Publishing)\n- 📝 Post Service (CRUD + Event Subscription)\n- 🌐 API Gateway (Proxy-based routing)\n- 🐳 Fully Dockerized with Docker Compose\n\n---\n\n# 🏗️ Architecture Overview\n\u003cimg width=\"907\" height=\"597\" alt=\"image\" src=\"https://github.com/user-attachments/assets/a3da4c35-880c-4780-9949-af7b94205b78\" /\u003e\n\n- API Gateway handles routing \u0026 rate limiting\n- Services communicate via **RabbitMQ**\n- Redis used for caching \u0026 rate limiting\n- MongoDB used as database\n- Cloudinary used for media storage\n\n---\n\n# 🛠️ Tech Stack\n\n| Technology | Purpose |\n|------------|----------|\n| Node.js | Backend Runtime |\n| Express.js | Web Framework |\n| MongoDB | Database |\n| Redis | Caching \u0026 Rate Limiting |\n| RabbitMQ | Event-driven communication |\n| JWT | Authentication |\n| Argon2 | Password Hashing |\n| Cloudinary | Media Storage |\n| Docker | Containerization |\n| Docker Compose | Multi-container orchestration |\n| Winston | Logging |\n| AMQP (amqplib) | RabbitMQ integration |\n| API Versioning | Scalable API management |\n| Express Rate Limiter | Request throttling |\n| Proxy Server | API Gateway routing |\n\n---\n\n# 📦 Services Breakdown\n\n---\n\n## 1️⃣ User Service (Authentication Service)\n\n### Responsibilities\n- User Registration\n- Login\n- JWT Access Token generation\n- Refresh Token handling\n- Token Rotation\n- Secure password hashing using Argon2\n- MongoDB Indexing for performance\n\n### Features\n- Access Token + Refresh Token architecture\n- JWT based authentication\n- Argon2 password hashing\n- MongoDB indexing\n- Redis for session/token caching\n- Rate limiting\n- Winston logging\n- Dockerized\n\n---\n\n## 2️⃣ Media Service\n\n### Responsibilities\n- Media Upload\n- Cloudinary Integration\n- Event Publishing via RabbitMQ\n- Like functionality (event-based)\n- AMQP Publisher\n- Route key-based communication\n\n### Features\n- Cloudinary file upload\n- RabbitMQ publishing\n- Redis caching\n- Express rate limiter\n- API versioning\n- Winston logger\n- Dockerized\n\n---\n\n## 3️⃣ Post Service\n\n### Responsibilities\n- Full CRUD operations\n- Subscribe to RabbitMQ events\n- Event-driven architecture\n- Data synchronization\n- Redis caching\n\n### Features\n- RabbitMQ consumer\n- Event-driven updates\n- MongoDB indexing\n- Redis integration\n- Rate limiting\n- Versioned APIs\n- Winston logging\n- Dockerized\n\n---\n\n## 🌐 API Gateway\n\nActs as a reverse proxy server.\n\n### Responsibilities\n- Route requests to services\n- Centralized rate limiting\n- JWT validation middleware\n- Version control\n- Service isolation\n\n### Tools Used\n- http-proxy-middleware\n- Express\n- Redis\n- Winston\n\n---\n\n# 🔐 Authentication Flow\n\n1. User logs in\n2. Server generates:\n   - Access Token (short expiry)\n   - Refresh Token (long expiry)\n3. Access Token used for protected routes\n4. Refresh Token used to generate new access token\n\n---\n\n# 📡 Event-Driven Communication (RabbitMQ)\n\n- Publisher: Media Service\n- Subscriber: Post Service\n- Uses:\n  - Exchange\n  - Queues\n  - Route Keys\n  - amqplib\n\n---\n\n# ⚡ Caching \u0026 Rate Limiting\n\n- Redis used for:\n  - Rate limiting\n  - Caching\n  - Token storage\n- Express rate limiter implemented in all services\n\n---\n\n# 🧠 Indexing\n\nMongoDB indexes implemented for:\n- Email uniqueness\n- Performance optimization\n- Query acceleration\n\n---\n\n# 📁 Project Structure\n```bash\nMicroservices-Project/\n│\n├── api-gateway/\n├── user-service/\n├── media-service/\n├── post-service/\n├── docker-compose.yml\n└── README.md\n```\n\n---\n\n# 🐳 Docker Setup\n\nEach service contains:\n- Dockerfile\n- Environment configs\n- Connected via docker-compose\n\nTo run:\n\n```bash\ndocker compose up --build\n```\n\n# 📊 Logging (Winston)\n\nCentralized structured logging using Winston:\n\n- Error logs\n- Info logs\n- Debug logs\n- Production Ready logging\n\n# 🚀 How to Run Locally\n1️⃣ Clone Repo\n```bash\ngit clone https://github.com/Nevin100/Microservices-Project.git\n```\n\n2️⃣ Setup Environment Variables\nCreate .env in each service:\n```bash\nPORT=\nMONGO_URI=\nREDIS_URL=\nJWT_SECRET=\nCLOUDINARY_CONFIG=\nRABBITMQ_URL=\n```\n\n3️⃣ Start Services:\n```bash\ndocker compose up --build\n```\n# 🔮 Production Ready Features\n\n- ✅ Microservices architecture0\n- ✅ Event-driven communication\n- ✅ Dockerized services\n- ✅ API Gateway\n- ✅ JWT Authentication\n- ✅ Refresh token mechanism\n- ✅ Redis caching\n- ✅ Rate limiting\n- ✅ MongoDB indexing\n- ✅ Cloudinary integration\n- ✅ Structured logging\n- ✅ Versioned APIs\n\n📌 Why This Project?\n\n- This project demonstrates:\n- Advanced backend architecture\n- Distributed system design\n- Event-driven patterns\n- Secure authentication implementation\n- Scalable API design\n- Real-world production practices\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnevin100%2Fbackend-microservices-project","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnevin100%2Fbackend-microservices-project","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnevin100%2Fbackend-microservices-project/lists"}