$ show spuithori/tokimekibluesky
Tokimeki is a full-featured, open-source Bluesky client built with SvelteKit and TypeScript. It provides a multi-column deck layout (similar to TweetDeck) with support for multiple accounts, real-time timeline updates, chat (direct and group), rich media embeds, custom moderation (keyword mutes, labelers), and extensive customization (themes, keyboard shortcuts, layout options). The application uses the AT Protocol (XRPC) for all Bluesky interactions, implements OAuth and password-based authentication, and includes a service worker for push notifications and offline caching. Architecturally, Tokimeki is a single-page application (SPA) with server-side routes for OAuth flows, AI features (alt text generation, column icon suggestions), and proxy endpoints. State management is handled via Svelte 5 runes ($state, $derived) and custom reactive classes (ColumnState, AppState, PostState). Data persistence uses IndexedDB (via Dexie) for accounts, bookmarks, and drafts, and localStorage for settings. The codebase is modular with clear separation of concerns: UI components in src/lib/components/, state classes in src/lib/classes/, utilities in src/lib/, and routes in src/routes/. It includes a comprehensive test suite using Vitest and Playwright. Key features include a custom feed merge engine for combining multiple timelines, a virtual scrolling system with Fenwick tree for efficient rendering, an image compression pipeline with WebAssembly and fallback, a full chat system with group management, and an atmosphere service registry for third-party integrations. The application is internationalized with 10+ locales and supports on-device translation via the browser's Translator API.
The LLM identified 6 files worth highlighting for reuse:
Implements a generic k-way merge of multiple paginated feed sources with chronological ordering, deduplication, and composite cursor serialization. The engine handles source failures gracefully (degraded sources) and supports backpressure via frontier-based emission. It is fully testable and can be extracted for any multi-source timeline merging use case.
A Fenwick tree (Binary Indexed Tree) implementation for efficient prefix sum queries and point updates, used in the virtual scrolling system to manage item heights in O(log n) time. The implementation is clean, well-tested, and can be reused in any application requiring dynamic cumulative sums.
A reusable moderation decision engine that evaluates AT Protocol labels, blocks, mutes, and keyword filters to produce a unified ModerationDecision with causes, behaviors, and UI hints. It is independent of the UI layer and can be integrated into any AT Protocol client for content filtering.
Manages OAuth 2.0 sessions with DPoP proof binding, nonce chaining, and concurrent tab refresh coordination. Handles token refresh with retry on invalid_grant and uses navigator.locks for race mitigation. The session store is generic and could be adapted for any OAuth 2.0 + DPoP flow.
A generic Svelte 5 rune-based reactive value that persists to localStorage and synchronizes across browser tabs via storage events. Supports custom serialization and is a clean pattern for any persistent reactive state in Svelte applications.
An image compression pipeline that uses a Web Worker with WebAssembly (WebP encoding) and a canvas fallback. It iteratively adjusts quality based on SSIM comparison to meet a target file size, strips EXIF metadata, and handles HEIC/WebP detection. The worker pool with priority queues is a reusable pattern for client-side image processing.