Open source · MIT

Read the story
in your chats.

Drop in a WhatsApp export. Cognition maps how your feelings moved week by week, who you talk to, your personality and the chapters of your year. The chats are parsed and stored in your browser.

Next.js 15 · React 19 Gemini analysis IndexedDB storage
Animated tour of the real app: Emotional Landscapes, Relationships Network, Personality Analysis and the Ad Tracker

A tour of the real app. The person, chats and numbers are invented demo data.

Tool one · Chat insights

Years of messages, drawn as a life.

Export a chat from WhatsApp and drop the .txt files in. Cognition splits the messages into weekly segments, asks Gemini for a structured read of each week, and draws what comes back.

Tool two · Ad Tracker

Ads, revenue and what actually works.

A marketing dashboard for small direct-to-consumer brands, in the same codebase under /ad-tracker.

  • Stripe × Meta attributionRevenue, ad spend, profit, ROAS, CPA and leads on one timeline, with refunds and COGS included.
  • Creative DNAGemini breaks each Meta ad into hook, angle, format, avatar and proof.
  • Competitor ad autopsyDrop in a winning ad and get its structure back as a reusable brief.
  • Workflow canvasA node-based builder that chains creative analysis into a strategy brief.
Ad Tracker overview: revenue, spend, profit and leads over three months Ad Tracker KPI cards: net revenue, net profit, ROAS and cost per lead
Where your data goes

Your chats stay in your browser.

1 · Browser

Parse

The WhatsApp .txt files are read and split into messages on your device.

2 · Browser

Store

Chats and results live in IndexedDB. No database holds your messages.

3 · Gemini API

Analyse

Each weekly segment goes from your browser to Gemini for a structured read.

4 · Browser

Delete

Open /api/clear-all-data to wipe IndexedDB and local storage.

Two honest caveats. The text you analyse is sent to Google's Gemini API. And the server passes your Gemini key to the browser through /api/token/generate, so run Cognition locally or keep it behind its password gate. The Ad Tracker works differently: it reads Meta, Stripe and Postgres from the server.

Quick start

Running in about two minutes.

  1. Get a Gemini API key from Google AI Studio. You also need Node.js 20 or newer.
  2. Set two variables in .env.local: GEMINI_API_KEY and APP_PASSWORD. Everything else is optional.
  3. Sign in at /login with your password, then open /onboarding.
  4. Drop in your exports. In WhatsApp: open the chat, Export chat, Without media.
# clone and run
$ git clone \
  https://github.com/harrythentrepreneur/cognition-insights.git
$ cd cognition-insights
$ npm install
$ cp .env.example .env.local
# then set GEMINI_API_KEY
# and APP_PASSWORD in .env.local
$ npm run dev
# open http://localhost:3000
Status

Shared as it is.

Cognition ran as a paid product, then pivoted. It works and it has rough edges. There is no test suite, and the language-patterns view is disabled. Issues and pull requests are welcome, but replies may be slow.