Skip to main content

Overview

The Timeback SDK provides a Next.js adapter for the App Router with route handlers. If you are using coding agents, pair this page with timeback-server from the AI Skills catalog.

Installation

Server Setup

Create a Timeback instance:
lib/timeback.ts

Route Handler

Create a catch-all route handler:
app/api/timeback/[...timeback]/route.ts
This handles all Timeback routes:

Client Provider

Wrap your app with the TimebackProvider:
app/providers.tsx
app/layout.tsx

Usage

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

Next Steps

React Client

Client-side React integration

Identity

Authentication options

Custom Activities

Track learning sessions