Overview
Velt supports self-hosting your activity log PII data:- Activity content (comment text embedded in change history), feature-specific entity snapshots, and custom fields can be stored on your own infrastructure, with only necessary identifiers on Velt servers.
- Velt components automatically re-hydrate activity data in the frontend by fetching from your configured data provider.
- This gives you full control over PII while maintaining all Velt activity log features.
How does it work?
When activity records are created or read:- The SDK uses your configured
ActivityAnnotationDataProviderto handle storage and retrieval. - Your data provider implements two optional methods:
get: Fetches activity PII from your database and returns it for re-hydrationsave: Stores PII fields stripped from the activity record before Velt writes to its backend
- The SDK strips configured PII fields from the activity record.
- Your
savehandler receives the stripped data and stores it in your backend. - Velt’s backend stores only the minimal identifiers.
- The SDK fetches the activity records from Velt’s backend (with PII absent).
- Your
gethandler is called with the activity IDs. - The SDK merges the returned PII back into the activity records before delivering them to your UI.
ActivityRecord.isActivityResolverUsedis set totruewhen PII was stripped by the resolver. Use this to show a loading state while re-hydration is pending.
Implementation
Function based DataProvider
Implement customget and save methods to handle data operations yourself.
get
Fetch activity PII from your database. Called when activity records need to be re-hydrated in the frontend.- Param:
GetActivityResolverRequest - Return:
Promise<ResolverResponse<Record<string, PartialActivityRecord>>>
- React / Next.js
- Other Frameworks
save
Store activity PII fields stripped before Velt writes to its backend. Called when an activity record is created or updated.- Param:
SaveActivityResolverRequest - Return:
Promise<ResolverResponse<undefined>>
- React / Next.js
- Other Frameworks
config
Configuration for the activity data provider.- Type:
ResolverConfig. Relevant properties:resolveTimeout: Timeout duration (in milliseconds) for resolver operations.fieldsToRemove:string[]. Additional fields to strip from activity records before writing to Velt’s backend (e.g.,['customSensitiveField']).
Complete Example
- React / Next.js
- Other Frameworks
Loading State
UseisActivityResolverUsed on ActivityRecord to show a loading state while PII is being fetched from your backend:

