{"id":16809547,"url":"https://github.com/dpakach/zwitter","last_synced_at":"2025-03-22T02:31:48.524Z","repository":{"id":41969466,"uuid":"284482364","full_name":"dpakach/zwitter","owner":"dpakach","description":"A full stack application powered by go, gRPC, envoy and reactjs","archived":false,"fork":false,"pushed_at":"2023-03-05T19:09:23.000Z","size":1989,"stargazers_count":9,"open_issues_count":25,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-18T07:12:10.082Z","etag":null,"topics":["envoyproxy","go","grpc","react"],"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/dpakach.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":"2020-08-02T14:53:23.000Z","updated_at":"2024-08-25T16:54:15.000Z","dependencies_parsed_at":"2024-06-21T19:03:02.501Z","dependency_job_id":"5d48cd78-b5bc-46b7-b76d-da4df7c89549","html_url":"https://github.com/dpakach/zwitter","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/dpakach%2Fzwitter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpakach%2Fzwitter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpakach%2Fzwitter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpakach%2Fzwitter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dpakach","download_url":"https://codeload.github.com/dpakach/zwitter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244898185,"owners_count":20528331,"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":["envoyproxy","go","grpc","react"],"created_at":"2024-10-13T10:13:12.951Z","updated_at":"2025-03-22T02:31:48.043Z","avatar_url":"https://github.com/dpakach.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Zwitter\nzwitter is a micro blogging platform built with microservice architecture powered by go, grpc, envoy and reactjs.\n\n\n### Running locally\nTo run zwitter locally you will need to have go installed in your system first. Go to the [official documentation](https://golang.org/doc/install) for installing golang in your system and download.\nAlso [install nodejs]() and [install yarn](https://classic.yarnpkg.com/en/docs/install#debian-stable) in your system for js package management.\n\nAfter that clone and build this project locally.\n```bash\ngit clone https://github.com/dpakach/zwitter.git\n\ncd zwitter\n\n## Create default config files for the services\nmake config\n\nmake\n```\nThis will pull some docker images and build the images locally so it might take some time.\n\nThis will clone the project on your local machine, build the binaries of the microservices and build docker images for the services.\n\nWith this you can run the project using docker-compose\nFor that just run the following command\n\n``` bash\nmake run\n```\n\nOpen your browser and visit http://localhost:8080.\n\nYou should be see the home page of zwitter.\n\n### Setting up dev environment\nTo setup dev environment, just run following command\n```\nmake dev\n```\n\nThis will run webpack-dev-server so hot reloading is enabled in all the frontend files.\n\nTo reload after the changes made on go files, first build the service after making the changes and then restart the service.\n\nfor eg. If you do some changes in the posts service, first build the service with following commands\n```\ncd posts\nmake\n```\nNow restart he service with following command\n```\nmake restart-service SERVICE=posts\n```\n\nYou will also need to install go protobuf dependency along with [grpc-gateway](https://github.com/grpc-ecosystem/grpc-gateway) or the code generation on the server side. First you will need to have the protoc compiler for protobuf files. You can installit following [this](https://developers.google.com/protocol-buffers/docs/gotutorial#compiling-your-protocol-buffers) guide. After that install grpc-gateway and its required dependencies from [here](https://github.com/grpc-ecosystem/grpc-gateway). With all the dependencies out of the way, you should be ready to go.\n\n### Architecture\nZwitter is composed of five different microservice components. These services are containerized using docker and can be run using docker-composer to start the whole system.\n\nEach of the services have an instance of [envoy proxy](https://www.envoyproxy.io/) running inside their containers, which provides the http entrypoint for the services. All the services then connect to an seperate instance of envoy proxy which provides access to all the services through an single http entrypoint. The web service is mounted at root whereas all the other services are mounted at the endpoint starting their own name.\n\n![zwitter architecture](https://github.com/dpakach/zwitter/blob/master/assets/zwitter.jpg?raw=true)\n\n\n### Commands\nRun `make help` to get the list of other available make commands\n```\n➜ make help\n\nZwitter\n------------------------------------------\n\nAvailable commands\n\nall                            Build the binaries and docker-images for all the services\nbuild                          Build the binaries and docker-images for all the services\nclean                          Clean the build products for all the services\nconfig                         Create default configuraion files\ndev                            Start the development environment\ndocker-run                     Run zwitter with vanilla docker-compose setup\nenvoy-run                      Run zwitter using docker-compose with envoy proxy\nfmt                            Format the go code with gofmt\nfrontend-watch                 Start frontend dev environment\nhelp                           Display this help screen\njs-deps                        Install javascript dependencies\nlogs                           Show docker compose logs for service $SERVICE, shows all logs if $SERVICE is not set\nrestart-service                Restart a service $SERVICE\nservice                        build the binary and docker image of $SERVICE service\nstop                           Stop the services  \n```\n\nTo get the list of available make commands for each service, go into the service folder and run `make help`\n\n```\n➜ make help\n\nZwitter:Auth 1.0\n------------------------------------------\n\nAvailable commands\n\napi                            Auto-generate grpc go sources\nclean                          Clean all build products\ndep                            Download go dependencies\ndocker-build                   Build the docker image of the service\ndocker-run                     Build and run the service in a docker container\ndocs                           Generate swagger documentation files\nhelp                           List available make commands\nserver                         Build the server binary   \n```\n## License\n\nCopyright (c) 2020 Dipak Acharya\n\nLicensed under [MIT License](https://github.com/dpakach/zwitter/blob/master/LICENSE)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdpakach%2Fzwitter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdpakach%2Fzwitter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdpakach%2Fzwitter/lists"}