{"id":19589654,"url":"https://github.com/flolu/kafka","last_synced_at":"2025-10-03T14:46:50.877Z","repository":{"id":119944371,"uuid":"570214220","full_name":"flolu/kafka","owner":"flolu","description":"Realtime BTC and ETH Wallet Tracker with Node.js and Kafka","archived":false,"fork":false,"pushed_at":"2022-12-16T18:56:55.000Z","size":297,"stargazers_count":25,"open_issues_count":0,"forks_count":13,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-05T00:24:12.130Z","etag":null,"topics":["bitcoin","consumer","ethereum","kafka","message-queue","nodejs","partitioning","producer","publish-subscribe","realtime","redpanda","topics","typescript","websockets"],"latest_commit_sha":null,"homepage":"https://www.youtube.com/watch?v=gTwXG8lC2GM","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/flolu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"custom":"https://flolu.de/support"}},"created_at":"2022-11-24T15:48:01.000Z","updated_at":"2025-03-17T20:04:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"45de8dac-1a21-4488-b616-9031cb50b51c","html_url":"https://github.com/flolu/kafka","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/flolu%2Fkafka","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flolu%2Fkafka/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flolu%2Fkafka/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flolu%2Fkafka/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flolu","download_url":"https://codeload.github.com/flolu/kafka/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251138933,"owners_count":21541976,"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":["bitcoin","consumer","ethereum","kafka","message-queue","nodejs","partitioning","producer","publish-subscribe","realtime","redpanda","topics","typescript","websockets"],"created_at":"2024-11-11T08:20:08.046Z","updated_at":"2025-10-03T14:46:50.819Z","avatar_url":"https://github.com/flolu.png","language":"TypeScript","funding_links":["https://flolu.de/support"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003c!-- \u003ca href=\"https://github.com/flolu/auth\"\u003e\n    \u003cimg width=\"100px\" height=\"auto\" src=\"./.github/thumbnail.png\" /\u003e\n  \u003c/a\u003e --\u003e\n  \u003cbr\u003e\n  \u003ch1\u003eNode.js Kafka Example\u003c/h1\u003e\n  \u003cp\u003eRealtime Bitcoin Wallet Tracker Example App with Node.js and Kafka\u003c/p\u003e\n  \u003cimg width=\"420px\" src=\"./.github/preview.gif\" /\u003e\n\u003c/div\u003e\n\n# Features\n\n- Interact with Kafka through Node.js\n- Produce/consume events to/from topics\n- Use Kafka as a queue and as a publish/subscribe system\n- Kafka with Zookeeper and without Zookeeper using Redpanda\n- Make use of Kafka's partitioning ability\n\n# Tech Stack\n\n- [Node.js](https://nodejs.org)\n- [TypeScript](https://www.typescriptlang.org)\n- [Docker](https://www.docker.com)\n- [Kafka](https://kafka.apache.org)\n- [Redpanda](https://github.com/redpanda-data/redpanda)\n- [WebSockets](https://github.com/websockets/ws)\n\n# Usage\n\n**Recommended OS**: Linux\n\n**Requirements**: Node.js, Docker, Docker Compose\n\n**Setup**\n\n- `npm install` (Install NPM dependencies)\n- `docker-compose -f docker-compose.yaml up --build` (Start services)\n- Optionally set environment variables in [`.env`](.env):\n  - `BLOCKCYPHER_TOKEN` (https://accounts.blockcypher.com/tokens)\n\n**Run**\n\n- `npx ts-node cli.ts \u003cWALLET_ADDRESS\u003e` (Watch a BTC or ETH wallet)\n  - `npx ts-node cli.ts 34xp4vRoCGJym3xR7yCVPFHoCNxv4Twseo` (Watch a BTC wallet)\n  - `npx ts-node cli.ts 0xBE0eB53F46cd790Cd13851d5EFf43D12404d33E8` (Watch an ETH wallet)\n\n**Monitoring**\n\n- http://localhost:8080 (Redpanda Console)\n\n**Notes**\n\n- Fetching the balance might stop working at some point, because [Blockcypher](https://www.blockcypher.com) limits the amount of requests one can send to their API\n\n**Cleanup**\n\n- `docker-compose -f docker-compose.yaml rm -s -f -v` (Stop and remove Docker containers)\n\n# Example\n\n- `npm install` (Install NPM dependencies)\n- `docker-compose -f example.docker-compose.yaml up --build` (Start example)\n- `docker-compose -f example.docker-compose.yaml rm -s -f -v` (Clean example)\n\n# Codebase\n\n- [`example.ts`](example.ts) (Minimal example of using Kafka with Node.js)\n- [`cli.ts`](cli.ts) (CLI application to read wallet data in realtime)\n- [`server.ts`](server.ts) (WebSocket server that communicates with CLI and with Kafka)\n- [`balance.ts`](balance.ts) (Service, that crawls wallet balance on demand)\n- [`price.ts`](price.ts) (Service, that writes realtime price events to Kafka)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflolu%2Fkafka","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflolu%2Fkafka","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflolu%2Fkafka/lists"}