Your X archive. Your machine. No servers, no accounts, no telemetry.
Local-first archive search, analytics, surveillance-style insights, Grok history, media browsing, and export in a single Next.js app.
Most archive tools push data into hosted dashboards, require API keys, or split the app into a frontend and backend stack. XArchive is intentionally simpler:
- One local Next.js app
- One local SQLite database
- No scraping
- No external services
- No telemetry
Clone, install, and run locally:
git clone https://github.com/yourusername/XArchive
cd XArchive
npm install
npm run dev
# Open http://localhost:3000- Full archive import from the official X ZIP export
- Fast full-text search powered by SQLite FTS5
- Overview metrics for originals, replies, retweets, likes, media, and account history
- Timeline browsing with search, filters, deleted tweet vault support, and exact tweet linking
- Analytics for posting patterns, yearly activity, top posts, hashtags, mentions, languages, and social graph snapshots
- Grok history browser with searchable conversations, session grouping, and inline archive media
- Security audit views for connected apps, login history, and registered devices
- Insights tab for personalization labels, ad targeting, advertiser exposure, and conversion data
- Local media browsing with lightbox navigation and direct file serving from the stored archive
- Export options for CSV, JSON, Markdown ZIP, and a screenshot-ready
Your X Wrappedcard
In X, open Settings and privacy -> Your account -> Download an archive of your data.
X usually emails a download link after a waiting period that can take up to 24 hours.
- Next.js 14 App Router
- TypeScript in strict mode
- better-sqlite3 for local persistence
- Tailwind CSS v3 with CSS custom properties for X dark theming
- Recharts plus a custom SVG heatmap
- Zustand and TanStack Query v5
- JSZip for client-side and server-side archive inspection
- Framer Motion for transitions and metric animations
Overview: account snapshot, top posts, archive coverage, and username historyTimeline: published tweets, deleted tweets, search, filters, and deep linksAnalytics: yearly activity, heatmaps, topics, languages, and social graph analysisInsights: personalization profile and ad surveillance data X normally buriesSecurity: connected apps, login audit history, and registered device inventoryGrok: searchable browser for archived Grok conversations and Grok mediaMedia: gallery view with modal browsing, download, and jump-to-tweet actionsExport: whole-account dossier exports plusYour X Wrapped
Runs entirely on your machine.
- Next.js serves the UI and local API routes
- The official archive ZIP is stored locally and re-used for lazy indexing of heavy datasets
- JSZip and local archive readers parse official X export files without external APIs
better-sqlite3stores parsed data in a singlearchive.db- Media, Grok assets, deleted tweet media, and profile assets are served locally
- Queries, analytics, audits, and exports are generated from local data only
This app runs entirely locally. No data is transmitted. No analytics. No telemetry.
- No API keys or remote account sync
- No background upload jobs
- No external analytics scripts
- No archive data leaves your machine unless you explicitly export it
- The imported archive ZIP, SQLite database, and derived assets stay on disk locally
No scraping, no background sync, and no data leaves the local machine.
flowchart LR
A["X Archive ZIP"] --> B["Next.js Import Route"]
B --> C["Local Parser + Archive Indexer"]
C --> D["better-sqlite3 archive.db"]
C --> E["Stored archive ZIP / local media assets"]
D --> F["Overview / Timeline / Analytics / Insights / Security / Grok / Export"]
E --> F
src/app Next.js app routes and API routes
src/components UI, layout, charts, and page compositions
src/lib Database, parser, queries, and exporters
src/hooks React Query hooks
src/store Zustand state
src/types Shared TypeScript types
data/archive Stored local archive ZIP used for lazy indexing
assets/media Imported archive media
archive.db Local SQLite database
npm run typecheck
npm run build
npm run auditThe project is designed to run fully offline after dependencies are installed.
- Fork the repository.
- Create a feature branch for your work.
- Run
npm install,npm run typecheck, andnpm run build. - Open a pull request with screenshots for UI changes and sample archive notes for parser changes.
MIT
