questionnaire docs
Architecture

Data Models

MongoDB schemas and relationships for all content models.

Data Models

All models live in models/ and are tenant-scoped via tenantId.

Entity relationship diagram

Tenant

File: models/Tenant.js

FieldTypePurpose
domainStringPrimary hostname
platformNameStringSite branding
adConfigObjectDefault ad units, KVs, provider
pixelConfigObjectGoogle/Meta/GA tracking
taboolaConfigObjectTaboola widgets
pushAlertConfigObjectPush notifications

Category

File: models/Category.js

FieldTypePurpose
slugStringURL path (/jobs)
questionnaireTypeStringTheme: questionnaire, whatsapp, guide, nothing
sectionsArrayCards + rows + HTML content
adConfigObjectCategory-specific ad overrides

Article

File: models/Article.js

FieldTypePurpose
slugStringURL path (/article/slug)
contentStringHTML body
applyLinksArrayExternal CTA links
adConfigObjectArticle-specific ad overrides

ArticleHome

File: models/ArticleHome.js

Editorial content for homepage cards and /home/[slug] pages. No ad system.

Questionnaire

File: models/Questionnaire.js

FieldTypePurpose
slugStringLinks to category
questionsArrayMulti-step questions with options
themeStringVisual theme variant

WhatsAppTheme

File: models/WhatsAppTheme.js

FieldTypePurpose
categorySlugStringLinks to category
profilePictureStringChat avatar URL
nameStringChat contact name
stepsArrayChat bubbles per step

Data flow pattern

Services return JSON.parse(JSON.stringify(doc)) for safe RSC serialization.

On this page