Skip to main content

Overview

The Timeback SDK provides a SvelteKit adapter using hooks.

Installation

Server Setup

Create a Timeback instance:
src/lib/timeback.ts

Server Hooks

Add the Timeback handler to your hooks:
src/hooks.server.ts

Alternative: Route-Based Handler

For more control, you can use a route-based approach instead of hooks:
src/routes/api/timeback/[...path]/+server.ts

Client Setup

Initialize Timeback in your root layout:
src/routes/+layout.svelte

Usage

For the full client-side API, see the Svelte client adapter.
Use stores in components:
src/routes/+page.svelte

Profile Store

Next Steps

Svelte Client

Client-side Svelte integration

Identity

Authentication options

Custom Activities

Track learning sessions