2025-12-05 10:55:11 +05:30
2025-12-05 10:37:02 +05:30
2025-12-04 22:31:48 +05:30
2025-12-04 21:46:20 +05:30
2025-12-04 21:18:12 +05:30
2025-12-04 21:18:12 +05:30
2025-12-04 22:31:48 +05:30
2025-12-04 21:46:20 +05:30
2025-12-04 21:46:20 +05:30
2025-12-05 09:45:25 +05:30
2025-12-05 09:45:25 +05:30
2025-12-05 09:02:40 +05:30
2025-12-04 22:31:48 +05:30
2025-12-04 21:46:20 +05:30

NATS JetStream Console

A modern, enterprise-grade web console for managing NATS JetStream clusters. Built with Next.js, Node.js, and TypeScript, featuring real-time monitoring and a developer-friendly experience.

NATS Console TypeScript Next.js Fastify

Features

  • Multi-cluster Management - Connect and manage multiple NATS JetStream clusters
  • Stream Management - Create, configure, and monitor streams with message browser
  • Consumer Management - Manage consumers with real-time lag visualization
  • Real-time Metrics - Live dashboards with ClickHouse-backed analytics
  • Alerting - Configurable alerts for lag, throughput, and errors
  • Team Collaboration - Multi-tenant with organizations and teams

Tech Stack

Layer Technology
Frontend Next.js 15, React 19, TypeScript, TailwindCSS, shadcn/ui, ECharts, TanStack Table
Backend Fastify, Prisma ORM, PostgreSQL
Metrics ClickHouse (time-series), Redis (cache/sessions)
Messaging NATS JetStream

Quick Start (Local Development)

Prerequisites

  • Node.js 20+
  • pnpm 9+
  • Docker & Docker Compose

Step-by-Step Setup

  1. Clone the repository
git clone https://github.com/your-org/nats-console.git
cd nats-console
  1. Install dependencies
pnpm install
  1. Start infrastructure services
# Start PostgreSQL, Redis, ClickHouse, and NATS
make db-up

# Or using docker-compose directly
docker-compose up -d
  1. Setup environment variables
# API
cp apps/api/.env.example apps/api/.env

# Web
cp apps/web/.env.example apps/web/.env

# Workers
cp apps/workers/.env.example apps/workers/.env
  1. Initialize the database
# Generate Prisma client
make prisma-generate

# Run migrations
make prisma-migrate
  1. Start development servers
# Start all services (API, Web, Workers)
make dev
  1. Access the application
Service URL
Web Dashboard http://localhost:3000
API http://localhost:3001
NATS Monitoring http://localhost:8222
Prisma Studio Run make prisma-studio

One-Command Setup

make setup && make dev

Makefile Commands

Development

make dev              # Start all services in dev mode
make api-dev          # Start API only
make web-dev          # Start Web only
make workers-dev      # Start Workers only

Database Operations

make db-up            # Start database containers
make db-down          # Stop database containers
make db-shell-postgres  # PostgreSQL shell
make db-shell-redis     # Redis CLI
make db-shell-clickhouse # ClickHouse client
make db-shell-nats      # NATS CLI

Prisma

make prisma-generate  # Generate Prisma client
make prisma-migrate   # Run migrations
make prisma-studio    # Open Prisma Studio
make prisma-reset     # Reset database

Build & Production

make build            # Build all packages
make start            # Start in production mode
make health           # Check health of all services

Production Deployment

Using Docker Compose

  1. Build the images
docker-compose -f docker-compose.prod.yml build
  1. Create environment file
cp .env.prod.example .env.prod
# Edit .env.prod with production values
  1. Start services
docker-compose -f docker-compose.prod.yml up -d
  1. Run migrations
docker-compose -f docker-compose.prod.yml exec api pnpm prisma migrate deploy

Environment Variables (Production)

# Required
DATABASE_URL=postgresql://user:pass@host:5432/nats_console
REDIS_URL=redis://host:6379
CLICKHOUSE_URL=http://host:8123
JWT_SECRET=your-secure-jwt-secret

# Optional
NATS_URL=nats://host:4222
LOG_LEVEL=info

Testing with Example Apps

The examples/ directory contains sample NATS applications:

cd examples

# Install dependencies
pnpm install

# Run message producer
pnpm run producer

# Run message consumer
pnpm run consumer

# Run high-volume load test
pnpm run load-test

Contributing

  1. Fork the repository
  2. Create feature branch: git checkout -b feature/my-feature
  3. Commit changes: git commit -am 'Add feature'
  4. Push to branch: git push origin feature/my-feature
  5. Open a Pull Request

License

MIT License - see LICENSE for details.

S
Description
A Modern, Open-Source Management Console for NATS JetStream.
Readme 2.8 MiB
Languages
TypeScript 95.8%
Dockerfile 1.8%
Shell 1%
Makefile 0.8%
JavaScript 0.4%
Other 0.2%