DEV Community

Cover image for Building a Kafka Dashboard with React, TypeScript, and KafkaJS
uttesh
uttesh

Posted on

Building a Kafka Dashboard with React, TypeScript, and KafkaJS

Introduction

In today's data-driven world, real-time message processing is a crucial component of many applications. Apache Kafka is one of the most powerful distributed streaming platforms, but monitoring and interacting with Kafka messages can be challenging. We built This simple tool a Kafka Dashboardβ€”an OpenSource web application allowing users to publish, consume, and monitor Kafka messages with an interactive and user-friendly interface for developer testing, Instead of depending on the external IDE plugin.

This blog will walk you through the features, architecture, and technology stack of this project.πŸš€


πŸ› οΈ What is the Kafka Dashboard?

The Kafka Dashboard is a React + TypeScript + Material UI web application designed to simplify Kafka interactions. It provides a real-time interface to monitor Kafka topics, partitions, consumer groups, and metadata in an intuitive format.

πŸ”₯ Key Features:

βœ… Publish & Consume Kafka Messages in real-time\
βœ… Monitor Kafka Topics, Partitions, Offsets, and Keys\
βœ… Live Kafka Metadata Updates (Brokers, Consumer Groups, etc.)\
βœ… Dark Mode Toggle with theme persistence\
βœ… Pagination & Column Filtering for message browsing\
βœ… Configurable Kafka Server Settings directly from the UI\
βœ… Modern UI with Curved Corners & Responsive Design

🎨 UI Preview:

Image description

Image description


πŸš€ Tech Stack & Architecture

Frontend (React + TypeScript)

The front end is built with React, TypeScript, and Material UI, ensuring a modern, responsive, and maintainable UI.

  • Material UI (MUI) for a polished and professional UI

Backend (Node.js + Express + KafkaJS)

The backend leverages KafkaJS, a native Kafka client for Node.js, to handle message production and consumption.

  • Express.js serves the API endpoints
  • KafkaJS manages Kafka producer and consumer functionalities
  • Docker Compose runs Kafka in a containerized environment without Zookeeper

Kafka Integration

  • Publish messages to a Kafka topic with keys and partitions
  • Consume messages from multiple topics
  • Fetch metadata like partitions, offsets, and consumer groups
  • Monitor Kafka cluster health and broker information

πŸ“Œ How to Set Up & Use the Kafka Dashboard

Step 1: Clone the Repository

git clone https://github.com/uttesh/kafkaclient.git
cd kafkaclient
Enter fullscreen mode Exit fullscreen mode

Step 2: Start Kafka using Docker Compose

docker-compose up -d
Enter fullscreen mode Exit fullscreen mode

Step 3: Install Dependencies

# Install frontend dependencies
cd client
npm install

# Install backend dependencies
cd ../server
npm install
Enter fullscreen mode Exit fullscreen mode

Step 4: Run the Application

# Start the server
cd server
npm run dev

# Start the frontend
cd client
npm run dev
Enter fullscreen mode Exit fullscreen mode

The app will be available at http://localhost:3000 πŸš€


🀝 Contributing & Next Steps

Want to contribute? Here’s what’s next:

  • πŸ“Š Real-time WebSocket Updates for messages
  • πŸ“‰ Kafka Metrics & Charts for visualization
  • πŸ”„ Custom Kafka Retention Policies & Alerts

Join the Discussion!

πŸ“Œ GitHub: github.com/uttesh/kafkaclient


πŸš€ Start using the Kafka Dashboard today and take your Kafka monitoring to the next level! πŸŽ‰

AWS Q Developer image

Your AI Code Assistant

Automate your code reviews. Catch bugs before your coworkers. Fix security issues in your code. Built to handle large projects, Amazon Q Developer works alongside you from idea to production code.

Get started free in your IDE

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

πŸ‘‹ Kindness is contagious

Please leave a ❀️ or a friendly comment on this post if you found it helpful!

Okay