Skip to content
forked from trakt/trakt-web

About

Unlock the secrets of your watch history, explore hidden connections between films, and delve into the depths of personalized recommendations. But tread carefully, for the Trakt API holds powers that could reshape your very perception of entertainment...

Resources

Code of conduct

Contributing

Stars

6 stars

Watchers

1 watching

Forks

 
 

Repository files navigation

trakt-time

Note: This is an experiment. We're rebuilding a Trakt client app with a mobile-first, TV Time-like feel. Started as an AI hackathon project, kept alive for fun and learning. It's not aiming to replace anything — just a sandbox.


Open source, contributions welcome! PRs of any size are encouraged. Bug fixes, polish, new features, translations — dive in. See CONTRIBUTING.md for the details.


What's in here

The repo is a Bun workspace with one project today:

  • projects/client — the SvelteKit frontend that talks to the Trakt API and renders the trakt-time UI. Deployed to a Cloudflare Worker.

Getting started

You need Bun and Node 24 installed. Once you have it:

  1. Clone the repository.
  2. Install dependencies: bun run install:frozen
  3. Start the dev server: bun run client:dev

Trakt API credentials

You need a personal Trakt application to develop against:

  1. Create one at Trakt Settings → Applications.

  2. Add these Redirect URIs (one per line):

    http://localhost:5173
    http://localhost:5173/callback
    http://localhost:4173
    http://localhost:4173/callback
    
  3. Add the same values to Javascript (cors) origins.

  4. Export the credentials before running tasks:

    export TRAKT_CLIENT_ID=...
    export TRAKT_CLIENT_SECRET=...

External contributors should use bun run client:dev:contrib so the dev server points at the public Trakt environment instead of the private one.

Port 5173 is for vite dev, 4173 is for vite preview.

Workspace tasks

From the repo root:

Task What it does
bun run install:frozen Install dependencies
bun run format Format with Biome
bun run client:dev Run the client dev server
bun run client:dev:contrib Same, but against the public Trakt API

From projects/client/:

Task What it does
bun run check svelte-kit sync + svelte-check
bun run test:unit Run Vitest
bun run lint Run ESLint
bun run build Build for Cloudflare Workers (adapter-cloudflare)
bun run preview Serve the production build locally

Build & local preview

cd projects/client
bun run build
bun run preview

If you want a real Cloudflare Worker preview locally (instead of vite preview):

cd projects/client
bun run build
bun x wrangler dev

Deploy

The Cloudflare Worker is deployed from CI on every push to main (see .github/workflows/ci_cd.yml). For ad-hoc deploys from your machine:

cd projects/client
bun run build
bun x wrangler deploy

You'll need wrangler login once and the right secrets configured (see INFRASTRUCTURE.md).

Updating dependencies

We use npm-check-updates to bump the client's package.json pins.

bun add -g npm-check-updates

For minor bumps:

ncu --dep prod -t minor       # check
ncu --dep prod -t minor -u    # update
ncu --dep dev -t minor
ncu --dep dev -t minor -u

For majors: ncu --dep prod -t latest, do them one at a time, build, fix breakage, commit.

Tech stack & acknowledgements

trakt-time stands on the shoulders of:

Built with SvelteKit Hosted on Cloudflare Workers

Built on top of the original trakt/trakt-web codebase, which we forked and reshaped for this experiment. Huge thanks to the upstream maintainers.

For infrastructure-flavored details (env vars, wrangler secrets, Typesense, etc.), see INFRASTRUCTURE.md.

About

Unlock the secrets of your watch history, explore hidden connections between films, and delve into the depths of personalized recommendations. But tread carefully, for the Trakt API holds powers that could reshape your very perception of entertainment...

Resources

Code of conduct

Contributing

Stars

6 stars

Watchers

1 watching

Forks

Used by

Contributors

Languages