Docs: Docs is overleaf’s internal term of an editable file, for example, a pure tex file, or a .bib file. It stores the file content, revision information, and deletion state.
Core Identification
_id: Unique MongoDB ObjectId identifying this document record.project_id: Reference to the project (Project._id) this file belongs to.name: Filename as shown in the project file tree (e.g.,main.tex,sample.bib).
Revision & Versioning
rev: Revision number of this document within the project history.version: Internal schema or format version used by the editor backend.
File Content
-
lines:
Array of strings representing the file content line by line.
Each element corresponds to one logical line in the source file. In this example, it stores a BibTeX entry:@article{greenwade93, ... }
-
ranges: Data structure reserved for editor annotations or tracked ranges
(e.g., selections, comments, or change tracking). Empty when no active ranges are present.opOperation object that binds the comment to a specific position in the document.op.c— Comment Selected Text (Character Contents)op.p— Anchor Position (Character Offset)idUnique ObjectId of this comment entry.metadataAuthor and timestamp information.
Deletion State
deleted:
Indicates whether this document has been deleted from the project.deletedAt:
Timestamp recording when the document was deleted.
docs.
A Simple Example
A Simple Example
A Complicated Example
A Complicated Example

