Two Node.js services share one data universe: pinntagBackend (NestJS + Mongoose) owns the canonical platform data, while pinntagAI (Express + Mongoose) keeps its own database for AI state and telemetry and opens a second connection into the backend database. Every violet-to-teal link below is a bare ObjectId crossing that service boundary — never a populatable in-database ref.
Surfaced while reading every model file — worth knowing before trusting a ref or an index.
event/models/likedEvent.model.ts (backend) is an empty file — no LikedEvent model exists; liked events live on User.likedEvents.ETL_Job refs 'ETL_URL_Group' / 'ETL_URL', but the registered model names are ETL_Source_Group / ETL_Source — populate on those paths will fail.RewardLocation.reward declares ref: 'Event' although it semantically points at Reward.Brand.industryId refs 'Industry'; no model with that name is registered (the real model is BusinessIndustry).Scratch, RewardVisit declare refs to Staff and SupportCase — neither model exists in either repo. Their index definitions also use field names (userId, rewardProgramId) that don't match the actual schema fields.StripeEvent imports Subscription from rxjs instead of the subscription model, and extends an undefined Document.Category / ContentSubCategory import Admin from the mongodb package for their createdBy ref (resolves to the "Admin" name by accident).Refferal (sic) — referral model and collection are misspelled throughout.UploadedEvent exports its schema as EventSchema, colliding by name with the real event schema.business.model.ts registers the same Business schema on both of its connections; Review, CreditWallet, UserFootprint live in the backend DB but are defined only in the pinntagAI repo.UserFootprint defines action/target enums but stores both as plain strings (strict:false, unenforced).Otp 5 min · GuestSession 24 h · UserSearchActivity 30 d · Token expires at expiresAt.