How mkhairulhan/siftstrym works
Purpose and Runtime
Siftstrym is a privacy-centric, browser-only React dashboard for importing and exploring X/Twitter bookmark JSON archives. It parses and analyzes data locally; no backend, API, or data-transmission service is described. The application runs as a Vite-built SPA, locally or as static hosting such as Vercel.
Entry points: src/main.jsx mounts React; src/App.jsx composes the application shell and views; index.html is Vite’s browser document.
Application Shell and Navigation
The root application coordinates the active dashboard/feed experience and shared styles. The sidebar provides primary navigation, while a keyboard-shortcut layer supports rapid interaction.
Paths: src/App.jsx, src/components/layout/Sidebar.jsx, src/components/layout/KeyboardShortcuts.jsx.
Central Client State
A Zustand store decouples UI state from presentation components. It is the likely shared boundary for imported records, filters, selected view/layout, and worker-produced analysis results, allowing the dashboard and feed to react without direct component coupling.
Path: src/store/useStore.js.
Local Ingestion Pipeline
Large bookmark JSON archives are handed to a dedicated Web Worker so parsing and transformation do not block the React/UI thread. The ingestion worker is the primary compute boundary between user-provided raw export data and application-ready bookmark records.
Paths: src/workers/ingest.worker.js, src/lib/normalizer.js, src/lib/db.js.
Normalized Local Data Layer
Normalization translates source archive structures into consistent records suitable for rendering, filtering, and analytics. The database module provides the local persistence/access boundary; its location under src/lib/db.js indicates browser-side storage rather than a server database.
Paths: src/lib/normalizer.js, src/lib/db.js, src/lib/utils.js.
Offline Insights Processing
A separate insights worker computes metadata-derived analytics—such as engagement ratios, creation latency, media health, and geolocation—off the main thread. Results flow back into shared state for dashboard rendering, preserving interactivity with large datasets.
Paths: src/workers/insights.worker.js, src/components/dashboard/Insights.jsx, src/store/useStore.js.
Presentation Surfaces
The dashboard exposes analytics and settings, while the feed renders individual bookmark/tweet records. TweetCard is the content-rendering boundary; feed layout/virtualization is implied by the declared React visualization dependencies, though the feed container is not present in this tree.
Paths: src/components/dashboard/Insights.jsx, src/components/dashboard/Settings.jsx, src/components/feed/TweetCard.jsx.
Infrastructure and External Boundaries
Runtime infrastructure is Node.js 18+ for development and Vite for bundling/dev serving (vite.config.js). Deployment can be static/Vercel-hosted. Material browser capabilities are Web Workers, in-memory processing, and likely local browser persistence via db.js. The archive file is the principal external input; the stated architecture intentionally avoids external data APIs and telemetry.
Paths: vite.config.js, package.json, src/workers/ingest.worker.js.
Main entry points: useStore.js Shared client state · App.jsx Application shell · main.jsx React mount · ingest.worker.js Ingestion worker
Components 16
Browser UI
- React mount
src/main.jsx - Application shell · Coordinates dashboard/feed experience and shared styles.
src/App.jsx - Sidebar navigation
src/components/layout/Sidebar.jsx - Keyboard shortcuts
src/components/layout/KeyboardShortcuts.jsx - Shared client state · Holds records, filters, views, and analysis results.
src/store/useStore.js - Insights dashboard
src/components/dashboard/Insights.jsx - Settings
src/components/dashboard/Settings.jsx - Tweet card · Renders individual bookmark/tweet records.
src/components/feed/TweetCard.jsx
Local Processing
- Ingestion worker · Parses archives off the UI thread.
src/workers/ingest.worker.js - Record normalizer
src/lib/normalizer.js - Local data layer · Local persistence and record access boundary.
src/lib/db.js - Insights worker · Computes offline metadata analytics.
src/workers/insights.worker.js
Build & Hosting
- Browser document
index.html - Vite
vite.config.js - Node.js runtime · Node.js 18+ runs local tooling.
package.json
Other components
- Bookmark JSON archive · User-provided X/Twitter bookmark export.
Connections 16
- Node.js runtime → Vite: runs
- Vite → Browser document: serves/builds
- Browser document → React mount: loads
- React mount → Application shell: mounts
- Application shell → Sidebar navigation: composes
- Application shell → Keyboard shortcuts: composes
- Application shell → Shared client state: reads and updates
- Bookmark JSON archive → Ingestion worker: imported locally
- Ingestion worker → Record normalizer: transforms
- Record normalizer → Local data layer: stores normalized records
- Local data layer → Shared client state: loads records
- Shared client state → Insights worker: provides records
- Insights worker → Shared client state: returns analytics
- Shared client state → Insights dashboard: supplies analytics
- Shared client state → Settings: supplies preferences
- Shared client state → Tweet card: supplies bookmark records