add readme
This commit is contained in:
		
							
								
								
									
										83
									
								
								README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										83
									
								
								README.md
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,83 @@
 | 
				
			|||||||
 | 
					# HeroDB
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Redis-compatible database server with encryption and AGE cryptographic operations.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Features
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- Redis protocol compatibility
 | 
				
			||||||
 | 
					- String, hash, and list data types
 | 
				
			||||||
 | 
					- Key expiration and persistence
 | 
				
			||||||
 | 
					- Database encryption with ChaCha20-Poly1305
 | 
				
			||||||
 | 
					- AGE encryption/decryption operations
 | 
				
			||||||
 | 
					- Digital signatures with Ed25519
 | 
				
			||||||
 | 
					- Persistent storage using redb
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Installation
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```bash
 | 
				
			||||||
 | 
					cargo build --release
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Usage
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```bash
 | 
				
			||||||
 | 
					./target/release/herodb --dir /path/to/db --port 6379
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### Options
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- `--dir`: Database directory (required)
 | 
				
			||||||
 | 
					- `--port`: Server port (default: 6379)
 | 
				
			||||||
 | 
					- `--debug`: Enable debug logging
 | 
				
			||||||
 | 
					- `--encrypt`: Enable database encryption
 | 
				
			||||||
 | 
					- `--encryption-key`: Master encryption key for encrypted databases
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### Examples
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```bash
 | 
				
			||||||
 | 
					# Basic server
 | 
				
			||||||
 | 
					herodb --dir ./data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Encrypted database
 | 
				
			||||||
 | 
					herodb --dir ./data --encrypt --encryption-key "your-key"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Custom port with debug
 | 
				
			||||||
 | 
					herodb --dir ./data --port 7000 --debug
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Redis Commands
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Supports standard Redis commands including:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- **Strings**: GET, SET, MGET, MSET, INCR, DEL
 | 
				
			||||||
 | 
					- **Hashes**: HGET, HSET, HGETALL, HDEL, HEXISTS
 | 
				
			||||||
 | 
					- **Lists**: LPUSH, RPUSH, LPOP, RPOP, LLEN, LRANGE
 | 
				
			||||||
 | 
					- **Keys**: KEYS, SCAN, EXISTS, EXPIRE, TTL
 | 
				
			||||||
 | 
					- **Transactions**: MULTI, EXEC, DISCARD
 | 
				
			||||||
 | 
					- **Server**: PING, ECHO, INFO, CONFIG
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## AGE Commands
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Extended commands for cryptographic operations:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- **Key Generation**: `AGE GENENC`, `AGE GENSIGN`, `AGE KEYGEN`
 | 
				
			||||||
 | 
					- **Encryption**: `AGE ENCRYPT`, `AGE DECRYPT`, `AGE ENCRYPTNAME`
 | 
				
			||||||
 | 
					- **Signing**: `AGE SIGN`, `AGE VERIFY`, `AGE SIGNNAME`
 | 
				
			||||||
 | 
					- **Management**: `AGE LIST`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Client Usage
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Connect using any Redis client:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```bash
 | 
				
			||||||
 | 
					redis-cli -p 6379 SET key value
 | 
				
			||||||
 | 
					redis-cli -p 6379 GET key
 | 
				
			||||||
 | 
					redis-cli -p 6379 AGE GENENC
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Architecture
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- **Storage**: redb embedded database
 | 
				
			||||||
 | 
					- **Protocol**: Redis RESP protocol over TCP
 | 
				
			||||||
 | 
					- **Encryption**: ChaCha20-Poly1305 for data, AGE for operations
 | 
				
			||||||
 | 
					- **Concurrency**: Tokio async runtime
 | 
				
			||||||
		Reference in New Issue
	
	Block a user