External Integrations

Overview of all third-party service integrations in the Renewa One backend. Each integration has a dedicated client or service, with credentials managed via GitHub Environment Secrets and synced to Fly.io on deploy.

Integration Map

ServiceClient LocationPurposeDedicated Page
HubSpotbackend/src/services/hubspot/ (14 files)Bidirectional CRM syncHubSpot Integration
DocuSignbackend/src/lib/docusign-client.tsE-signature workflowsDocuSign
Azure Entrabackend/src/services/entra/SSO / identity providerAzure Entra
Dataversebackend/src/lib/dataverse-client.tsMS Dynamics data importDataverse
Resendbackend/src/lib/email/Transactional emailResend Email
MessageBirdbackend/src/lib/sms/SMS messagingMessageBird SMS
Sentrybackend/src/lib/sentry.tsError trackingSentry
S3 / Tigrisbackend/src/lib/storage.tsObject file storageFiles
Upstash Redisbackend/src/lib/redis/Cache, job queues, rate limitingBackground Jobs

Credential Management

All external credentials are stored as GitHub Environment Secrets, never in code or config files.

SecretServiceNotes
HUBSPOT_CLIENT_IDHubSpotPublic OAuth app ID
HUBSPOT_CLIENT_SECRETHubSpotWebhook signature validation
ENCRYPTION_MASTER_KEYInternalEncrypts OAuth tokens at rest
SENTRY_DSN_BACKENDSentryError reporting endpoint
BIRD_API_KEYMessageBirdSMS API access
TIGRIS_*Tigris/S3Object storage credentials
UPSTASH_REDIS_*UpstashRedis connection

Secrets are synced from GitHub to Fly.io on every deploy via the --stage flag. See Deployment Pipeline, CI-CD Workflows.

Authentication Patterns

PatternUsed By
OAuth 2.0 (authorization code)HubSpot, DocuSign, Azure Entra
API keyMessageBird, Sentry
Access key + secretTigris/S3
Connection stringUpstash Redis

HubSpot and DocuSign OAuth tokens are stored encrypted in the database using ENCRYPTION_MASTER_KEY. See Library Utilities for the encryption module.

HubSpot Integration Detail

The largest integration with 14 dedicated service files:

FileResponsibility
auth.tsOAuth token management, automatic refresh
hubspot-sync.service.tsBidirectional sync orchestration
hubspot-webhook.service.tsWebhook event processing
contact-sync.tsContact sync logic
company-sync.tsCompany sync logic
deal-sync.tsDeal/quote sync
product-sync.tsProduct catalog sync
quote-sync.tsQuote sync
line-item-sync.tsLine item sync

See HubSpot Integration for full architecture.

Background Processing

Several integrations use Background Jobs for async processing:

QueueIntegration
Notification queueResend Email, MessageBird SMS
HubSpot sync queueHubSpot Integration
Webhook processingHubSpot Integration