{"id":15170473,"url":"https://github.com/imbenrabi/event-driven-architecture","last_synced_at":"2026-02-05T21:03:31.701Z","repository":{"id":249357299,"uuid":"831013055","full_name":"imbenrabi/Event-Driven-Architecture","owner":"imbenrabi","description":"Managed monorepo, that implements event driven flow using tRPC and Kafka. ","archived":false,"fork":false,"pushed_at":"2024-09-26T07:08:13.000Z","size":194,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-14T07:17:18.317Z","etag":null,"topics":["chai","commitlint","docker","docker-compose","fasitfy","husky","kafdrop","kafka","kafkajs","lint","lint-staged","mocha","nyc","pino","sinon","trpc","vite","zod"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/imbenrabi.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-19T13:09:56.000Z","updated_at":"2024-10-01T16:25:56.000Z","dependencies_parsed_at":"2024-11-06T13:47:36.228Z","dependency_job_id":"a5912b70-19cd-41cc-aeaf-4a1a66859899","html_url":"https://github.com/imbenrabi/Event-Driven-Architecture","commit_stats":{"total_commits":13,"total_committers":1,"mean_commits":13.0,"dds":0.0,"last_synced_commit":"2be7f09182e6cf43bbf4e9dc1973630db9058233"},"previous_names":["imbenrabi/event-driven-architecture"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/imbenrabi/Event-Driven-Architecture","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imbenrabi%2FEvent-Driven-Architecture","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imbenrabi%2FEvent-Driven-Architecture/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imbenrabi%2FEvent-Driven-Architecture/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imbenrabi%2FEvent-Driven-Architecture/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imbenrabi","download_url":"https://codeload.github.com/imbenrabi/Event-Driven-Architecture/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imbenrabi%2FEvent-Driven-Architecture/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266699730,"owners_count":23970549,"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","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["chai","commitlint","docker","docker-compose","fasitfy","husky","kafdrop","kafka","kafkajs","lint","lint-staged","mocha","nyc","pino","sinon","trpc","vite","zod"],"created_at":"2024-09-27T08:03:09.765Z","updated_at":"2026-02-05T21:03:29.767Z","avatar_url":"https://github.com/imbenrabi.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Event-Driven Architecture with Fastify, tRPC, and Kafka\n\nThis project implements an event-driven architecture where events/messages are sent from a client to a Kafka queue via a tRPC server, and subsequently to an end provider/service. The project is organized in a monorepo and includes repository management tools such as lint, Husky, and Commitlint.\n\n# Notable Technologies\n\n- [**Vite**](https://vitejs.dev/)\n- [**Docker**](https://www.docker.com/get-started)\n- [**KafkaJS**](https://kafka.js.org/)\n- [**Kafdrop**](https://github.com/obsidiandynamics/kafdrop)\n- [**tRPC**](https://trpc.io/)\n- [**Fastify**](https://www.fastify.io/)\n- [**Zod**](https://zod.dev/)\n- [**Pino**](https://github.com/pinojs/pino)\n- [**Mocha**](https://mochajs.org/)\n- [**Chai**](https://www.chaijs.com/)\n- [**NYC**](https://github.com/istanbuljs/nyc)\n- [**Sinon**](https://sinonjs.org/)\n- [**Commitlint**](https://commitlint.js.org/)\n- [**Husky**](https://typicode.github.io/husky/#/)\n- [**Lint-staged**](https://github.com/okonet/lint-staged)\n\n# Setting Up Kafka Using Docker\n\nWe'll use Docker to simplify the installation process.\n\n## Prerequisites\n\n1. **Docker**: Ensure Docker is installed on your machine. You can download it from [here](https://www.docker.com/get-started).\n\n## Steps to Set Up Kafka locally\n\n### 1. Run Zookeper and Kafka with Docker\n\nIn root, run:\n\n```sh\ndocker compose up -d\n```\n\n# Running the project\n\n### 1. Install Deps\n\nInstall project deps.\nGo to root and run:\n\n```sh\nnpm install\n```\n\n### 2. Run Kafka\n\nMake sure Docker image is running succesfully.\nGo to root and run:\n\n```sh\nnpm run dev:kafka\n```\n\nThe script will start a Kafka consumer that is using batching.\nyou can disable batching by setting `KAFKA_MESSAGE_BATCHING` env variable to `false`.\n\n### 3. Run Server\n\nGo to root and run:\n\n```sh\nnpm run dev:server\n```\n\n### 4. Run client\n\nMake sure server is running succesfully.\nGo to root and run:\n\n```sh\nnpm run dev:client\n```\n\nGo to [localhost](http://localhost:5173/).\n\n# Checking results\n\n### Go to Kafdrop - a Kafka UI Client\n\nThe Docker compose command installed and ran [Kafdrop](https://github.com/obsidiandynamics/kafdrop) image as well.\nGo to [localhost:19000](http://localhost:19000) to review results.\n\n# Tests\n\nWe are using [Mocha](https://mochajs.org/) and [Chai](https://www.chaijs.com/) for testing, alongside [nyc](https://github.com/istanbuljs/nyc) for HTML report.\n\n## Running tests\n\nFrom a specific package root, run:\n\n```sh\nnpm run test\n```\n\nOR\nFrom root, run:\n\n```sh\nnpm run test:all\n```\n\n- You can also run per package - see package.json scripts.\n\n## Running tests with coverage and opening the HTML report\n\nFrom a specific package root, run:\n\n```sh\nnpm run test:coverage:open\n```\n\nOR\nfrom root, run:\n\n```sh\nnpm run test:coverage:open:\u003cpackageName\u003e\n```\n\nFor specific package.\n\nOR\n\n```sh\nnpm run test:coverage:open:all\n```\n\nFor all packages.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimbenrabi%2Fevent-driven-architecture","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimbenrabi%2Fevent-driven-architecture","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimbenrabi%2Fevent-driven-architecture/lists"}