projectHistoryBlobs holds one document per project history: the metadata (hash and sizes) of every blob history-v1 has stored for that project. A blob is the content of a file or of a doc at some point of its history. The bytes themselves are objects in the project blobs bucket. There is no Mongoose schema: history-v1 writes the collection in services/history-v1/storage/lib/blob_store/mongo.js, which it uses for history ids of 24 hex characters, as in CE (services/history-v1/storage/lib/blob_store/index.js:108-116).
Fields
Who Writes It
Where new blobs come from:
- File uploads: web sends the file to history-v1
PUT /projects/:project_id/blobs/:hash(services/web/app/src/Features/History/HistoryManager.mjs:164-169,services/history-v1/api/controllers/projects.js:376-402). - Project copies: web asks history-v1 to copy each file’s blob with
POST /projects/:project_id/blobs/:hash?copyFrom=(services/web/app/src/Features/Project/ProjectDuplicator.mjs:333-338,HistoryManager.mjs:177-187,projects.js:521-555). - Doc text: when history-v1 writes a chunk, it stores the text of each doc, and its comments and tracked changes as JSON, as blobs (
chunk_store/index.js:402-405,libraries/overleaf-editor-core/lib/file_data/string_file_data.js:166-173).
Who Reads It
Indexes
Only the default_id index. No migration in tools/migrations/ adds one.
Notes
- The bytes of a blob are at the key
<project key>/<hash[0:2]>/<hash[2:]>(blob_store/index.js:51-53) in the bucketOVERLEAF_EDITOR_PROJECT_BLOBS_BUCKET(services/history-v1/config/custom-environment-variables.json:49-52). The project key is the zero-padded history id, reversed and split as 3/3/rest characters (libraries/object-persistor/src/ProjectKey.js:8-15). - A blob is stored once per project: an insert of a hash the project already has is skipped (
blob_store/index.js:227-230,249-252). - The empty content needs no record;
getBlobanswers it without a lookup (blob_store/index.js:378-380). projectHistoryGlobalBlobsis read at start-up (blob_store/index.js:138-148) but no CE code writes it, so in CE every blob is a project blob.

