KeyDeck Documentation

Everything you need to know about KeyDeck - from quick start guides to advanced Redis management techniques.

Installation

Get started with KeyDeck in minutes. Choose your preferred installation method:

npm / pnpm

# Clone the repository
git clone https://github.com/yourusername/keydeck.git
cd keydeck

# Install dependencies
pnpm install

# Start development server
pnpm dev

Docker

docker-compose up -d

This will start both Redis and KeyDeck containers

Quick Start

Once installed, connect to your Redis instance and start managing your data:

1

Open KeyDeck

2

Connect to Redis

Enter your connection details:

  • Host: Your Redis server address
  • Port: 6379 (default)
  • Password: Optional authentication
  • Database: 0 (default)
3

Start Managing

Browse keys, execute commands, and monitor performance all from one interface.

⚠️ Important:Deployed versions can only connect to remote Redis servers accessible from the internet. Local connections are blocked by browser security policies.

Configuration

KeyDeck can be customized via environment variables:

# .env.local

# Allowed origins for CORS
ALLOWED_ORIGINS=https://yourdomain.com

# API Security (optional)
REDIS_GUI_API_KEY=your-secure-key

# Schema Advisor Limits
SCHEMA_ADVISOR_MAX_KEYS_WEB=10000
SCHEMA_ADVISOR_MAX_KEYS=50000
SCHEMA_ADVISOR_MAX_KEYS_DEV=100000

# Deployment Type
NODE_ENV=production
IS_WEB_DEPLOYMENT=true

Contributing

Want to contribute? Here's a simple workflow to fork the repo and submit a pull request:

1

Fork the Repository

Click the "Fork" button on the GitHub repository page to create your own copy.

2

Clone Your Fork

git clone https://github.com/YOUR_USERNAME/keydeck.git
cd keydeck
3

Add Upstream Remote

Add the original repository as "upstream" to sync with the latest changes:

git remote add upstream https://github.com/ORIGINAL_OWNER/keydeck.git
4

Create a Branch

git checkout -b feature/your-feature-name
5

Make Your Changes & Commit

git add .
git commit -m "feat: add your feature description"
6

Push to Your Fork

git push origin feature/your-feature-name
7

Create a Pull Request

Go to your fork on GitHub and click "Compare & pull request". Fill in the details and submit!

💡 Tip:Keep your fork synced with upstream by running: git fetch upstream && git merge upstream/main

Connection Management

Smart Connection Features

  • Persistent Connections: Save and restore connections automatically
  • Secure Storage: Encrypted credential storage with Web Crypto API
  • Connection Diagnostics: Built-in troubleshooting tools
  • Multiple Databases: Switch between Redis databases seamlessly

Advanced Key Browser

Browse and manage your Redis keys with powerful search and filtering:

  • Real-time search with live filtering
  • Support for all Redis data types (String, Hash, List, Set, ZSet, Stream)
  • Color-coded type badges and metadata display
  • Bulk operations: copy, delete, and manage keys efficiently

Redis Console

Execute Redis commands directly with full console capabilities:

  • Command history navigation with arrow keys
  • Auto-completion with smart suggestions
  • Syntax highlighting for commands and responses
  • Clear error messages and debugging information

Performance Monitoring

Monitor your Redis instance in real-time:

  • Real-time memory usage and performance metrics
  • Interactive charts with historical data
  • Hit ratio tracking for cache efficiency
  • Key distribution analysis by type

Schema Advisor

Get intelligent recommendations for your Redis data patterns:

  • Automatic analysis of key naming patterns
  • Memory usage optimization suggestions
  • Identification of common key prefixes and structures
  • Configurable analysis limits for different deployment types

Stream Viewer

Manage Redis Streams with dedicated visualization:

  • View stream entries with formatted timestamps
  • Monitor consumer groups and pending messages
  • Real-time updates for message flow

Encrypted Connection Profiles

Store your Redis connection credentials securely with client-side encryption.

🔐 Security Features

  • AES-256-GCM Encryption: Industry-standard encryption
  • Client-Side Only: All encryption happens in your browser
  • Passphrase Protected: Your passphrase is never stored
  • IndexedDB Storage: Secure, offline-capable storage
  • Zero Server Storage: Credentials never leave your device

🚀 How It Works

  1. 1
    Create a profile with your Redis connection details and a strong passphrase
  2. 2
    Credentials are encrypted with AES-256-GCM using your passphrase
  3. 3
    Encrypted data is stored locally in IndexedDB
  4. 4
    On reload, enter your passphrase to unlock your profiles

⚠️ Remember:If you forget your passphrase, your profiles cannot be recovered. Consider backing up important connection details separately.

Connection Encryption Details

Encryption Algorithm

  • • Algorithm: AES-256-GCM (Galois/Counter Mode)
  • • Key Derivation: PBKDF2 with SHA-256, 100,000 iterations
  • • Salt: 256-bit random salt per profile
  • • IV: 96-bit random initialization vector per encryption

Passphrase Requirements

  • • Minimum 8 characters
  • • Must contain uppercase and lowercase letters
  • • Must contain at least one number
  • • Must contain at least one special character
  • • Cannot contain common weak patterns

Security Best Practices

  • Always use HTTPS in production deployments
  • Use strong, unique passphrases for encrypted profiles
  • Regularly backup important connection details
  • Configure allowed origins properly in production
  • Monitor access logs for unauthorized attempts

Production Setup

Environment Variables

# Required: Add your production domain
ALLOWED_ORIGINS=https://yourdomain.com,https://www.yourdomain.com

# Optional: API Security Key
REDIS_GUI_API_KEY=your-very-secure-random-key

# Schema Advisor Limits
SCHEMA_ADVISOR_MAX_KEYS_WEB=10000      # Web deployment
SCHEMA_ADVISOR_MAX_KEYS=50000          # Production
SCHEMA_ADVISOR_MAX_KEYS_DEV=100000     # Development

# Deployment Type
NODE_ENV=production
IS_WEB_DEPLOYMENT=true

Deployment Types

Web Deployment (Vercel, Netlify)

Default limit: 10,000 keys

IS_WEB_DEPLOYMENT=true

Production Server

Default limit: 50,000 keys

NODE_ENV=production IS_WEB_DEPLOYMENT=false

Development

Default limit: 100,000 keys

NODE_ENV=development

Docker Deployment

Deploy KeyDeck with Docker Compose:

version: '3.8'
services:
  redis:
    image: redis:7-alpine
    ports:
      - "6379:6379"
  
  keydeck:
    build: .
    ports:
      - "3000:3000"
    environment:
      - REDIS_HOST=redis
      - ALLOWED_ORIGINS=https://yourdomain.com

Run with: docker-compose up -d

Environment Variables Reference

VariableDescriptionDefault
ALLOWED_ORIGINSComma-separated list of allowed originslocalhost
REDIS_GUI_API_KEYOptional API security key-
IS_WEB_DEPLOYMENTSet to true for web deploymentsfalse
SCHEMA_ADVISOR_MAX_KEYS_WEBMax keys for schema analysis (web)10000

Supported Redis Commands

String Operations

GET, SET, DEL, EXISTS, TYPE, TTL, EXPIRE

Hash Operations

HGET, HSET, HGETALL, HDEL, HKEYS, HVALS

List Operations

LPUSH, RPUSH, LPOP, RPOP, LLEN, LRANGE

Set Operations

SADD, SREM, SMEMBERS, SCARD, SISMEMBER

Sorted Set Operations

ZADD, ZREM, ZRANGE, ZCARD, ZSCORE

Server Commands

PING, INFO, DBSIZE, KEYS, FLUSHDB, FLUSHALL

REST API Endpoints

KeyDeck exposes the following API endpoints:

POST /api/redis/connect

Establish a Redis connection

POST /api/redis/execute

Execute Redis commands

GET /api/redis/keys

List keys with optional pattern

GET /api/redis/stats

Get Redis server statistics

GET /api/redis/schema-advisor

Analyze Redis key patterns

GET /api/redis/diagnostics/*

Connection health checks

Redis Data Types

KeyDeck supports all Redis data types:

  • String: Simple key-value pairs
  • Hash: Field-value pairs within a key
  • List: Ordered collections of strings
  • Set: Unordered collections of unique strings
  • Sorted Set (ZSet): Ordered sets with scores
  • Stream: Log-like data structures for message streams