Skip to content
DashboardWebsite

Storage

This page explains how OpenTremor stores product data and how its storage interfaces are divided. Operators can use it to understand the storage model; developers can use it to find the backend contract.

OpenTremor uses MongoDB for storage. Product resources are content-addressed: OpenTremor hashes normalized content and stores each resource once per org. Changeset entries link resources to changesets, so the same resource can appear in multiple changesets.

Deduplication stops at the org boundary. The same content submitted by different orgs is stored separately because the resource body can contain tenant-identifying data.

See Architecture — Data model for the entity relationship diagram. See MongoDB storage for collections, indexes, and document fields.

OpenTremor defines interfaces for platform data and product data. PlatformStorageBackend covers organizations, users, memberships, API keys, telemetry, audit events, and other platform data. ProductStorageBackend covers resources, changesets, findings, jobs, rules, and other product data.

StorageBackend combines both interfaces. The MongoDB implementation uses one connection and database for both domains. MongoDB is the only supported backend; configuration requires storage.mongodb.uri and storage.mongodb.database (or MONGODB_URI).

See the source contracts in OpenTremor-platform/src/opentremor_platform/controllers/storage/platform_base.py and OpenTremor-core/src/opentremor_core/controllers/storage/product_base.py. The combined interface is in OpenTremor-core/src/opentremor_core/controllers/storage/base.py.