Overview
Velt supports self-hosting your reactions and related data:- Reactions can be stored on your own infrastructure, with only necessary identifiers on Velt servers.
- Velt Components automatically hydrate reaction data in the frontend by fetching from your configured data provider.
- This gives you full control over reaction data while maintaining all Velt collaboration features.
- This automatically also ensures that the in-app notifications content related to reactions is not stored on Velt servers. The content is generated using the reactions data in the frontend.
How does it work?
- When reactions are created, updated, deleted or requested, the SDK uses your configured
ReactionAnnotationDataProviderto handle storage and retrieval - The data provider implements
get,save, anddeletemethods to interact with your database - Velt handles the data mapping and realtime synchronization while delegating persistence of actual content to your infrastructure
- For write requests (save, delete), the operation is first performed on your database and only if we get a success response, the SDK will perform the operation on the Velt server. If the operation fails on your database, the SDK will not perform the operation on the Velt server.
- You can configure retries, timeouts, etc. for the data provider.
get
Method to fetch reactions from your database. On error we will retry.- Param:
GetReactionResolverRequest - Return:
Promise<ResolverResponse<Record<string, PartialReactionAnnotation>>>
save
Save reactions to your database. Return a success or error response. On error we will retry.- Param:
SaveReactionResolverRequest - Return:
Promise<ResolverResponse<T>>
delete
Delete reactions from your database. Return a success or error response. On error we will retry.- Param:
DeleteReactionResolverRequest - Return:
Promise<ResolverResponse<T>>
config
Configuration for the reaction data provider.- Type:
ResolverConfig
Example Implementation
- React / Next.js
- Other Frameworks

