Skip to content

wednesday-solutions/kafka-node-example

Repository files navigation

Node Kafka

A Monorepo that hosts two web server and a web client. Purpose of this project is to demonstrate usage of Kafka and Dapr. We have one producer server that publishes messages to kafka and consumer server publishes that message web client after receiving the message from kafka


Expert teams of digital product strategists, developers, and designers.


We’re always looking for people who value their work, so come and join us. We are hiring!


Kafka Fundamentals

Diagram

Tools used

Build system: Turborepo

  • Global

    • Node.js 16
    • yarn
    • docker-compose
    • Dapr - Used to simplify microservice connectivity
  • API

  • Frontend

    • React
    • Vite - Next Gen Frontend build tool
    • Cypress - E2E & Integration testing framework

Workspaces

Workspaces can exist in these folders:

apps
services
packages

Predefined workspaces

In this starter kit these workspaces are defined already:

apps
  - producer_server
  - consumer_server
  - ui
services
  - message_broker
  - postgres
packages
  - config
  - tsconfig
  - ui-components

Usage

  • Install dependencies using yarn install
  • Start the stack using yarn dev
  • Start dapr yarn dapr:run (please make sure Kafka is running before running dapr)
  • Browse http://localhost:3000

yarn dev output Screenshot

http://localhost:3000 output Screenshot

http://localhost:9411 output Tracing