projects holds one document per project: name, owner and members, sharing, the file tree and project settings. The text of the docs is not here (see Docs Collection), and binary files live in the history-v1 blob store under their hash. The schema is services/web/app/src/models/Project.mjs, with the file tree in Folder.mjs, File.mjs and Doc.mjs next to it.In the Source column, Project.mjs:N is a line of that schema, other bare file names are under services/web/app/src/Features/, and modules/... is under services/web/. Line numbers are from server-pro at the time of writing.
Core Identification & Metadata
Field
Type
Meaning
Source
_id
ObjectId
Id of the project.
MongoDB
name
String
Project name.
Project.mjs:18
description
String
Project description. Default empty.
Project.mjs:50
version
Number
Increased by 1 on every change to the file tree (add, rename, move, delete, replace).
false after the project was deactivated: its docs were archived out of Mongo (docs.inS3). Opening the project unarchives them and sets it back to true. In CE the cron that deactivates old projects only runs with ENABLE_CRON_RESOURCE_DELETION=true.
Legacy, { _id, name, deletedAt }. Deleted docs now stay in docs with deleted: true. This array is only read when an old deleted project is restored: the entries are copied to docstore and the array is emptied. Nothing writes to it.
In the schema only: CE core and our modules do not use it.
Project.mjs:28
Ownership & Access Control
Field
Type
Meaning
Source
owner_ref
ObjectId
Owner.
Project.mjs:29
collaberator_refs
Array of ObjectId
Users who can edit (the spelling is the real field name).
Project.mjs:30
reviewer_refs
Array of ObjectId
Users who can review: comment and suggest with track changes.
Project.mjs:31
readOnly_refs
Array of ObjectId
Users who can only view.
Project.mjs:32
pendingEditor_refs / pendingReviewer_refs
Array of ObjectId
Not invitations (those are in projectInvites). Users who were added as editor or reviewer while the owner had no free collaborator slot. They are added to readOnly_refs and listed here until they can be upgraded.
Viewers who asked for more access: userId, privilegeLevel, requestedAt. One entry per user. Removed when the request is granted, declined, or the user leaves the project.
Track changes state. true means on for everyone (old format); otherwise an object keyed by user id with true for each user who has it on. The track-changes module writes it, and core turns it on for a user who is made reviewer.
IEEE Collabratec links: user_id, collabratec_document_id, collabratec_privategroup_id, added_at. Not used in CE.
Project.mjs:104-116
Link Sharing
Field
Type
Meaning
Source
publicAccesLevel
String
private or tokenBased (link sharing on). Old projects may still have the legacy values readOnly or readAndWrite. There is no public. The spelling is the real field name.
Numeric prefix of the edit token, used to look the token up. Unique.
Project.mjs:73-81, TokenAccessHandler.mjs:120
tokenAccessReadOnly_refs
Array of ObjectId
Users who joined through the view-only link (user ids, not tokens).
Project.mjs:83
tokenAccessReadAndWrite_refs
Array of ObjectId
Users who joined through the edit link.
Project.mjs:84
Turning link sharing off unsets tokens and sets publicAccesLevel back to private (ProjectDetailsHandler.mjs:233-238).
Activity Tracking
Field
Type
Meaning
Source
lastUpdated
Date
Time of the last change to the content or file tree. Only moves forward.
Project.mjs:19, ProjectUpdateHandler.mjs:5-17
lastUpdatedBy
ObjectId
User of that last change.
Project.mjs:25, ProjectUpdateHandler.mjs:17
lastOpened
Date
Last time someone opened the project.
Project.mjs:26, ProjectUpdateHandler.mjs:24
deletedByExternalDataSource
Boolean
true when the project folder was deleted on the Dropbox side. The project itself is not deleted; the editor shows a notice and the flag is cleared the next time the project is opened.
TeX Live image used for this project with sandboxed compiles. A new project gets Settings.currentImageName; the template gallery and the MCP server can change it.
overleaf.com v1 import data. Not set in CE. overleaf.id has a unique index.
Project.mjs:88-91
__v
Number
Mongoose version key.
Mongoose
history-v1 can also write overleaf.history.currentEndVersion, overleaf.history.currentEndTimestamp, overleaf.history.updatedAt and overleaf.backup.*, but only when its backupStore is configured (services/history-v1/storage/lib/chunk_store/mongo.js:238-258). CE does not configure it, so these fields do not appear.
Indexes
All come from migrations tagged server-ce in tools/migrations/.
Name
Keys
Options
Migration
owner_ref_1
owner_ref: 1
20190912145024_create_projects_indexes
collaberator_refs_1
collaberator_refs: 1
20190912145024_create_projects_indexes
readOnly_refs_1
readOnly_refs: 1
20190912145024_create_projects_indexes
tokenAccessReadOnly_refs_1
tokenAccessReadOnly_refs: 1
20190912145024_create_projects_indexes
tokenAccessReadAndWrite_refs_1
tokenAccessReadAndWrite_refs: 1
20190912145024_create_projects_indexes
tokens.readOnly_1
tokens.readOnly: 1
unique, partial (field exists)
20190912145024_create_projects_indexes
tokens.readAndWrite_1
tokens.readAndWrite: 1
unique, partial
20190912145024_create_projects_indexes
tokens.readAndWritePrefix_1
tokens.readAndWritePrefix: 1
unique, partial
20190912145024_create_projects_indexes
overleaf.history.id_1
overleaf.history.id: 1
unique, partial
20190912145024_create_projects_indexes
overleaf.id_1
overleaf.id: 1
unique, partial
20190912145024_create_projects_indexes
collabratecUsers.user_id_1
collabratecUsers.user_id: 1
sparse
20190912145024_create_projects_indexes
imageName_1
imageName: 1
20240730155209_create_project_imageName_index
reviewer_refs_1
reviewer_refs: 1
20241204103349_create_reviewer_refs_index
active_true_lastOpened_1
lastOpened: 1
partial (active: true)
20250320161029_update_inactive_project_index
Notes
Mongoose autoIndex is off (services/web/app/src/infrastructure/Mongoose.mjs:7): the index options in the schema only exist because the migrations above create them.
The migration 20250620152657_ensure_collaborator_arrays sets missing collaberator_refs, pendingEditor_refs, pendingReviewer_refs, readOnly_refs and reviewer_refs to [].