How trakt/trakt-time works
trakt-time is a mobile-first SvelteKit Trakt client. Its main user journey is to authenticate, browse or search media, then track and discuss what they watch. The graph includes the query layer that mediates server data and several documented-by-tree product branches. The README identifies the Trakt API and Typesense, but sampled source does not establish all integration wiring; uncertain links are omitted.
Main entry points: src SvelteKit client · useSearch.ts Search · initializeUserManager.ts Auth session · useQuery.ts Query client
Components 22
Client experience
- SvelteKit client
projects/client/src - Navigation
projects/client/src/lib/features/navigation - Analytics
projects/client/src/lib/features/analytics - Viewing celebrations
projects/client/src/lib/features/delight
Identity and session
- Auth session
projects/client/src/lib/features/auth/stores/initializeUserManager.ts - Token endpoint
projects/client/src/routes/api/store-token/+server.ts
Data access
- Query client
projects/client/src/lib/features/query/useQuery.ts - Query provider
projects/client/src/lib/features/query/QueryClientProvider.svelte - Search queries
projects/client/src/lib/requests/queries/search
Media features
- Discover and filters
projects/client/src/lib/features/discover - Search
projects/client/src/lib/features/search/useSearch.ts - Calendar
projects/client/src/lib/features/calendar - Lists
projects/client/src/lib/sections/lists - Watch tracking
projects/client/src/lib/components/buttons/check-in - Compare
projects/client/src/lib/features/compare - Leaderboard and profile
projects/client/src/lib/features/leaderboard
Social features
- Comments and GIFs
projects/client/src/lib/components/comment-drawer - Reactions
projects/client/src/lib/features/reactions
Other components
- Viewer
- OIDC authority
- Trakt API
- Typesense
Connections 22
- Viewer → SvelteKit client: uses
- SvelteKit client → Navigation: renders
- SvelteKit client → Auth session: initializes
- Auth session → OIDC authority: authenticates
- Auth session → Token endpoint: posts token
- SvelteKit client → Query provider: provides client
- Search → Query client: fetches queries
- Query provider → Query client: supplies client
- Search → Search queries: selects queries
- Query client → Trakt API: requests data
- Search queries → Typesense: search integration
- Viewer → Search: searches
- Viewer → Discover and filters: browses
- Viewer → Calendar: checks schedule
- Viewer → Lists: manages lists
- Viewer → Watch tracking: tracks viewing
- Viewer → Compare: compares profiles
- Viewer → Leaderboard and profile: views rankings
- Viewer → Comments and GIFs: comments
- Comments and GIFs → Reactions: supports reactions
- Search → Analytics: tracks searches
- Watch tracking → Viewing celebrations: celebrates milestones