{"id":20092698,"url":"https://github.com/aligoren/go_ecommerce_microservice","last_synced_at":"2025-05-06T04:31:51.173Z","repository":{"id":37467084,"uuid":"494864458","full_name":"aligoren/go_ecommerce_microservice","owner":"aligoren","description":"E-Commerce Microservices with Golang and Fiber","archived":false,"fork":false,"pushed_at":"2022-05-29T13:07:21.000Z","size":82,"stargazers_count":117,"open_issues_count":5,"forks_count":15,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-06-19T23:33:05.888Z","etag":null,"topics":["docker","golang","grpc","microservice","rpc"],"latest_commit_sha":null,"homepage":"","language":"Go","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/aligoren.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-05-21T18:29:45.000Z","updated_at":"2024-06-06T19:49:25.000Z","dependencies_parsed_at":"2022-08-02T01:00:05.884Z","dependency_job_id":null,"html_url":"https://github.com/aligoren/go_ecommerce_microservice","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aligoren%2Fgo_ecommerce_microservice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aligoren%2Fgo_ecommerce_microservice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aligoren%2Fgo_ecommerce_microservice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aligoren%2Fgo_ecommerce_microservice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aligoren","download_url":"https://codeload.github.com/aligoren/go_ecommerce_microservice/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224489210,"owners_count":17319935,"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":["docker","golang","grpc","microservice","rpc"],"created_at":"2024-11-13T16:44:21.526Z","updated_at":"2024-11-13T16:44:22.023Z","avatar_url":"https://github.com/aligoren.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# E-Commerce Microservices with Golang\n\nThis is a project just for hobby\n\n## Service Diagram\n\nThis is a service diagram. These are services planned to be implemented\n\n```mermaid\ngraph TD\n\tUI--\u003eBrokerService;\n\tBrokerService--\u003eAuthService;\n\tBrokerService--\u003eMailService;\n\tBrokerService--\u003eProductService;\n\tBrokerService--\u003eCatalogService;\n\tBrokerService--\u003eCartService;\n\t\n\tAuthService--\u003eLoggerService;\n\tAuthService--\u003eAuthPostgresSQL;\n\t\n\tMailService--\u003eLoggerService;\n\tMailService--\u003eMailPostgresSQL;\n\t\n  ProductService--\u003eLoggerService;\n\tProductService--\u003eProductPostgresSQL;\n\t\n\tCatalogService--\u003eLoggerService;\n\tCatalogService--\u003eCatalogPostgresSQL;\n\t\n\tCartService--\u003eLoggerService;\n\tCartService--\u003eCartPostgresSQL;\n\t\n\tLoggerService--\u003eMongoDB;\n```\n\n## UI\n\nAll UI components will be here and served by Fiber. So, you need to run it using this command\n\n### Running\n\n```\ncd ui\n\nmake build-run\n```\n\n## Broker Service\n\nThis is just a basic broker service for now. There are two endpoints, one is optional.\n\n### services.json\n\nThis is a file that contains other microservices and their configs. It's placed in the root folder\n\n### Registered Routes\n\n- GET: `/` -\u003e Returns JSON for index\n- GET: `/api/users` -\u003e Returns all users\n- GET: `/api/users/:id` -\u003e Returns a single user by id\n- GET: `/ping` -\u003e Returns 200 and text/plain result. This route works when you use `HeartBeat` middleware.\n\n### Routes\n\nRoutes can be found under the `routes` folder. `routes.go` file contains middleware configs and handlers. Routes use these handlers.\n\n### Middleware\n\nAll middleware can be found under the `middleware` folder. I created a middleware to demonstrate how you can create your own. Shortly, this middleware adds an ability to show service status. It would be necessary If you use a health check service and need to know your service's status.\n\n### Running\n\n```\ncd broker-service\n\nmake build-run\n```\n\n## Auth Service\n\nThis is an authentication service for now. There are three endpoints, one is optional.\n\n### Registered Routes\n\n- POST: `/api/v1/auth` -\u003e User login route\n- GET: `/api/v1/users` -\u003e Returns all users\n- GET: `/api/v1/users/:id` -\u003e Returns single user\n- POST: `/api/v1/users` -\u003e Creates a new user\n- PUT: `/api/v1/users` -\u003e Updates an existing user\n- DELETE: `/api/v1/users` -\u003e Soft delete an existing user\n- GET: `/ping` -\u003e Returns 200 and text/plain result. This route works when you use `HeartBeat` middleware.\n\n### Routes\n\nRoutes can be found under the `routes` folder. `routes.go` file contains middleware configs and handlers. Routes use these handlers.\n\n### Middleware\n\nAll middleware can be found under the `middleware` folder. I created a middleware to demonstrate how you can create your own. Shortly, this middleware adds an ability to show service status. It would be necessary If you use a health check service and need to know your service's status.\n\n### Models\n\nAll model files can be found under the `models` folder. There are already two models called `models` and `response_models`\n\nThe first one is holding data from database and the second one will use for http responses\n\n### Repository\n\nYou can find repository files in this folder. All repository files should only have database operations, nothing else.\n\nI'm not sure about that should we create a logic folder to separate logic from routes? Aren't handlers for this?\n\n### Running\n\n```\ncd auth-service\n\nmake build-run\n```\n\n## scripts\n\nDocker-related files and others can be found in this folder. I've tried to separate this folder to avoid repeating processes such as docker-compose, database images, .etc\n\n\n## TODO\n\nThere are things to be completed. I should be documented each service. If I do this, I can explain everything to anyone without interaction. (I believe that).\n\nThese are the things I should be completed! And, more will become.\n\n- [ ] UI Service\n- [ ] Broker Service\n- [ ] Auth Service\n  - [ ] PostgresSQL Connection\n  - [ ] Logger Service Connection\n- [ ] Logger Service\n  - [ ] MongoDB Connection\n- [ ] Mail Service\n- [ ] Product Service\n- [ ] Catalog Service\n- [ ] Cart Service\n- [ ] Unit Tests\n- [ ] Service Documentation\n\n## Notes\n\nHi there! I'm not good at microservices and golang. This is my first experience. Please give me your ideas. I'm open to new ideas.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faligoren%2Fgo_ecommerce_microservice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faligoren%2Fgo_ecommerce_microservice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faligoren%2Fgo_ecommerce_microservice/lists"}