Skip to content

About

Local WhatsApp analytics dashboard for the SQLite archive generated by https://github.com/openclaw/wacrawl

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

28 Commits

Folders and files

Repository files navigation

WaCrawl Dashboard πŸ“ŠπŸ’¬

Your WhatsApp history, finally looked at by someone other than you at 2 a.m.

A local analytics dashboard for the SQLite archive produced by wacrawl. It answers the questions you never asked out loud: who texts you first, who ghosts you, which group chat is really a monologue, and exactly how many times you've sent πŸ˜‚ this year. (It's a lot. We've seen your data. Well, we haven't. That's the point.)

You can read more about it here.

Everything runs on your machine. The API binds to 127.0.0.1, opens the archive read-only, and has no interest in phoning home. Your chats stay between you, your friends, and that one cousin who forwards chain messages.

WaCrawl Dashboard, showing the invented demo archive

Group profile Year in Review
Group profile Year in Review

Every name and number in these screenshots is invented. They come from the demo archive below.

Quick start

npx wacrawl-dashboard@latest

That's it. It opens on http://127.0.0.1:3001. You need Node 20+ and a WaCrawl archive at ~/.wacrawl/wacrawl.db.

Keep your archive somewhere else?

WACRAWL_DB=/path/to/wacrawl.db npx wacrawl-dashboard@latest

No archive yet? Install wacrawl and run wacrawl sync first. The dashboard reads the archive; it doesn't create it.

Just looking?

npx wacrawl-dashboard@latest --demo

This generates a throwaway archive of invented messages in a temp folder, and deletes it when you quit. A Demo data badge stays in the top bar. It never reads ~/.wacrawl or your .env, Refresh won't start wacrawl sync, and anything you change in Settings goes to a temp file rather than your saved settings.

What's inside

🏠 Dashboard: the big picture

  • Overview cards. Total messages, chats, contacts, media files and archive date span. Each card is also a shortcut to Search, Chats, People or Media.
  • Time window. The top-bar filter (Day / Week / Month / Year / All) drives the charts. It defaults to Year. The activity heatmap always shows the current calendar year.
  • Timezone-aware. Hour-of-day and heatmap buckets use your browser's timezone, not UTC. Your 11 p.m. texting habit is recorded at 11 p.m., where it belongs.
  • Charts, charts, charts. Message volume over time, top contacts, hour-of-day and day-of-week activity, monthly sent vs. received, media breakdown by count and bytes, top media senders, busiest groups, and messaging streaks (current and longest).
  • Drill-downs. Click a heatmap day, an hour or weekday bar, a weekly-rhythm slot, a volume or sent/received point, a top contact, or a media or group row to open the messages behind it in Search, scoped to the current period. Cards with nothing meaningful to filter by are no longer clickable.
  • Weekly rhythm. An hour Γ— weekday grid, so "Sunday night" shows up as the peak it is instead of being averaged away into two separate bar charts.
  • How fast replies happen. Every point where a conversation changed hands, bucketed by reply time and split into You vs. Them. It's data now, so you can't say "I was busy."
  • Drifted away. People you used to message regularly who have gone quiet, comparing recent traffic against an earlier baseline. Mildly poignant. Maybe text them?
  • Buried, not dead. How many chats you've archived, and which archived ones are still getting messages anyway. You tried.
  • Word cloud. Top terms, with an All words vs. Useful words (stopwords removed) toggle. Click a term to search for it.
  • Distinctive words. Not your most common words, the ones that mark a message as yours (or as theirs), ranked by log-odds so everyday words cancel out. Often it's just your name, as said by everyone else.
  • Emoji analytics. Total and unique emoji, top emoji by All / Sent / Received, and a leaderboard of who uses emoji most, with each person's favourite.
  • Conversation dynamics:
    • Who starts conversations. Initiation ratio per contact. A session starts after a gap of 4 hours or more.
    • Conversation depth. Average messages per session, so you can see which chats go deep and which stop at "k."
    • Ghost score. The percentage of your messages that got no reply within 24 hours, colour-coded by severity. πŸ‘»
    • Late-night texters. Who you talk to between midnight and 5 a.m. No judgement. Some judgement.
    • Relationship trajectory. A monthly sparkline per contact showing whether things are growing, fading or stable.
  • Loading splash. Rotating quotes to keep you company while SQLite does the heavy lifting.
  • Export the chart data. CSV or JSON buttons above the charts save the numbers behind them, for the period you're looking at. The CSV is one long table (chart, label, series, value) that any spreadsheet can pivot; the JSON is everything the dashboard loaded, as the API returned it.

πŸ‘₯ People and contact profiles

  • A contact list ranked by activity, filterable by name (server-side, ?q=), with message, media, sent and received counts and the time of the last message. LID-style identifiers are hidden when showing them would reveal nothing useful.
  • Click anyone to open their profile at /contacts/:jid:
    • Balance. Who does more of the talking.
    • Turnaround. How fast each of you replies.
    • Volume by month.
    • When you talk. By hour and weekday.
    • Media exchanged.
    • What you talk about. Their personal word and emoji cloud.

πŸ—£οΈ Groups and group profiles

  • Every group, filterable by name (?q=) and sortable by Recently active, Most members or Most messages.
  • Group graveyard (on the Dashboard). The share of your groups with no message in 180+ days, median group age, the oldest group still alive, groups founded per year split into still active vs. silent, and the once-loudest groups that went quiet.
  • Each group gets a profile at /groups/:jid:
    • Who carries it. The top talkers.
    • The room. The member roster.
    • Concentration. How much of the chat comes from a handful of people. Spoiler: usually a handful.
    • Volume by month and When it talks.
    • Never posted. The lurkers, named.
    • Media shared and What it talks about.
  • The dashboard works out which roster entry is you, even though WhatsApp never records your own JID in groups. You won't show up as the quietest member of all your groups. (An earlier version did exactly that, and the lurker report named the person reading it.)

🎁 Year in Review

A Wrapped-style recap for any year in your archive (/years/:year): headline totals, busiest day and month, a year-over-year comparison, top chats, chats that started that year, and a media summary. It's like Spotify Wrapped, except you are the artist and the song is "sorry, just saw this."

Export as image saves the recap as a 1080 Γ— 1350 PNG, ready to post. Hide names is on by default: contacts and groups become Contact 1, Group 1 and so on, and top words (which are often names) are left out. The image is drawn in your browser; nothing is uploaded anywhere.

πŸ’¬ Chats

  • Two-pane browser. The conversation list on the left (direct vs. group, preview line, counts, last activity) and the messages on the right.
  • Read-only inspection. Message bubbles, timestamps, copy message (media-aware), and inline images, videos and audio when their paths resolve under your media root.
  • Filters. A name filter and an All / Direct / Groups switch above the list (?q=, ?kind=). The open chat stays open while you filter.
  • Deep links. ?contact=<jid> preselects a chat, which is how a search result jumps straight to its message.

πŸ–ΌοΈ Media and links

  • Media grid. Infinite-scrolling thumbnails for images and videos, controls for audio, and a full-screen lightbox.
  • Link intelligence, a full report on every URL anyone has sent you:
    • Total links and unique domains.
    • A domain leaderboard, colour-coded by category.
    • Content categories: Video, Social, News, Shopping, Music, Developer, Reference and Other. Yes, you can finally measure how many YouTube links your uncle sends.
    • Media timeline. Daily images, videos, audio and links, stacked.
    • Sharing asymmetry. Who sends you the most media and links, and how many you send back.
    • First shared. The earliest message and earliest media item in each conversation.

πŸ”Ž Search

  • Full-text search (FTS5) over message content, chat names and sender names. Queries are debounced and start after two characters, or run with no text at all once a filter is set.
  • The search index is the dashboard's own file, never part of your archive. See Search index.
  • Export the results. CSV or JSON saves every match for the current query and filters, not just the loaded page, up to 20,000 messages (newest first). Cells that a spreadsheet would run as a formula (=, +, -, @) are written as text, because anyone in a chat can type one.
  • Filters, kept in the URL. Chat, sender (including yourself), media type, rolling period, date range, weekday and hour, read in your timezone. Results show the total count, load 50 more at a time, and highlight the matched terms.
  • GET /api/search takes q, chat, sender (a JID or me), contact (both directions with one person, as Top Contacts counts them), mediaType (a type or any), period, from, to, hour, weekday and timeZone. Invalid values return a 400.
  • GET /api/search/export?format=csv|json takes the same parameters and answers with Content-Disposition: attachment. X-Total-Count, X-Export-Count and X-Export-Truncated say whether the 20,000-row cap cut it short.
  • Results show context, image and video thumbnails, inline audio, clickable links, media badges and a copy button.

βš™οΈ Settings

  • Edit archive paths (WhatsApp shared container, primary WaCrawl DB, chat DB, contacts DB, media root), then save or reset to .env defaults.
  • A health banner tells you whether the primary database opens, and at which resolved path.
  • Overrides are saved to ~/.wacrawl/dashboard-paths.json, so <img> and <video> URLs work without custom browser headers.
  • Paths must be absolute (or start with ~/). A new primary database must be an SQLite file that already exists. Run wacrawl sync once to create a new archive, then point the dashboard at it.

πŸ”„ Refresh

  • The Refresh button runs wacrawl sync to import new messages, then reloads every panel. The icon spins while the import runs and the button is disabled, so impatient double-clicks do nothing.
  • A "Synced 3 hours ago" stamp, read from the archive's own sync_state table.
  • Automatic refresh when the app opens, and when the tab regains focus after five or more minutes hidden. Automatic refresh only refetches. It never starts an import, so nothing writes to your archive behind your back.
  • Errors are shown, not swallowed. If wacrawl sync refuses (most often with source contains multiple WhatsApp account identities), you see the CLI's own message and the next step. The dashboard never passes --adopt-source for you, because that flag rewrites which account owns the archive, and that's your call.
  • Only one import runs at a time. A second request waits for the first rather than starting a competing writer.
  • The archive is derived data. The wacrawl CLI owns every write; the dashboard only reads. Treat the WhatsApp source, not the archive, as your source of truth.

⌨️ Keyboard shortcuts

Meta is ⌘ on macOS and Win on most Windows keyboards.

Shortcut Goes to
Meta+K Search
Meta+1 Dashboard
Meta+2 People
Meta+3 Chats
Meta+4 Groups
Meta+5 Media
Meta+6 Search
Meta+7 Year in Review
Meta+8 Settings

Also: dark and light themes (toggle in the top bar), and a welcome/help modal on first visit that you can reopen from Help.

πŸ”’ Privacy and safety

We've taken more care with this than your group chat takes with spoilers.

  • The API listens on 127.0.0.1 only. When it serves the dashboard itself (npx wacrawl-dashboard), only that dashboard's own origin may call it, so a site on another local port can't read your archive. Under npm run dev and npm run preview, any loopback origin is allowed, because the UI comes from Vite on a port that can move.
  • Attachments can't run in the dashboard. Photos, video, audio and PDFs open in the browser. Anything else, including HTML and SVG, downloads instead, because anyone can send you a file and the API serves it from the same origin as your archive.
  • The archive is opened read-only. /api/health reports whether the DB is readable and which paths it resolved. The search index is a separate file the dashboard writes itself; it never touches the archive.
  • Routes that change state (POST /api/sync, and saving or resetting paths under /api/settings/paths) require an X-Wacrawl-Request: 1 header. CORS stops a cross-origin page from reading a response, but not from sending a simple POST. A non-simple header forces a preflight, and the origin check rejects it. The CLI is spawned without a shell and with a fixed argument list.
  • Archive paths come only from .env and the saved Settings. No request can point the server at another database.
  • The dashboard can't be framed. The page is served with X-Frame-Options: DENY and a Content-Security-Policy (frame-ancestors 'none', scripts from its own origin only), so another site can't load it in a hidden frame and trick you into clicking Refresh or Save.
  • Set WACRAWL_DISABLE_SYNC=1 and the API never spawns anything at all.
  • Stats responses are cached in memory, keyed on the archive's path, mtime and size, with a 5-minute TTL. Re-syncing or switching archives invalidates the cache.

πŸ—οΈ How it's built

A small npm-workspaces monorepo:

apps/
  api/   Express 5 + better-sqlite3, read-only, TypeScript, Vitest
  web/   React + Vite + Tailwind + Recharts + Zustand
bin/     the `npx wacrawl-dashboard` launcher (serves the built web app from the API)
e2e/     Playwright smoke tests, screenshots and the fresh-install check
docs/    PRD, npm publishing notes, screenshots

API endpoints

Area Routes
Data /api/people, /api/chats, /api/chats/:jid/messages, /api/media, /api/media/file, /api/search, /api/search/export, /api/messages/:id/offset
Stats /api/stats/ + overview, top-contacts, message-volume, activity-heatmap, hour-of-day, day-of-week, media-breakdown, media-senders, sent-received-ratio, response-times, reply-latency, group-activity, streaks, word-cloud, emoji-analytics, conversation-dynamics, year-in-review, contact-profile, dormancy, groups, group-profile, link-intelligence, weekly-rhythm, distinctive-words, group-lifecycle, archived-chats
Sync GET /api/sync/status, POST /api/sync (returns 202, or 409 if an import is already running)
Settings GET/POST /api/settings/paths

πŸ› οΈ Development

npm install
npm run dev

The API runs on http://127.0.0.1:3001 and Vite on http://localhost:5173.

Script What it does
npm run dev API + web with hot reload
npm run build Production build (API, then web)
npm run preview Serve the built web app locally
npm test API unit tests (Vitest)
npm run demo Run the built app against a generated demo archive
npm run test:e2e Playwright smoke tests against the built app and demo archive (run npm run build first; npx playwright install chromium once)
npm run test:fresh-install Pack the build, install the tarball in a temp folder, and run --demo from it
npm run docs:screenshots Regenerate the README screenshots from the demo archive
npm run demo:generate -w @wacrawl/api -- --out <dir> --seed <n> --now <ISO date> Write a demo archive. The same seed and date give the same rows
npm run typecheck TypeScript checks for both workspaces
npm run lint / lint:fix ESLint
npm run verify Lint + typecheck + unit tests
npm run verify:full verify, then build, smoke tests and the fresh-install check: the same gate CI runs

CI (GitHub Actions) runs verify:full's steps on Node 20, 22 and 24 on every push and PR. Publishing a GitHub release ships to npm with provenance. See docs/how to publish to npm.md.

Test data note: unit tests use a synthetic in-memory archive (apps/api/src/__tests__/testDb.ts), and smoke tests and screenshots use the generated one (apps/api/src/demo/). Please keep it that way. Nobody wants their real group chat immortalised in a test fixture.

🧩 Configuration

Copy apps/api/.env.example to apps/api/.env (and optionally apps/web/.env.example to apps/web/.env.local), then adjust the paths.

Variable Purpose
WACRAWL_DB Primary SQLite archive the dashboard queries (from wacrawl sync). Default: ~/.wacrawl/wacrawl.db
WACRAWL_WHATSAPP_CONTAINER WhatsApp shared container folder (e.g. ~/Library/Group Containers/group.net.whatsapp.WhatsApp.shared). Used to derive the chat, contacts and media paths below when they're unset
WACRAWL_CHAT_DB / WACRAWL_CONTACTS_DB Explicit paths to ChatStorage.sqlite and ContactsV2.sqlite
WACRAWL_MEDIA_ROOT Folder with downloaded media (often …/Message/Media). Relative archive paths resolve against it
WACRAWL_PATHS_FILE JSON file for UI-saved overrides. Default: ~/.wacrawl/dashboard-paths.json
WACRAWL_SEARCH_INDEX The dashboard's search index file. Default: dashboard-index.db next to the paths file, so ~/.wacrawl/dashboard-index.db (and inside the throwaway folder under --demo)
WACRAWL_BIN Path to the wacrawl executable if it's not on PATH
WACRAWL_DISABLE_SYNC Set to 1 and Refresh only reloads data. It never spawns wacrawl sync
WACRAWL_DEMO Set by --demo; turns on the Demo data badge. You shouldn't need to set it yourself
PORT API port. Default: 3001. npm run dev and npm run preview expect 3001; for another port under dev, also set VITE_API_URL
VITE_API_URL (web) API base URL. Default: http://127.0.0.1:3001 under npm run dev, the page's own origin in a production build. A value set at build time is baked in

You can also change paths from Settings (Meta+8) instead of editing files.

Run the API once against another archive:

WACRAWL_DB=/path/to/wacrawl.db npm run dev -w @wacrawl/api

πŸ”Ž Search index

Search runs on an SQLite FTS5 index that the dashboard keeps in its own file, ~/.wacrawl/dashboard-index.db by default (WACRAWL_SEARCH_INDEX moves it). Your archive stays read-only: the index is built from a read-only connection and attached, read-only too, when a search runs. Nothing is added to or dropped from the archive, so it can't clash with the messages_fts table that wacrawl 0.3.9+ maintains on its own.

  • Built for you. On first start, and whenever the archive changes (its path, size or modification time, including the WAL), the API rebuilds the index in the background. A successful Refresh rebuilds it too.
  • Never in the way. The build works through the archive in small batches and yields between them, so the dashboard stays responsive on a large archive. Until the new index is ready, search uses wacrawl's own messages_fts if the archive has one, and a plain LIKE scan if not: slower, but complete.
  • Disposable. Delete the file whenever you like; it comes back on the next start. It is roughly the size of your message text.

To build it ahead of time, without starting the server:

npm run optimize-db -w @wacrawl/api

(Prefix it with WACRAWL_DB=/path/to/wacrawl.db to index another archive.) Earlier versions of optimize-db wrote indexes and a messages_fts table into the archive; it no longer does. If you ran it before, wacrawl's next import is free to replace that table, and the dashboard doesn't depend on it.

πŸ™ Credits

Built on top of wacrawl by Peter Steinberger, which does the hard part of getting your messages out of WhatsApp. This project just stares at them thoughtfully and makes charts.

License

MIT. Use it, fork it, and ask it who your real friends are. Just don't blame us for the answer. 🫠

About

Local WhatsApp analytics dashboard for the SQLite archive generated by https://github.com/openclaw/wacrawl

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages