Skip to main content

Frontend-Backend Integration

This page explains how form events flow from the user interface to your backend and back, and maps each FormHostProvider method to the backend handler that serves it.

Communication Flow

When a user interacts with a form:

  1. User Action — user clicks a button, changes a field, or interacts with a table
  2. SDK Event — the Buildocs UI Engine SDK detects the action and creates an event
  3. FormHostProvider — your HostBridge method receives the event
  4. Backend API — your handler calls your backend endpoint
  5. Business Logic — your backend processes the event and applies business rules
  6. Response — your backend returns feCommand instructions
  7. SDK Execution — the SDK automatically executes the returned commands
  8. UI Updates — the form updates in real-time

For the full FormHostProvider implementation, useBuildocsApi reference, and customization patterns, see the FormHostProvider API Reference.


HostBridge → Backend Handler Map

Each method in your FormHostProvider HostBridge corresponds to a backend endpoint. The table below maps them and links to the full implementation guide for each.

HostBridge methodBackend handler
runFormEventRunEvent Handler
runFormUploadFilesUpload Files Handler
runFormDeleteFileEventDelete File Handler
runFormDownloadFileEventDownload File Handler
runFormGetLinkedFileEventGet Linked File Handler
runFormGetLinkedFileMetaEventGet Linked File Meta Handler
runFormGetLinkedFileByChunksGet Linked File By Chunks

Implementation Order

We recommend implementing backend handlers in this order:

  1. RunEvent Handler — start here, handles all form interactions
  2. Upload Files Handler — enable file uploads
  3. Get Linked File Meta Handler — add file metadata support
  4. Download File Handler — enable file downloads
  5. Delete File Handler — add file deletion
  6. Get Linked File Handler — small file previews (optional)
  7. Get Linked File By Chunks — large files and streaming (optional)