Skip to content

MongoDB Collections

MongoDB is used as the operational projection of the platform. It stores product state that must be queried quickly: profiles, access policies, content metadata, subscriptions, billing, activity and moderation records.

Collection groups

GroupDocumentsPurpose
Identityuser profiles, author profilesWallet-linked identity and author public profile state.
Accessaccess policies, subscription plans, entitlementsReusable access rules and backend access projections.
Contentposts, post attachments, comments, reports, projects, project nodesAuthor-owned content and file tree metadata.
Billingplatform plans, author platform subscriptions, cleanup audit entriesAuthor-to-platform features, quotas and cleanup history.
Operationscontract deployments, activity recordsRuntime contract lookup and lightweight notifications.

Why MongoDB fits this model

The product has nested documents and fast-changing product state: access policy trees, project folder nodes, activity entries, comments and attachment metadata. MongoDB keeps those records close to the shapes returned by the API while still allowing indexes for author feeds, published content, project nodes and active entitlements.

Backend projection of blockchain state

Smart contracts emit payment events, but the backend stores the access-friendly result in MongoDB. For reader subscriptions this result is an entitlement with validUntil. For platform billing this result is the author billing state with enabled features, included storage and extra storage.

This avoids re-reading historical blockchain logs on every content request while still anchoring paid access in verified contract events.