{"id":31952381,"url":"https://github.com/mubashir15700/microsphere","last_synced_at":"2026-04-06T09:32:29.843Z","repository":{"id":312059739,"uuid":"1046062764","full_name":"Mubashir15700/MicroSphere","owner":"Mubashir15700","description":"Node.js microservices with TypeScript, Docker, MongoDB, MySQL, Redis, RabbitMQ, and a Next.js frontend — featuring API Gateway, auth, task, user, and notification services.","archived":false,"fork":false,"pushed_at":"2025-10-05T03:42:00.000Z","size":384,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-05T05:36:59.697Z","etag":null,"topics":["api-gateway","backend","docker","frontend","husky","jest","microservices","mongodb","nextjs","nodejs","rabbitmq","redis","swagger","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/Mubashir15700.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":"2025-08-28T06:11:57.000Z","updated_at":"2025-09-23T10:15:38.000Z","dependencies_parsed_at":"2025-08-28T15:44:44.220Z","dependency_job_id":"d1d23271-bffa-495c-86f7-1b06ca3d13df","html_url":"https://github.com/Mubashir15700/MicroSphere","commit_stats":null,"previous_names":["mubashir15700/nodejs-microservices","mubashir15700/microsphere"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Mubashir15700/MicroSphere","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mubashir15700%2FMicroSphere","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mubashir15700%2FMicroSphere/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mubashir15700%2FMicroSphere/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mubashir15700%2FMicroSphere/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mubashir15700","download_url":"https://codeload.github.com/Mubashir15700/MicroSphere/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mubashir15700%2FMicroSphere/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279018714,"owners_count":26086605,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"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":["api-gateway","backend","docker","frontend","husky","jest","microservices","mongodb","nextjs","nodejs","rabbitmq","redis","swagger","typescript"],"created_at":"2025-10-14T13:13:58.648Z","updated_at":"2025-12-30T20:05:55.744Z","avatar_url":"https://github.com/Mubashir15700.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🧩 MicroSphere – Node.js Microservices Architecture (TypeScript + Docker)\n\nThis project demonstrates a complete Node.js microservices architecture using TypeScript, Docker, MongoDB, MySQL, Prisma ORM, Redis, RabbitMQ, and Socket.IO, along with a Next.js frontend. It follows clean service boundaries with Auth, User, Task, Notification, and an API Gateway. \n\nServices communicate through REST APIs, asynchronous messaging (RabbitMQ), and real-time WebSocket events (Socket.IO).\n\nThe frontend, built with Next.js + TypeScript and Zustand for state management, is located in the /client folder and is currently under active development.\n\n---\n\n## 🧠 Architecture Overview\n\n- **API Gateway** – Entry point for all requests, handles routing and JWT authentication.\n- **Auth Service** – Manages user registration and login, returns signed JWT tokens.\n- **User Service** – Manages user data in MongoDB, with Redis caching implemented in the \"Get All Users\" API.\n- **Task Service** – Manages tasks in MongoDB, and sends messages to RabbitMQ. Redis caching is used in the \"Get All Tasks\" API.\n- **Notification Service** – Subscribes to RabbitMQ, stores notifications via Prisma (MySQL), and sends real-time notifications to the client using Socket.IO. Redis caching is used in the “Get All Notifications” API.\n- **Client (Next.js)** – React-based frontend using Zustand for global state management and Socket.IO client for real-time notifications.\n- **MongoDB** – Stores persistent data for users and tasks.\n- **Prisma ORM with MySQL** – For notifications persistence.\n- **Redis** – Caching layer for User, Task and Notification services to improve read performance.\n- **RabbitMQ** – Message broker for asynchronous, event-driven communication between services.\n- **Swagger** – API documentation available for backend services.\n- **Husky** – Git hooks for enforcing code quality and pre-commit checks.\n\n---\n\n## 📦 Tech Stack\n\n### 🧰 Backend\n\n- **Node.js** with **Express**\n- **TypeScript**\n- **MongoDB**\n- **MySQL** (for Prisma ORM)\n- **Redis** (used in User, Task and Notification services)\n- **RabbitMQ**\n- **Socket.IO** (real-time communication between Notification Service and client)\n- **JWT Authentication**\n- **Docker \u0026 Docker Compose**\n- **http-proxy-middleware** for API Gateway\n- **Swagger** for REST API documentation\n- **ts-node-dev** for dev mode hot-reload\n\n### 🖥️ Frontend\n\n- **Next.js** (React + TypeScript)\n- **Zustand** – Lightweight state management\n- **Axios** – For API requests\n- **Socket.IO Client** – For receiving real-time notifications\n- **Tailwind CSS**\n- **shadcn/ui** – Accessible, customizable UI components (built on Radix UI \u0026 Tailwind)\n- **Swagger UI** – For API documentation\n\n### 🧪 Dev Tooling\n\n- **Husky** – Git hooks for code linting, pre-commit checks, etc.\n- **ESLint + Prettier** – Code quality and formatting (assumed, can be mentioned if true)\n\n---\n\n## 📁 Project Structure\n\n```\n├── .github/                # 🐙 GitHub Actions/CI workflows\n├── .husky/                 # ⚙️ Git hooks for pre-commit, pre-push\n├── api-gateway/            # 🚪 Centralized routing \u0026 auth handling\n├── auth-service/           # 🔐 Handles registration, login, and JWT\n├── client/                 # 🖥️ Next.js frontend (Zustand + Socket.IO)\n├── notification-service/   # 📣 Notification management (Prisma + RabbitMQ + Socket.IO)\n├── task-service/           # ✅ Task management (MongoDB + Redis)\n├── user-service/           # 👤 User data (MongoDB + Redis)\n├── .gitignore              # 🚫 Git ignore rules\n├── docker-compose.yml      # 🐳 Docker orchestration\n├── package-lock.json       # 🔒 Lock file for dependency versions\n├── package.json            # 📦 Project dependencies \u0026 Husky configurations\n└── README.md               # 📘 Project overview\n```\n\n---\n\n## 🚀 Getting Started\n\n### 🔧 Prerequisites\n\n- [Docker](https://www.docker.com/products/docker-desktop)\n- [Docker Compose](https://docs.docker.com/compose/install/)\n\n---\n\n### ▶️ Run the Project\n\n1. **Clone the Repository**\n\n```bash\ngit clone https://github.com/Mubashir15700/MicroSphere.git\ncd MicroSphere\n```\n\n2. **Start All Services**\n\n`docker-compose up --build`\n\nThis will:\n\n- 🔧 Build Docker images for all services\n- 🐳 Start MongoDB, MySQL, Redis, and RabbitMQ containers\n- 🚀 Launch all backend services with hot-reload enabled via ts-node-dev\n- 🌐 Expose APIs through the API Gateway\n- ⚡ Enable real-time notification streaming via Socket.IO\n\n---\n\n## 📄 Swagger API Documentation\n\nEach backend service exposes Swagger UI for exploring and testing APIs.\n\nℹ️ Swagger docs are available once all services are running via docker-compose up.\n\nService Swagger URL:\n\n- **Auth Service** - http://localhost:3000/auth/api-docs\n- **User Service** - http://localhost:3000/users/api-docs\n- **Task Service** - http://localhost:3000/tasks/api-docs\n- **Notification Service** - http://localhost:3000/notifications/api-docs\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmubashir15700%2Fmicrosphere","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmubashir15700%2Fmicrosphere","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmubashir15700%2Fmicrosphere/lists"}