{"id":29605740,"url":"https://github.com/mazen-r/event-driven-microservices","last_synced_at":"2026-04-09T12:34:49.655Z","repository":{"id":49719710,"uuid":"511523767","full_name":"mazen-r/event-driven-microservices","owner":"mazen-r","description":"Event Driven Microservices.","archived":false,"fork":false,"pushed_at":"2023-08-05T17:52:29.000Z","size":34,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-08-05T18:41:49.274Z","etag":null,"topics":["django","docker","flask","mysql","python","rabbitmq"],"latest_commit_sha":null,"homepage":"","language":"Python","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/mazen-r.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}},"created_at":"2022-07-07T12:44:04.000Z","updated_at":"2023-08-05T18:41:49.275Z","dependencies_parsed_at":"2022-09-06T07:31:15.629Z","dependency_job_id":null,"html_url":"https://github.com/mazen-r/event-driven-microservices","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/mazen-r/event-driven-microservices","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mazen-r%2Fevent-driven-microservices","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mazen-r%2Fevent-driven-microservices/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mazen-r%2Fevent-driven-microservices/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mazen-r%2Fevent-driven-microservices/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mazen-r","download_url":"https://codeload.github.com/mazen-r/event-driven-microservices/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mazen-r%2Fevent-driven-microservices/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266152831,"owners_count":23884599,"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":["django","docker","flask","mysql","python","rabbitmq"],"created_at":"2025-07-20T16:07:17.408Z","updated_at":"2025-12-30T22:07:01.510Z","avatar_url":"https://github.com/mazen-r.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Event Driven Microservices\n\n## Tech:  \n\n- Python\n- Django\n- Flask\n- SQLAlchemy\n- MySQL\n- RabbitMQ\n- Docker\n\n## System Architecture  \n\n![diagram](https://user-images.githubusercontent.com/73492002/182219050-71557077-350e-4d31-b52d-a53c5e88948c.PNG)\n\n\n## Overview\nThe app is divided into 2 main microservices:  \n\n- Admin\n  - Allows CRUD operations on products using Django REST\n  - Produces Products' data via RabbitMQ to the main service\n  - Consumes RabbiMQ messages from the main service to pefrom updates on products\n\u003cbr\u003e\n- Main  \n  - Allows to Edit/Delete/Like products where it's updated in the main serivce  \n  - Consumes products' data and save it into Flask's db using SQLAlchemy\n  - Produces events to update data in the admin service\n  \n## How to run the app\n- Main\n  - cd into the main directory and spin up the server using docker:  \n  `docker-compose up --build`\n  - ssh into the backend container:  \n  `docker-compose exec backend ssh`  \n  - Create migration files:  \n  `python manager.py db init`  \n  - Apply the db migrations :  \n  `python manager.py db migrate`  \n  `python manager.py db upgrade`\n- Admin\n  - cd into the admin directory and spin up the server using docker:  \n  `docker-compose up --build`\n  - ssh into the backend container to:  \n  `docker-compose exec backend ssh`\n  - Migrate Django's models into the db:  \n  `python manage.py makemigrations`  \n  `python manage.py migrate`\n\n## Endpoints\n- Main\n  - GET `/api/products` Fetch all products from admin db\n  - POST `/api/products/\u003cint:id\u003e/like` Like a product\n- Admin\n  - GET `/api/products` Get all products\n  - POST `/api/products` Create a new product\n  - GET `/api/products/\u003cstr:pk\u003e` Get one product\n  - PUT `/api/products/\u003cstr:pk\u003e` Update product\n  - DELETE `/api/products/\u003cstr:pk\u003e` Delete product\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmazen-r%2Fevent-driven-microservices","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmazen-r%2Fevent-driven-microservices","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmazen-r%2Fevent-driven-microservices/lists"}