Storage internals

I’m not aware of a single nice document describing all of this, but the “file format” is described in https://github.com/couchbase/couchstore/blob/master/file_format.md and https://github.com/couchbase/couchstore/blob/master/view_format.md and you’d have to look at the source in https://github.com/couchbase/ep-engine/tree/master/src/couch-kvstore to see how it is used from Couchbase server.