Skip to main content
The SDK repository contains example projects for the integrations below. These are demos, with their own setup scripts and shortcuts. Use the linked current API guides when adapting them, and check the SDK version in the example’s package file.

Before running an example

  • Read its server configuration and environment template. Several SSO demos use a process-wide in-memory session and placeholder API credentials. Replace those with authenticated per-user sessions and real server credentials before connecting real users.
  • In the reviewed Bun/React and framework SSO demos, TIMEBACK_DEMO_SEND_ACTIVITY defaults to off. Hooks return null and suppress completion and time events. Seeing a preview log is not evidence of ingestion.
  • Browser client initialization is not authentication. Start an activity from a user action after authentication and await end() before starting another. Automatic mount/cleanup effects can race asynchronous completion, including during development remounts.
  • Example setup scripts can create remote resources. Review their environment and operations before running them. A local route check does not validate downstream analytics or durable delivery.

Choose a project

bun-react

Bun and React SSO/activity demo. Source at the reviewed revision · Integration guide.

bun-react-full

Bun/React demo with direct API access. Source at the reviewed revision · Integration guide.

bun-react-gradeless

Course-code selection without a grade. Source at the reviewed revision · Integration guide.

bun-react-identity-only

Identity-only SSO without the activity API. Source at the reviewed revision · Integration guide.

bun-react-resumable

Multi-session activity demo. Source at the reviewed revision · Integration guide.

express

Express server adapter demo. Source at the reviewed revision · Integration guide.

express-auth0

Custom identity using an Auth0-backed session. Source at the reviewed revision · Integration guide.

express-auth0-launch-gate

Auth0 bearer-token and launch-entry demo. Source at the reviewed revision · Integration guide.

express-supabase

Custom identity using a Supabase-backed session. Source at the reviewed revision · Integration guide.

nextjs-app-router

Next.js App Router integration. Source at the reviewed revision · Integration guide.

nuxt

Nuxt server and Vue browser integration. Source at the reviewed revision · Integration guide.

qti-with-powerpath

PowerPath/QTI assessment demonstration. Source at the reviewed revision · Integration guide.

solid-start

SolidStart server and Solid browser integration. Source at the reviewed revision · Integration guide.

svelte-kit

SvelteKit hooks and browser stores. Source at the reviewed revision · Integration guide.

tanstack-start

TanStack Start server and React browser integration. Source at the reviewed revision · Integration guide.

Adapt activity tracking

Use the single-session guide for a start → complete flow. For resumable work, persist your own activity state and use stateful activities. The browser tracker owns timers; the server activity.record() method records supplied metrics and optional measured time. App-supplied xpEarned is not automatically calculated from duration or gated at 80% accuracy by the custom activity SDK. Implement the agreed policy in your application and verify the emitted data. The course progress guide explains the separate analytics-based progress calculation and its limits.

Adapt managed lessons

The qti-with-powerpath example has its own setup data, quiz routes, thresholds, and renderer. Its question counts and expected question totals are demonstration configuration, not universal PowerPath guarantees. Use Managed Lessons for the current browser/server contract. Linear answer submission may return placeholder correctness until finalization. Completion responses must be inspected; an HTTP success or the timeTrackingSent flag alone does not prove mastery or downstream time-event persistence.

Configure a gradeless course

A course without grade requires a unique courseCode, a supported subject, and a sensor or launch URL resolvable in the target environment:
timeback.config.json
Run timeback resources push --env staging to provision IDs. In an SDK activity reference use { code: 'INTRO-CS-101' }; the config field is named courseCode.

Verify the integration

  1. Verify a real authenticated test user resolves to the expected Timeback user.
  2. Check the selected platform, environment, and course IDs.
  3. Start and finish an activity; inspect the HTTP results and error callbacks.
  4. Verify the raw event in the intended receiver and the resulting downstream analytics separately. Account for processing delay and failures.
  5. For managed lessons, test question rendering, scoring, finalization, and attempt history for the lesson types your app uses.