{"id":28376166,"url":"https://github.com/ozturkeniss/3layeredservices","last_synced_at":"2025-06-26T10:31:18.194Z","repository":{"id":282800246,"uuid":"949685893","full_name":"ozturkeniss/3LayeredServices","owner":"ozturkeniss","description":"A robust, Docker-containerized e-commerce platform built with .NET Core 8.0, featuring three scalable microservices (Cart, Product, and Order) interconnected through RabbitMQ message queues, utilizing PostgreSQL for persistent storage and Redis for high-performance caching.","archived":false,"fork":false,"pushed_at":"2025-03-28T02:09:20.000Z","size":52,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-30T00:05:40.271Z","etag":null,"topics":["asp-net-core","docker","docker-compose","microservices","microservices-architecture","rabbitmq","redis"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ozturkeniss.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2025-03-17T01:09:33.000Z","updated_at":"2025-05-13T13:30:01.000Z","dependencies_parsed_at":"2025-05-11T23:28:24.651Z","dependency_job_id":null,"html_url":"https://github.com/ozturkeniss/3LayeredServices","commit_stats":null,"previous_names":["kalzimkholodros/3layeredservices","ozturkeniss/3layeredservices"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ozturkeniss/3LayeredServices","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozturkeniss%2F3LayeredServices","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozturkeniss%2F3LayeredServices/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozturkeniss%2F3LayeredServices/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozturkeniss%2F3LayeredServices/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ozturkeniss","download_url":"https://codeload.github.com/ozturkeniss/3LayeredServices/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozturkeniss%2F3LayeredServices/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262047863,"owners_count":23250430,"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","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":["asp-net-core","docker","docker-compose","microservices","microservices-architecture","rabbitmq","redis"],"created_at":"2025-05-30T00:05:41.371Z","updated_at":"2025-06-26T10:31:18.188Z","avatar_url":"https://github.com/ozturkeniss.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# E-Commerce Microservices\r\n\r\nA robust, Docker-containerized e-commerce platform built with .NET 8.0, featuring three scalable microservices (Cart, Product, and Order) interconnected through RabbitMQ message queues, utilizing PostgreSQL for persistent storage and Redis for high-performance caching.\r\n\r\n```mermaid\r\ngraph TD\r\n    subgraph Services\r\n        PS[Product Service]\r\n        CS[Cart Service]\r\n        OS[Order Service]\r\n    end\r\n\r\n    subgraph Message Broker\r\n        RMQ[RabbitMQ]\r\n    end\r\n\r\n    subgraph Databases\r\n        PSQL[(PostgreSQL)]\r\n        RD[(Redis Cache)]\r\n    end\r\n\r\n    PS --\u003e RMQ\r\n    CS --\u003e RMQ\r\n    OS --\u003e RMQ\r\n    \r\n    CS --\u003e RD\r\n    PS --\u003e PSQL\r\n    CS --\u003e PSQL\r\n    OS --\u003e PSQL\r\n\r\n    RMQ --\u003e|cart_updated| CS\r\n    RMQ --\u003e|order_created| OS\r\n    RMQ --\u003e|product_updated| PS\r\n```\r\n\r\n## Microservices\r\n\r\n### 1. Cart Service\r\n- Port: 5000\r\n- Databases: PostgreSQL and Redis\r\n- Core Functions:\r\n  - Add product to cart\r\n  - Remove product from cart\r\n  - View cart contents\r\n  - Fast access with Redis caching\r\n\r\n### 2. Product Service\r\n- Port: 5001\r\n- Database: PostgreSQL\r\n- Core Functions:\r\n  - Add product\r\n  - Update product\r\n  - Delete product\r\n  - List products\r\n\r\n### 3. Order Service\r\n- Port: 5002\r\n- Database: PostgreSQL\r\n- Core Functions:\r\n  - Create order\r\n  - Update order status\r\n  - List orders\r\n  - View order details\r\n\r\n## Technologies\r\n\r\n- **.NET 8.0**: Main development platform\r\n- **PostgreSQL**: Primary database\r\n- **Redis**: NoSQL database used for caching\r\n- **RabbitMQ**: Message broker for inter-service communication\r\n- **Docker**: Containerization and deployment\r\n- **Docker Compose**: Multi-container management\r\n- **Swagger**: API documentation\r\n\r\n## Getting Started\r\n\r\n### Prerequisites\r\n\r\n- Docker Desktop\r\n- .NET 8.0 SDK\r\n- Git\r\n\r\n### Installation\r\n\r\n1. Clone the project:\r\n```bash\r\ngit clone \u003crepository-url\u003e\r\ncd \u003cproject-folder\u003e\r\n```\r\n\r\n2. Start Docker Desktop\r\n\r\n3. Start the services:\r\n```bash\r\ndocker-compose up -d\r\n```\r\n\r\n### API Endpoints\r\n\r\nAfter starting the services, you can access Swagger documentation at the following URLs:\r\n\r\n- Cart Service: http://localhost:5000/swagger\r\n- Product Service: http://localhost:5001/swagger\r\n- Order Service: http://localhost:5002/swagger\r\n\r\n### Management Interfaces\r\n\r\n- **RabbitMQ Management UI**: http://localhost:15672\r\n  - Username: guest\r\n  - Password: guest\r\n\r\n\r\n## Database Schema\r\n\r\nEach service manages its own database:\r\n- `cartdb`: Cart information\r\n- `productdb`: Product information\r\n- `orderdb`: Order information\r\n\r\n## Message Queues\r\n\r\nMain queues used in RabbitMQ:\r\n- `cart_updated`: When cart is updated\r\n- `order_created`: When new order is created\r\n- `product_updated`: When product stock status changes\r\n\r\n## Contributing\r\n\r\n1. Fork this repository\r\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\r\n3. Commit your changes (`git commit -m 'Add some amazing feature'`)\r\n4. Push to the branch (`git push origin feature/amazing-feature`)\r\n5. Create a Pull Request\r\n\r\n## License\r\n\r\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. \r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fozturkeniss%2F3layeredservices","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fozturkeniss%2F3layeredservices","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fozturkeniss%2F3layeredservices/lists"}