Appearance
Quick Start
Get Pulse running on your website in 3 steps.
Prerequisites
You need:
- Your Publishable Key (
pk_...) — from the Admin Panel - Your Secret Key (
sk_...) — from the Admin Panel - The Endpoint URL — the Pulse server URL provided to you (e.g.,
https://pulse.hire.rest)
Step 1: Mint a Token (Backend)
Your backend creates a token for each user by calling the Pulse token endpoint with your secret key.
javascript
app.get('/api/collab-token', async (req, res) => {
// req.user comes from your existing auth (session, JWT, etc.)
const response = await fetch('https://pulse.hire.rest/auth/token', {
method: 'POST',
headers: {
'Authorization': 'Bearer sk_your_secret_key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
userId: req.user.id,
name: req.user.displayName,
avatar: req.user.avatarUrl // optional
})
});
const { token } = await response.json();
res.json({ token });
});python
@app.route('/api/collab-token')
@login_required
def collab_token():
resp = requests.post(
'https://pulse.hire.rest/auth/token',
headers={'Authorization': 'Bearer sk_your_secret_key'},
json={
'userId': current_user.id,
'name': current_user.display_name,
'avatar': current_user.avatar_url # optional
}
)
return jsonify(resp.json())php
Route::get('/api/collab-token', function (Request $request) {
$response = Http::withHeaders([
'Authorization' => 'Bearer sk_your_secret_key',
])->post('https://pulse.hire.rest/auth/token', [
'userId' => auth()->id(),
'name' => auth()->user()->name,
'avatar' => auth()->user()->avatar_url,
]);
return $response->json();
});go
func collabTokenHandler(w http.ResponseWriter, r *http.Request) {
user := getUserFromSession(r) // your auth
body, _ := json.Marshal(map[string]string{
"userId": user.ID,
"name": user.DisplayName,
"avatar": user.AvatarURL,
})
req, _ := http.NewRequest("POST", "https://pulse.hire.rest/auth/token", bytes.NewReader(body))
req.Header.Set("Authorization", "Bearer sk_your_secret_key")
req.Header.Set("Content-Type", "application/json")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
io.Copy(w, resp.Body)
}This returns { "token": "eyJ..." } — a short-lived JWT that identifies this user.
Step 2: Add Pulse to Your Page (Frontend)
Add the script tag and the widget:
html
<!-- Load Pulse SDK -->
<script src="https://pulse.hire.rest/sdk/pulse.js"></script>
<script>
// Fetch a token from YOUR backend
async function initPulse() {
const res = await fetch('/api/collab-token');
const { token } = await res.json();
// Create the widget
const widget = document.createElement('pulse-widget');
widget.setAttribute('api-key', 'pk_your_publishable_key');
widget.setAttribute('token', token);
widget.setAttribute('room', 'dashboard'); // unique per page
widget.setAttribute('endpoint', 'wss://pulse.hire.rest');
document.body.appendChild(widget);
}
initPulse();
</script>Step 3: Open in Two Tabs
Open your page in two browser tabs (or two different browsers). You'll see:
- A floating toolbar in the bottom-right corner
- Presence avatars showing both users
- Live cursors moving across the page
- A pin icon to click anywhere and leave a comment
- Threaded comments with replies, @mentions, and reactions
That's it — real-time collaboration is live on your site.
What's Next?
- Widget Configuration — Position, display modes, and all options
- Theming — Match Pulse to your brand colors
- REST API — Create threads and comments from your backend
- Admin Panel — Manage your environments and data