Sign inSign up

mukezhz/heynats

By mukezhz

โ€ขUpdated 6 months ago

A simple and powerful web UI to monitor, explore, and interact with your NATS in real time.

Image
Monitoring & observability
0

2.0K

mukezhz/heynats repository overview

โ HeyNATS ๐Ÿš€

HeyNATS Logo

A modern, web-based administration interface for NATS Server

Built with React Go Version TypeScript License

Demoโ  โ€ข Featuresโ  โ€ข Quick Startโ  โ€ข Installationโ  โ€ข Documentationโ  โ€ข Contributingโ 


โ ๐Ÿ“– What is HeyNATS?

HeyNATS is a modern, intuitive web-based administration interface for NATS Serverโ . It provides a user-friendly dashboard to manage NATS connections, streams, consumers, and key-value stores without needing command-line expertise.

Think of it as "phpMyAdmin for NATS" - making NATS server management accessible through a beautiful, responsive web interface.

โ ๐ŸŽฎ Demo

Experience HeyNATS without any setup! Try our live demo using the public NATS server:

โ ๐ŸŒ Quick Demo Setup

Connection Details:

Host: demo.nats.io
Port: 4222
Authentication: None required
โ ๐Ÿ“ฑ Demo Screenshots

Login Screen Login page with demo credentials

Dashboard Overview Dashboard page after successful login

๐Ÿ’ก Tip: The demo server is public, so you might see data from other users. This is normal and demonstrates HeyNATS's real-time capabilities!

โ โœจ Features

โ ๐Ÿ”Œ Connection Management
  • Connect to multiple NATS servers simultaneously
  • Support for authentication (user/password, token, JWT)
  • Real-time connection status monitoring
  • Connection pooling and management
โ ๐Ÿ“Š JetStream Administration
  • Stream Management: Create, view, edit, and delete streams
  • Consumer Management: Monitor and manage stream consumers
  • Message Publishing: Send messages to streams and subjects
  • Message Consumption: Subscribe to streams and view real-time messages
โ ๐Ÿ—„๏ธ Key-Value Store Operations
  • Create and manage KV buckets
  • Browse, add, edit, and delete key-value pairs
  • Real-time KV operations monitoring
  • Bucket configuration management
โ ๐Ÿ“ˆ Monitoring & Analytics
  • Real-time server statistics and metrics
  • Stream and consumer performance monitoring
  • Message flow visualization
  • Connection health dashboards
โ ๐ŸŽจ Modern UI/UX
  • Responsive design that works on desktop, tablet, and mobile
  • Dark/light theme support
  • Intuitive navigation and user experience
  • Real-time updates without page refresh

โ ๐Ÿ› ๏ธ Tech Stack

โ Frontend
  • React 19 - Modern React with latest features
  • TypeScript - Type-safe development
  • React Router v7 - Advanced routing with loaders
  • TanStack Query - Server state management and caching
  • TailwindCSS 4 - Utility-first styling
  • Vite - Lightning-fast build tool
  • shadcn/ui - Beautiful, accessible component library
โ Backend
  • Go 1.24.0+ - High-performance backend
  • Gin Framework - Fast HTTP web framework
  • NATS Go Client - Official NATS client library
  • Graceful Shutdown - Proper resource cleanup

โ ๐Ÿ—๏ธ Project Structure

heynats/
โ”œโ”€โ”€ main.go                 # Go server entry point
โ”œโ”€โ”€ internal/              # Backend Go modules
โ”‚   โ”œโ”€โ”€ api/              # API handlers (NATS, KV, Streams)
โ”‚   โ”œโ”€โ”€ infrastructure/   # Router and middleware
โ”‚   โ”œโ”€โ”€ model/           # Data models
โ”‚   โ””โ”€โ”€ pkg/             # NATS client package
โ”œโ”€โ”€ client/               # React frontend application
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ components/  # Reusable UI components
โ”‚   โ”‚   โ”œโ”€โ”€ pages/       # Page components
โ”‚   โ”‚   โ”œโ”€โ”€ hooks/       # Custom React hooks
โ”‚   โ”‚   โ”œโ”€โ”€ lib/         # Utilities and API client
โ”‚   โ”‚   โ””โ”€โ”€ providers/   # Context providers
โ”‚   โ”œโ”€โ”€ dist/            # Built frontend (served by Gin)
โ”‚   โ””โ”€โ”€ package.json
โ”œโ”€โ”€ docs/                # Documentation
โ”œโ”€โ”€ Makefile             # Build automation
โ”œโ”€โ”€ build-and-run.sh     # Quick start script
โ”œโ”€โ”€ dev.sh              # Development mode script
โ””โ”€โ”€ docker-compose.yml  # Docker setup

โ ๐Ÿš€ Quick Start

โ Option 1: Try the Demo First! ๐ŸŽฎ

No installation needed - just try HeyNATS with our demo setupโ  using demo.nats.io.

โ Option 2: Install Locally

The fastest way to get HeyNATS running on your machine:

# Clone the repository
git clone https://github.com/Astergaze-Solutions/heynats.git
cd heynats

# Quick build and run (recommended for first-time users)
./build-and-run.sh

# Open your browser to http://localhost:5000

That's it! HeyNATS will be running and ready to connect to your NATS server.

โ ๐Ÿ’ป Installation

โ Prerequisites
โ System Requirements
# Install pnpm globally
npm install -g pnpm

# Verify installations
go version    # Should be 1.24.0+
node --version # Should be 18+
pnpm --version
โ Full Installation
  1. Clone the repository

    git clone https://github.com/Astergaze-Solutions/heynats.git
    cd heynats
    
  2. Install dependencies

    # Install all dependencies (Go + Node.js)
    make install
    
    # Or manually:
    go mod tidy
    cd client && pnpm install && cd ..
    
  3. Setup development tools (Optional but recommended)

    # Install lefthook for Git hooks
    go install github.com/evilmartians/lefthook@latest
    lefthook install
    
    # Install Go development tools
    go install golang.org/x/tools/cmd/goimports@latest
    go install github.com/air-verse/air@latest  # For hot reload
    

โ ๐ŸŽฏ Usage

โ Starting HeyNATS
# Build and run in one command
./build-and-run.sh

# Or using Makefile
make run
โ Option 2: Development Mode (Hot Reload)
# Start both frontend and backend with hot reload
./dev.sh

# Or using Makefile
make dev-full
โ Connecting to NATS Server
  1. Access HeyNATS: Open http://localhost:5000โ  in your browser

  2. Create a Connection: Click "New Connection" and configure:

    For Demo/Testing:

    • Server URL: nats://demo.nats.io:4222
    • Name: "Demo Server" (or any friendly name)
    • Authentication: Leave blank (no auth required)

    For Local Development:

    • Server URL: nats://localhost:4222 (default local NATS server)
    • Name: "Local NATS" (or any friendly name)
    • Authentication: Configure if your NATS server requires auth
  3. Start Managing: Once connected, you can:

    • Create and manage JetStream streams
    • Publish and subscribe to messages
    • Manage Key-Value stores
    • Monitor server statistics
โ Available URLs

โ ๐Ÿ”ง Development

โ Available Commands
# Development
make dev-full        # Start both frontend and backend with hot reload
make dev            # Start only React dev server
./dev.sh            # Alternative script for development mode

# Production
make run            # Build and run production version
./build-and-run.sh  # Quick production build script

# Building
make build          # Build both frontend and backend
make build-client   # Build only React frontend

# Utilities
make install        # Install all dependencies
make clean          # Clean build artifacts
make help          # Show all available commands
โ Development Architecture
  • Frontend: React dev server runs on :5173 with hot reload and proxies API calls to :5000
  • Backend: Go server runs on :5000 serving both API endpoints and static files
  • Live Reload: Frontend changes reflect immediately, backend changes require restart (use air for hot reload)

โ ๐Ÿณ Docker Support

Run HeyNATS with Docker Compose:

# Start HeyNATS with NATS server
docker-compose up -d

# Access at http://localhost:5000
# NATS server available at nats://localhost:4222

โ ๐Ÿ“š Documentation

โ ๐Ÿงช Testing

# Run Go tests
go test ./...

# Run frontend tests
cd client && pnpm test

# Run linting
make lint           # Lint both Go and TypeScript
cd client && pnpm lint  # Frontend only

โ ๐Ÿค Contributing

We welcome contributions! Please read our Contributing Guidelinesโ  for detailed information on:

  • ๐Ÿ› Reporting bugs
  • ๐Ÿ’ก Suggesting features
  • ๐Ÿ’ป Code contributions
  • ๐Ÿ“ Documentation improvements
  • ๐Ÿ”ง Development setup

Quick start for contributors:

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Commit your changes: git commit -m 'Add amazing feature'
  4. Push to the branch: git push origin feature/amazing-feature
  5. Open a Pull Request
โ Development Setup for Contributors
# Clone your fork
git clone https://github.com/your-username/heynats.git
cd heynats

# Install dependencies
make install

# Setup pre-commit hooks
lefthook install

# Start development
make dev-full
โ Modern way:
docker buildx build --platform linux/amd64,linux/arm64 -t <image-name> --push .

โ ๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE.mdโ  file for details.

โ ๐Ÿ‘ฉโ€๐Ÿ’ป Contributors

We're grateful to all the amazing people who have contributed to HeyNATS! ๐ŸŽ‰

Contributors โ 

Made with contrib.rocksโ .

โ How to Contribute

Want to see your profile here? We'd love your contributions! Check out our Contributing Guidelinesโ  to get started.

โ Core Maintainers

Interested in becoming a maintainer? Contribute regularly and reach out to us!

โ ๐Ÿ™ Acknowledgments

  • NATS.io - For the amazing NATS messaging system
  • Adminer - UI/UX inspiration for database administration tools
  • shadcn/ui - Beautiful component library
  • TailwindCSS - Utility-first CSS framework

โ ๐Ÿ“ž Support


Made with โค๏ธ by the Astergaze Solutionsโ  team

โญ Star this project if you find it helpful!

Tag summary

Content type

Image

Digest

sha256:6a2b889c3โ€ฆ

Size

11.8 MB

Last updated

6 months ago

docker pull mukezhz/heynats