---
type: community
cohesion: 0.01
members: 196
---

# Convex Backend Core

**Cohesion:** 0.01 - loosely connected
**Members:** 196 nodes

## Members
- [[addonPrices.ts]] - code - convex/superadmin/addonPrices.ts
- [[aggregated.ts]] - code - convex/lib/bulkJobs/aggregated.ts
- [[ai.ts]] - code - convex/schema/ai.ts
- [[aiAssistant.ts]] - code - convex/actions/aiAssistant.ts
- [[aiAssistantHelpers.ts]] - code - convex/aiAssistantHelpers.ts
- [[aiChat.ts]] - code - convex/aiChat.ts
- [[analytics.ts]] - code - convex/actions/analytics.ts
- [[analytics.ts_1]] - code - convex/schema/analytics.ts
- [[analyticsHelpers.ts]] - code - convex/analyticsHelpers.ts
- [[api.d.ts]] - code - convex/_generated/api.d.ts
- [[apiServers.ts]] - code - convex/apiServers.ts
- [[applyDiffInline()]] - code - convex/configContacts.ts
- [[asaasApi.ts]] - code - convex/actions/asaasApi.ts
- [[asaasRequest()]] - code - convex/actions/asaasApi.ts
- [[assertApiServerAllowedForCaller()]] - code - convex/configPage.ts
- [[assertSelfOrSuperadmin()]] - code - convex/notifications.ts
- [[assertStorageOwnership()]] - code - convex/storage.ts
- [[auth.ts_1]] - code - convex/schema/auth.ts
- [[authHelpers.ts]] - code - convex/lib/authHelpers.ts
- [[automations.ts_1]] - code - convex/schema/automations.ts
- [[billing.ts]] - code - convex/billing.ts
- [[billing.ts_1]] - code - convex/schema/billing.ts
- [[billingInternal.ts]] - code - convex/billingInternal.ts
- [[brazilianPhoneVariations()]] - code - convex/aiAssistantHelpers.ts
- [[buildEventPayload()]] - code - convex/lib/sentryBackend.ts
- [[buildHeaders()]] - code - convex/actions/processBulkGroupCreateJob.ts
- [[buildSystemPrompt()]] - code - convex/actions/aiAssistant.ts
- [[bulk.ts]] - code - convex/schema/bulk.ts
- [[bulkJobsInternal.ts]] - code - convex/bulkJobsInternal.ts
- [[calculateLockoutExpiry()]] - code - convex/lib/authHelpers.ts
- [[callGroupEditApi()]] - code - convex/actions/processBulkGroupEditJob.ts
- [[callUpdateParticipant()]] - code - convex/actions/processBulkMemberJob.ts
- [[campaigns.ts_1]] - code - convex/schema/campaigns.ts
- [[cancelJobImpl()]] - code - convex/lib/bulkJobs/shared.ts
- [[cancelSyncImpl()]] - code - convex/lib/bulkJobs/shared.ts
- [[captureBackendException()]] - code - convex/lib/sentryBackend.ts
- [[checkCannotSelfDemote()]] - code - convex/userManagement.ts
- [[checkConnection()]] - code - convex/actions/processBulkGroupEditJob.ts
- [[checkConnection()_1]] - code - convex/actions/processBulkMemberJob.ts
- [[checkInstanceStatus.ts]] - code - convex/actions/checkInstanceStatus.ts
- [[checkSuperadminQuorum()]] - code - convex/userManagement.ts
- [[classifyTrial()]] - code - convex/lib/trialExpiry.ts
- [[cleanup.ts]] - code - convex/cleanup.ts
- [[computeMonthlyTotal()]] - code - convex/billing.ts
- [[computeProrate()]] - code - convex/billing.ts
- [[config.ts]] - code - convex/config.ts
- [[configContacts.ts]] - code - convex/configContacts.ts
- [[configPage.ts]] - code - convex/configPage.ts
- [[configPageDelete.ts]] - code - convex/configPageDelete.ts
- [[contacts.ts]] - code - convex/contacts.ts
- [[contacts.ts_1]] - code - convex/schema/contacts.ts
- [[countSuperadmins()]] - code - convex/userManagement.ts
- [[createGroupCreateJobImpl()]] - code - convex/lib/bulkJobs/groupCreateJobs.ts
- [[createGroupEditJobImpl()]] - code - convex/lib/bulkJobs/groupEditJobs.ts
- [[createInstanceOnProvider()]] - code - convex/actions/whatsapp/instance.ts
- [[createMemberJobImpl()]] - code - convex/lib/bulkJobs/memberJobs.ts
- [[createRetryMemberJobImpl()]] - code - convex/lib/bulkJobs/memberJobs.ts
- [[crm.ts]] - code - convex/crm.ts
- [[crm.ts_1]] - code - convex/schema/crm.ts
- [[crmActivities.ts]] - code - convex/crmActivities.ts
- [[crmAutomations.ts]] - code - convex/crmAutomations.ts
- [[crmTasks.ts]] - code - convex/crmTasks.ts
- [[crons.ts]] - code - convex/crons.ts
- [[dashboard.ts]] - code - convex/dashboard.ts
- [[decideDeletePolicy()]] - code - convex/superadmin/tiers.ts
- [[detectJobTypeImpl()]] - code - convex/lib/bulkJobs/shared.ts
- [[dispatchImpl()]] - code - convex/crmAutomations.ts
- [[enforceConfigScope()]] - code - convex/aiAssistantHelpers.ts
- [[entitlements.ts]] - code - convex/entitlements.ts
- [[eventDispatcher.ts]] - code - convex/actions/eventDispatcher.ts
- [[events.ts]] - code - convex/schema/events.ts
- [[executeSingleAction()]] - code - convex/crmAutomations.ts
- [[executeTool()]] - code - convex/actions/aiAssistant.ts
- [[fetch()]] - code - workers/grpnl-redirect/index.js
- [[fetchConnectionState()]] - code - convex/actions/checkInstanceStatus.ts
- [[fetchGroupPicture()]] - code - convex/refreshGroupPictures.ts
- [[fetchMediaAsBase64()]] - code - convex/actions/processScheduledMessage.ts
- [[fetchParticipantsFromApi()]] - code - convex/actions/syncParticipants.ts
- [[fetchProfilePicUrl()]] - code - convex/actions/checkInstanceStatus.ts
- [[findExistingInstanceOnProvider()]] - code - convex/actions/whatsapp/instance.ts
- [[getActiveGroupCreateJobsImpl()]] - code - convex/lib/bulkJobs/groupCreateJobs.ts
- [[getActiveGroupEditJobsImpl()]] - code - convex/lib/bulkJobs/groupEditJobs.ts
- [[getActiveMemberJobsImpl()]] - code - convex/lib/bulkJobs/memberJobs.ts
- [[getActivePhotoBackfillJobsImpl()]] - code - convex/lib/bulkJobs/aggregated.ts
- [[getActiveSyncsImpl()]] - code - convex/lib/bulkJobs/shared.ts
- [[getAllJobsForConfigsImpl()]] - code - convex/lib/bulkJobs/aggregated.ts
- [[getAsaasConfig()]] - code - convex/actions/asaasApi.ts
- [[getGroupCreateJobImpl()]] - code - convex/lib/bulkJobs/groupCreateJobs.ts
- [[getGroupCreateQueueImpl()]] - code - convex/lib/bulkJobs/groupCreateJobs.ts
- [[getGroupEditJobImpl()]] - code - convex/lib/bulkJobs/groupEditJobs.ts
- [[getGroupEditQueueImpl()]] - code - convex/lib/bulkJobs/groupEditJobs.ts
- [[getMemberJobForRetryImpl()]] - code - convex/lib/bulkJobs/memberJobs.ts
- [[getMemberJobImpl()]] - code - convex/lib/bulkJobs/memberJobs.ts
- [[getMemberQueueImpl()]] - code - convex/lib/bulkJobs/memberJobs.ts
- [[getStripeHeaders()]] - code - convex/actions/stripeApi.ts
- [[groupCreateJobs.ts]] - code - convex/lib/bulkJobs/groupCreateJobs.ts
- [[groupDetail.ts]] - code - convex/groupDetail.ts
- [[groupEditJobs.ts]] - code - convex/lib/bulkJobs/groupEditJobs.ts
- [[groups.ts_2]] - code - convex/schema/groups.ts
- [[groupsPage.ts]] - code - convex/groupsPage.ts
- [[healthCheckHelpers.ts]] - code - convex/healthCheckHelpers.ts
- [[healthReport.ts]] - code - convex/healthReport.ts
- [[hexDecode()_1]] - code - convex/lib/authHelpers.ts
- [[hexEncode()_1]] - code - convex/lib/authHelpers.ts
- [[idempotency.ts]] - code - convex/idempotency.ts
- [[idempotency.ts_1]] - code - convex/schema/idempotency.ts
- [[index.js]] - code - workers/grpnl-redirect/index.js
- [[insertNotification()]] - code - convex/lib/notificationHelpers.ts
- [[instances.ts]] - code - convex/instances.ts
- [[instances.ts_1]] - code - convex/schema/instances.ts
- [[isAccountLocked()]] - code - convex/lib/authHelpers.ts
- [[isAllowedUazapiHost()]] - code - convex/lib/urlValidation.ts
- [[isForbiddenHost()]] - code - convex/lib/urlValidation.ts
- [[isLikelyLid()_1]] - code - convex/configContacts.ts
- [[isLikelyLid()]] - code - convex/contacts.ts
- [[isMimeAllowedForKind()]] - code - convex/storage.ts
- [[isRemoteUrl()]] - code - convex/actions/processScheduledMessage.ts
- [[isSessionExpired()]] - code - convex/lib/authHelpers.ts
- [[isValidEmail()]] - code - convex/lib/authHelpers.ts
- [[listRecentByConfigImpl()]] - code - convex/lib/bulkJobs/aggregated.ts
- [[logPlanAudit()]] - code - convex/superadmin/tiers.ts
- [[logUserAudit()]] - code - convex/userManagement.ts
- [[markGroupCreateJobFailedImpl()]] - code - convex/lib/bulkJobs/groupCreateJobs.ts
- [[markJobFailedImpl()]] - code - convex/lib/bulkJobs/shared.ts
- [[matchesTriggerConfig()]] - code - convex/crmAutomations.ts
- [[memberJobs.ts]] - code - convex/lib/bulkJobs/memberJobs.ts
- [[messageAnalytics.ts]] - code - convex/messageAnalytics.ts
- [[messages.ts_2]] - code - convex/schema/messages.ts
- [[normalizeEmail()]] - code - convex/lib/authHelpers.ts
- [[normalizeParticipant()]] - code - convex/actions/syncParticipants.ts
- [[notificationHelpers.ts]] - code - convex/lib/notificationHelpers.ts
- [[notifications.ts]] - code - convex/notifications.ts
- [[notifications.ts_1]] - code - convex/schema/notifications.ts
- [[notifyWhatsApp()]] - code - convex/lib/notifyWhatsApp.ts
- [[notifyWhatsApp.ts]] - code - convex/lib/notifyWhatsApp.ts
- [[observability.ts]] - code - convex/observability.ts
- [[observability.ts_1]] - code - convex/schema/observability.ts
- [[otp.ts]] - code - convex/schema/otp.ts
- [[parseDsn()]] - code - convex/lib/sentryBackend.ts
- [[payments.ts]] - code - convex/payments.ts
- [[paymentsInternal.ts]] - code - convex/paymentsInternal.ts
- [[processBulkGroupCreateJob.ts]] - code - convex/actions/processBulkGroupCreateJob.ts
- [[processBulkGroupEditJob.ts]] - code - convex/actions/processBulkGroupEditJob.ts
- [[processBulkMemberJob.ts]] - code - convex/actions/processBulkMemberJob.ts
- [[processGroupWebhook.ts]] - code - convex/processGroupWebhook.ts
- [[processRecurringMessage.ts]] - code - convex/actions/processRecurringMessage.ts
- [[processScheduledMessage.ts]] - code - convex/actions/processScheduledMessage.ts
- [[profiles.ts]] - code - convex/profiles.ts
- [[randomDelay()]] - code - convex/actions/processBulkGroupCreateJob.ts
- [[randomDelay()_1]] - code - convex/actions/processBulkGroupEditJob.ts
- [[randomDelay()_2]] - code - convex/actions/processBulkMemberJob.ts
- [[readEnv()]] - code - convex/lib/notifyWhatsApp.ts
- [[recurringMessages.ts]] - code - convex/recurringMessages.ts
- [[redactSecrets()]] - code - convex/lib/sentryBackend.ts
- [[refreshGroupPictures.ts]] - code - convex/refreshGroupPictures.ts
- [[refreshGroupPicturesHelpers.ts]] - code - convex/refreshGroupPicturesHelpers.ts
- [[resolveAuthenticatedAsaasContext()]] - code - convex/actions/asaasApi.ts
- [[sanitizeBaseUrl()]] - code - convex/actions/checkInstanceStatus.ts
- [[sanitizeDoc()]] - code - convex/aiAssistantHelpers.ts
- [[scheduledMessages.ts]] - code - convex/scheduledMessages.ts
- [[scheduledMessagesInternal.ts]] - code - convex/scheduledMessagesInternal.ts
- [[sendWhatsAppAlert()]] - code - convex/healthReport.ts
- [[sentryBackend.ts]] - code - convex/lib/sentryBackend.ts
- [[setAllProfilesEnterprise.ts]] - code - convex/migrations/setAllProfilesEnterprise.ts
- [[settings.ts]] - code - convex/settings.ts
- [[shared.ts_1]] - code - convex/lib/bulkJobs/shared.ts
- [[shared.ts_2]] - code - convex/schema/shared.ts
- [[shouldFetchProfilePic()]] - code - convex/actions/checkInstanceStatus.ts
- [[shouldLockAccount()]] - code - convex/lib/authHelpers.ts
- [[sleep()]] - code - convex/actions/processBulkGroupCreateJob.ts
- [[storage.ts_1]] - code - convex/schema/storage.ts
- [[storage.ts]] - code - convex/storage.ts
- [[stripeApi.ts]] - code - convex/actions/stripeApi.ts
- [[stripeRequest()]] - code - convex/actions/stripeApi.ts
- [[sync.ts_1]] - code - convex/schema/sync.ts
- [[sync.ts]] - code - convex/sync.ts
- [[syncGroups.ts]] - code - convex/actions/syncGroups.ts
- [[syncParticipants.ts]] - code - convex/actions/syncParticipants.ts
- [[tags.ts_1]] - code - convex/schema/tags.ts
- [[tags.ts]] - code - convex/tags.ts
- [[tagsMigration.ts]] - code - convex/tagsMigration.ts
- [[templates.ts]] - code - convex/templates.ts
- [[tiers.ts]] - code - convex/lib/tiers.ts
- [[tiers.ts_1]] - code - convex/superadmin/tiers.ts
- [[trialExpiry.ts]] - code - convex/lib/trialExpiry.ts
- [[urlValidation.ts]] - code - convex/lib/urlValidation.ts
- [[userBilling.ts]] - code - convex/userBilling.ts
- [[userManagement.ts]] - code - convex/userManagement.ts
- [[validateApiServerForUser()]] - code - convex/configPage.ts
- [[validateFilters()]] - code - convex/aiAssistantHelpers.ts
- [[validatePublicHttpsUrl()]] - code - convex/lib/urlValidation.ts
- [[validateUpsertPlanArgs()]] - code - convex/superadmin/tiers.ts
- [[webhook.ts]] - code - convex/actions/whatsapp/webhook.ts
- [[webhooks.ts_1]] - code - convex/schema/webhooks.ts
- [[webhooks.ts]] - code - convex/webhooks.ts
- [[whatsappApiHelpers.ts]] - code - convex/whatsappApiHelpers.ts

## Live Query (requires Dataview plugin)

```dataview
TABLE source_file, type FROM #community/Convex_Backend_Core
SORT file.name ASC
```

## Connections to other communities
- 13 edges to [[_COMMUNITY_Automation Rules & Access]]
- 11 edges to [[_COMMUNITY_Groups & Messages Backend]]
- 3 edges to [[_COMMUNITY_Security & Hashing]]
- 2 edges to [[_COMMUNITY_Community 37]]
- 2 edges to [[_COMMUNITY_Feature Entitlements]]
- 1 edge to [[_COMMUNITY_Community 52]]
- 1 edge to [[_COMMUNITY_Logger & Edge Dispatch]]
- 1 edge to [[_COMMUNITY_Schedule Helpers]]
- 1 edge to [[_COMMUNITY_Community 53]]
- 1 edge to [[_COMMUNITY_Community 36]]
- 1 edge to [[_COMMUNITY_Form Handlers UI]]
- 1 edge to [[_COMMUNITY_Admin Group Creation]]

## Top bridge nodes
- [[api.d.ts]] - degree 130, connects to 10 communities
- [[fetch()]] - degree 21, connects to 4 communities
- [[createInstanceOnProvider()]] - degree 3, connects to 1 community
- [[findExistingInstanceOnProvider()]] - degree 3, connects to 1 community
- [[webhook.ts]] - degree 2, connects to 1 community