It started with wanting to build a storage engine. No database was built.
What happened instead was better: opening up sqlite files in a hex editor, learning how B-trees, pages and the WAL actually fit together, and then figuring out how to run the thing in production — pragmas, backups, vacuums, and the honest limits of a database that lives in a single file.
Two posts. Read them in order: first how it works inside, then how to operate it outside.