$ show codenotary/immudb
immudb is an immutable, cryptographically verifiable database system designed for tamper-evident storage. It provides ACID transactions with cryptographic verification via Merkle trees, ensuring data integrity and historical auditability. The system supports multiple data models: key-value, SQL (with PostgreSQL wire protocol compatibility), and document storage. Architecture follows a modular client-server design with separate binaries for server (immudb), admin CLI (immuadmin), client CLI (immuclient), and test tool (immutest). Key entry points include cmd/immudb/immudb.go (server), cmd/immuadmin/immuadmin.go (admin), and cmd/immuclient/immuclient.go (client). Data flows involve clients sending requests via gRPC or PostgreSQL wire protocol to the server, which processes transactions, appends to an immutable log, updates verification structures, and returns verifiable responses. External dependencies include Go modules for gRPC, protobuf, Viper, cryptographic libraries, and optional S3/MinIO for remote storage. The codebase demonstrates strong engineering practices with clear separation of concerns, extensive testing, and active maintenance.
The LLM identified 4 files worth highlighting for reuse:
Implements a SIEVE-based cache algorithm that is self-contained (only uses standard library). Demonstrates non-obvious skill in cache eviction policies and could be extracted for use in other projects needing efficient caching with minimal dependencies.
Part of the reusable stream package that provides MsgSender/MsgReceiver interfaces for efficient data transfer. Shows dependency injection and interface-based design, allowing extraction of streaming patterns for key-value, verifiable entries, and ZAdd operations with minimal modification.
Defines a custom error wrapping mechanism with GRPC status mapping and stack trace isolation. Demonstrates cohesive error handling patterns that are used throughout the codebase and could be reused in other Go projects requiring structured error propagation.
Provides table formatting for CLI output with color support. Isolated from core logic (only depends on color/terminal helpers in same package) and represents a reusable CLI component that could be extracted for any command-line application needing formatted output.