From vivreal-knowledge
The CMS backend: collections, collection objects, integrations, media uploads, audit logging, content versioning. Maps to `NEXT_PUBLIC_CMS_URL`. Express + serverless-express on Lambda (Node 20, arm64), JavaScript, MongoDB/Mongoose, Cognito JWT via API Gateway, SAM. Read `C:\repos\VR_CMS_API\CLAUDE.md` for full route lists and depth.
How this skill is triggered — by the user, by Claude, or both
Slash command
/vivreal-knowledge:vivreal-cms-api-knowledgeThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
The CMS backend: collections, collection objects, integrations, media uploads, audit logging, content versioning. Maps to `NEXT_PUBLIC_CMS_URL`. Express + serverless-express on Lambda (Node 20, arm64), JavaScript, MongoDB/Mongoose, Cognito JWT via API Gateway, SAM. Read `C:\repos\VR_CMS_API\CLAUDE.md` for full route lists and depth.
The CMS backend: collections, collection objects, integrations, media uploads, audit logging, content versioning. Maps to NEXT_PUBLIC_CMS_URL. Express + serverless-express on Lambda (Node 20, arm64), JavaScript, MongoDB/Mongoose, Cognito JWT via API Gateway, SAM. Read C:\repos\VR_CMS_API\CLAUDE.md for full route lists and depth.
getCollectionInfo (read-only + dashboard + audit + versions reads), createAndUpdateColObjects (object CRUD + revert + bulk), createAndUpdateColGroups (schema CRUD), handleMedia (S3 presign), createAndUpdateIntegrations (integration CRUD + sync + payouts; also dual-mode: handles SQS events for scheduled social posts).
Per-Lambda layout: lambda.js → app.js → api/{index,handlers,controllers} → services/ → models/. Shared logic in src/shared/ via the @shared webpack alias (auditLog.js, contentVersion.js, createApp/createHandler, quota middleware).
dbKey via the key paramAll routes are under /tenant/. CMS reads the tenant DB key from req.query.key (Secure API uses dbKey — don't confuse). await dynamicDb.connect(dbKey) selects the group's database. Always pass it.
mainDb lookups: never { groupName }. active_ctx has only groupID + dbKey. Use { _id: groupID } or { key: dbKey } (here dbKey === group.key).
scripts/validators.js (Joi) → 2. services/myFeature.js → 3. services/index.js → 4. api/controllers/myFeature.js (set req.resData = {status, response}) → 5. api/controllers/index.js → 6. api/index.js (router.{method} via handleTenantRoutes) → 7. cloudformation/<lambda-fragment>.yaml (API Gateway event) → 8. tests (100% coverage gate).Step 7 is the most-missed. An Express route without the matching SAM event returns 403 (API Gateway doesn't know it, Cognito authorizer never fires). Never edit allRoutes.yaml directly — it's generated by scripts/merge-template.js on build.
handleTenantRoutes (older docs say handleHBRoutes — actual export is handleTenantRoutes). Controller sets req.resData.src/shared/auditLog.js) — fire-and-forget, lazy Mongoose model registration, 10 controllers instrumented. If it fails the main op still succeeds.src/shared/contentVersion.js) — createVersion (auto-increment + tier-based pruning), hooked into create/update/delete; revert via PUT /tenant/collectionObject/revert. Versioning lives ONLY here, not Secure API.services/sync/) — provider adapter pattern (collectionName, fetchExternalItems, mapToDocument, getExternalId). bulkWrite upsert keyed on external ID (idempotent). Stripe works immediately; social adapters need OAuth creds (throw MISSING_CREDENTIALS). Called by VR_Secure_API, not the portal directly.publishDate: null = draft (hidden from public). Scheduling via EventBridge → SQS FIFO → integrations Lambda.Extension.Crash). OTEL collector layer caused this; removed March 2026. FFmpeg layer must also be arm64.collectionObjects.refID, .publishDate, sites.groupID.createStripeIntegrationObject.js:118 undefined extra; updateIntegrationObject.js:54 undefined id/bucketName.Auth: NONE (validates Stripe signature instead).Provides CDSS development patterns for drug interaction checking, dose validation, clinical scoring (NEWS2, qSOFA), and alert classification integrated into EMR workflows.
npx claudepluginhub hillbombcreations/vivreal-skills --plugin vivreal-knowledge