Keyfile architecture - AdventistMediaMinistries/KeyfilePaperlessDocumentStorageExtraction GitHub Wiki
The Keyfile database consists of a simple folder structure similar to what follows:

Top level folders (A) contain a single named folder (B) which contains one or more folders (C), which ultimately contain data files (D).
The top-level folder names appear arbitrary. Subfolder names (B) are named using the hexadecimal character set (0-9a-f). Sub folders below that are two characters only (also from the hexadecimal character set). Data files are named with each two bytes from left to right, representing the path to where the file is found. Thus the path of a file is encoded in its name.
There are 4 known types of data file (called 'kob' files from here on out):
- image files
- index files
- metadata files
- cabinet files (AKA file cabinet files)
All file types end in *.kob. They are only differentiated by their binary contents. Image files contain the image data for a single page. Index files aggregate one or more image files into a document. Metadata files define folder structure and generally reference each other and/or index files. Cabinet files, are special versions of metadata files that also define folder structure and reference index files and other metadata files.
What is known about each file type is succinctly described in the code. There is also some additional description of the various file types on the page describing the source code.