Skip to main content

Overview

The Timeback SDK provides a TanStack Start adapter using file-based route handlers.

Installation

Server Setup

Create a server-only Timeback instance. The session helpers below belong to your application: persist the callback user in your authenticated session, and return that session user (including email) or null from getUser. These helpers are not SDK exports. Keep API and SSO secrets on the server:
src/lib/timeback.ts

Route Handler

Create a catch-all route handler:
src/routes/api/timeback/$.ts

Client Provider

Wrap your app with the TimebackProvider:
src/routes/__root.tsx

Usage

For the full client-side API, see the React client adapter.
Use hooks in components:
src/routes/index.tsx

Next Steps

React Client

Client-side React integration

Identity

Authentication options

Custom Activities

Track learning sessions