9e41e83818
* Reordered react hooks + frontend sections * Updated the overview and nav * Separated out SWR hooks * Restructured metadata sections * Improved backend docs * Fixed broken link * Fixed broken links * Updated the structure * Restructured overview * Updated examples cards * Improved overview * Updated how it works * Updated auth * Added type safety to the run object page * made the subscribe description clearer * Fixed links in triggering * Fixed link * Removed examples footers * Copy tweak * Consolidated metadata and subscribe pages * moved metadata task examples to metadata * Fixed links * Fixing links like zelda * Removed dead import * Clearer titles * Cap R for Realtime * Fixes broken link --------- Co-authored-by: James Ritchie <james@trigger.dev>
40 lines
2.2 KiB
Plaintext
40 lines
2.2 KiB
Plaintext
---
|
|
title: Realtime overview
|
|
sidebarTitle: Overview
|
|
description: Using the Trigger.dev Realtime API to trigger and/or subscribe to runs in real-time.
|
|
---
|
|
|
|
Trigger.dev Realtime allows you to trigger, subscribe to, and get real-time updates for runs. This is useful for monitoring runs, updating UIs, and building real-time dashboards.
|
|
|
|
You can subscribe to real-time updates for different scopes of runs:
|
|
|
|
- **Specific runs** - Monitor individual run progress by run ID
|
|
- **Runs with specific tags** - Track all runs that have certain [tags](/tags) (e.g., all runs tagged with `user:123`)
|
|
- **Batch runs** - All runs within a specific batch
|
|
- **Trigger + subscribe combos** - Trigger a task and immediately subscribe to its run (frontend only)
|
|
|
|
Once subscribed, you'll receive the complete [run object](/realtime/run-object) with automatic real-time updates whenever the [run changes](/realtime/how-it-works#run-changes), including:
|
|
|
|
- **Status changes** - queued → executing → completed, etc.
|
|
- **Metadata updates** - Custom progress tracking, status updates, user data, etc. ([React hooks](/realtime/react-hooks/subscribe#using-metadata-to-show-progress-in-your-ui) | [backend](/realtime/backend/subscribe#subscribe-to-metadata-updates-from-your-tasks))
|
|
- **Tag changes** - When [tags](/tags) are added or removed from the run
|
|
- **Stream data** - Real-time data chunks from your tasks, perfect for AI/LLM streaming ([React hooks](/realtime/react-hooks/streams) | [backend](/realtime/backend/streams))
|
|
|
|
## Using Realtime in your applications
|
|
|
|
### Authentication
|
|
|
|
All Realtime subscriptions require authentication so you can securely trigger and subscribe to runs. See our [authentication guide](/realtime/auth) for more details.
|
|
|
|
### Frontend implementation
|
|
|
|
Use our React hooks to build real-time UIs that update as runs execute. Ideal for progress bars, status indicators, and live dashboards.
|
|
|
|
→ **[See our React hooks guide](/realtime/react-hooks/)**
|
|
|
|
### Backend implementation
|
|
|
|
Use our server-side SDK to subscribe to runs from your backend code, other tasks, or serverless functions. Perfect for triggering workflows, sending notifications, or updating databases based on run status changes.
|
|
|
|
→ **[See our Backend guide](/realtime/backend)**
|