Golphin is a learning project to understand how databases work by building one by hand in Go. It is currently a Bitcask-shaped key-value store: append-only segment files on disk, an in-memory index from key to location, and compaction by copying live records into a fresh segment and renaming it.
The code is layered as cli -> db -> {index, segments} -> fs, where segments own raw byte storage and the index owns key-to-location lookups, with Db as the only component that knows both. The index was recently rebuilt from a plain binary search tree onto a hand-written generic AVL tree, since a plain BST degenerates on sorted key inserts; benchmarks are tracked in CI on every push. The stated long-term goal is an embedded, SQLite-shaped relational database once ordered range scans over the storage engine are solid.