{"id":19521762,"url":"https://github.com/younesious/go-microservices","last_synced_at":"2025-04-26T09:31:57.942Z","repository":{"id":243307091,"uuid":"812061597","full_name":"younesious/go-microservices","owner":"younesious","description":"Cool application using Go and microservice architecture for the IUST software engineering final project.","archived":false,"fork":false,"pushed_at":"2024-06-23T18:38:51.000Z","size":90,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-04T10:25:08.427Z","etag":null,"topics":["caddy","docker-compose","docker-swarm","go","grpc","kuber","microservice","rabb","rpc"],"latest_commit_sha":null,"homepage":"","language":"Go","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/younesious.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}},"created_at":"2024-06-07T21:50:35.000Z","updated_at":"2024-11-28T12:10:56.000Z","dependencies_parsed_at":"2024-11-11T00:34:50.498Z","dependency_job_id":"da83b73a-8bfc-4b7a-a513-77e54cbc57c6","html_url":"https://github.com/younesious/go-microservices","commit_stats":null,"previous_names":["younesious/go-microservices"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/younesious%2Fgo-microservices","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/younesious%2Fgo-microservices/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/younesious%2Fgo-microservices/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/younesious%2Fgo-microservices/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/younesious","download_url":"https://codeload.github.com/younesious/go-microservices/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250967123,"owners_count":21515541,"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":["caddy","docker-compose","docker-swarm","go","grpc","kuber","microservice","rabb","rpc"],"created_at":"2024-11-11T00:34:47.574Z","updated_at":"2025-04-26T09:31:57.641Z","avatar_url":"https://github.com/younesious.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"Go Microservices Project\n========================\n\nAbout\n-----\n\nThis project was designed with educational purposes for the final project of the IUST software engineering course and aims to cover a wide range of software engineering topics such as microservice architecture, communication between services (API architectures like REST, RPC, and gRPC), software development platforms such as Kubernetes and Docker Swarm, test writing for the authentication-service in the `tests` branch, and monitoring tools such as Prometheus, Grafana, Jaeger, and Pyroscope should be reviewed.\n\nProject Overview\n----------------\n\nMicroservices, also known as the microservice architecture, are an architectural style that structures an application as a loosely coupled collection of smaller applications. The microservice architecture allows for the rapid and reliable delivery of large, complex applications. Key features of microservices include:\n\n-   **Maintainable and testable**\n-   **Loosely coupled**\n-   **Independently deployable**\n-   **Organized around business capabilities**\n-   **Owned by small teams**\n\nIn this project, I develop a number of small, self-contained, loosely coupled microservices that communicate with one another and a simple front-end application using REST API, RPC, gRPC, and AMQP (Advanced Message Queuing Protocol). The microservices we build include the following functionality:\n\nAll services are written in Go and will be deployed using Docker Swarm and Kubernetes.\n\nWorking with Microservices in Go\n--------------------------------\n\nThis project consists of several loosely coupled microservices, all written in Go:\n\n-   **front-end-service**: Displays web pages.\n-   **broker-service**: An optional single entry point into the microservice cluster. to connect to all services from one place (accepts JSON; sends JSON, makes calls via gRPC, and pushes to RabbitMQ).\n-   **authentication-service**: Authenticates users against a Postgres database (accepts JSON).\n-   **logger-service**: Logs important events to a MongoDB database (accepts RPC, gRPC, and JSON).\n-   **listener-service**: Consumes messages from AMQP (RabbitMQ) and initiates actions based on the payload (sends via RPC).\n-   **mail-service**:Converts a JSON payload into a formatted email and sends it with Mailhog.\n\n\nIn addition to the microservices, the included `docker-compose.yml` at the root level of the project starts the following services:\n\n-   **PostgreSQL**: Used by the authentication-service to store user accounts.\n-   **MongoDB**: Used by the logger-service to save logs from all services.\n-   **Mailhog**: Used as a fake mail server to work with the mail service. (Mailhog dashboard is available on `http://localhost:8025`).\n\n\nMonitoring Tools\n----------------\n\nAccess the following monitoring tools at these URLs:\n\n-   **Prometheus**: \u003chttp://localhost:9090\u003e\n-   **Grafana**: \u003chttp://localhost:3000\u003e\n-   **Jaeger**: \u003chttp://localhost:16686\u003e\n-   **Pyroscope**: \u003chttp://localhost:4040\u003e\n\nRunning the Project\n-------------------\n\nFortunately, I wrote some `Makefile` for this project to make life easier for me and you. So From the root level of the project, execute this command (this assumes that you have GNU Make and a recent version of Docker installed on your machine):\n\n```shell\nmake up_build\n```\n\nIf the code has not changed, subsequent runs can just be:\n\n```shell\nmake up\n```\n\nThen start the front end:\n\n```shell\nmake start\n```\n\nHit the front end with your web browser at \u003chttp://localhost:8081\u003e.\n\nTo stop everything:\n\n```shell\nmake stop\nmake down\n```\n\nMake Commands\n-------------------\n\nhere is the complete list of `Make` commands:\n\n```shell\n Choose a command:\n  up                  starts all containers in the background without forcing build\n  down                stop docker compose\n  up_build            stops docker-compose (if running), builds all projects and starts docker compose\n  build_dockerfiles   builds all dockerfile images\n  push_dockerfiles    pushes tagged versions to docker hub\n  front_end_linux     builds linux executable for front end\n  build_auth          builds the authentication binary as a linux executable\n  build_broker        builds the broker binary as a linux executable\n  build_logger        builds the logger binary as a linux executable\n  build_mail          builds the mail binary as a linux executable\n  build_listener      builds the listener binary as a linux executable\n  build_front         builds the frone end binary\n  start               starts the front end\n  stop                stop the front end\n  test                runs all tests\n  clean               runs go clean and deletes binaries\n  help                displays help\n```\n\nLicense\n-------\n\nThis project is licensed under the MIT License - see the [LICENSE](https://github.com/younesious/go-microservices/blob/master/LICENSE) file for details.\n\n### Contributing\n\nFeel free to contribute and I'll be happy to see you :)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyounesious%2Fgo-microservices","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyounesious%2Fgo-microservices","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyounesious%2Fgo-microservices/lists"}