Skip to content

Latest commit

Β 

History

91 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧠 BrainScan

BrainScan β€” an AI that reads your second brain

Live demo License Stars

An AI that reads your second brain and shows you how you actually think.

⭐ If this resonates, star the repo β€” it helps others find it.

Most personality tests are 20 questions. A rΓ©sumΓ© is a highlight reel. But you've already written thousands of words about how you think, what you're building, and what you care about β€” in Obsidian, Notion, journals, chat logs.

BrainScan ingests your digital brain, runs retrieval-augmented analysis across a dozen dimensions of who you are, and distills it into a Brain Card: an honest, whole-person portrait read from your own words.

your notes & chats  ──►  embed + index  ──►  RAG retrieval  ──►  LLM analysis  ──►  Brain Card
   (Obsidian/Notion)      (Pinecone)        (13 facets)        (Claude)        (6 sections + signal)

It runs as a hosted product and as a self-hostable stack β€” bring your own API keys and scan your own brain locally.


What it produces

Example Brain Card

A Brain Card with six sections β€” Who They Are Β· How They Think Β· Career & Ambition Β· How They Connect Β· Values & What Drives Them Β· What They're Looking For β€” plus a calibrated signal (openness, drive, communication style, social energy, emotional openness, connection style, conflict style, core motivation).

The analysis is mirror-not-flatter: specific, evidence-based, and willing to name a real growth edge.


How it works

  1. Ingest β€” your vault (a .zip of markdown, or the Obsidian plugin) is parsed, chunked, and embedded into a private Pinecone namespace. Raw text is never persisted past the analysis call β€” only vectors are stored.
  2. Retrieve β€” for each of 13 facets of personhood (identity, thinking, emotions, values, relationships, growth, …) a semantic query pulls the most revealing passages from your vault. Results are round-robin merged + deduped into a wide, deep sample (~140 chunks).
  3. Analyze β€” Claude reads those passages through a research-backed prompt (Big Five, attachment, self-determination theory) and returns the structured card.
  4. View β€” your card renders on the web app; you can re-scan anytime and watch it evolve.

Tech stack

Layer Tech
Frontend Next.js 16 (App Router) Β· Tailwind Β· deployed on Vercel
Backend FastAPI (Python 3.12) Β· runs on any Linux box behind nginx
Embeddings + vectors Pinecone hosted inference (multilingual-e5-large, 1024-dim)
Analysis Anthropic Claude (Opus)
Auth + DB Supabase (Postgres + Auth)
Payments (optional) Stripe
Ingestion .zip upload Β· or the Obsidian plugin (obsidian-plugin/)

Self-host quickstart

You need accounts for Anthropic, Pinecone, and Supabase. (Stripe is optional β€” only for paid scans.)

1. Clone + keys

git clone https://github.com/Taran132g/brainscan.git brainscan
cd brainscan
cp backend/.env.example   backend/.env          # fill in your keys
cp frontend/.env.example  frontend/.env.local

2. Pinecone

Create an index named whatever you set in PINECONE_INDEX_NAME, using the multilingual-e5-large hosted-inference model (1024 dimensions, cosine).

3. Supabase

  • Create a project; copy the URL + anon + service_role keys into the env files.
  • Run the SQL in backend/migrations/ in order (0001 β†’ latest) in the Supabase SQL Editor.
  • Enable an auth provider (Google OAuth and/or email magic link).

4. Backend

cd backend
python3 -m venv venv && source venv/bin/activate
pip install -r requirements.txt
uvicorn main:app --reload --port 8001

5. Frontend

cd frontend
npm install
npm run dev      # http://localhost:3000  (set NEXT_PUBLIC_API_BASE_URL=http://localhost:8001)

Sign in, upload a vault .zip (or connect the plugin), and hit Generate.

Or run it with Docker

cp backend/.env.example  backend/.env          # add your keys
cp frontend/.env.example frontend/.env.local   # add Supabase URL + anon key
docker compose up --build

Open http://localhost:3000. Supabase + Pinecone are managed services (external) β€” only the two app servers run in Docker.


The Obsidian plugin

obsidian-plugin/ is a desktop Obsidian plugin that zips your vault (minus excluded folders) and sends it straight to your BrainScan backend β€” no manual export.

Install (manual / dev):

  1. cd obsidian-plugin && npm install && npm run build
  2. Copy main.js + manifest.json into <your-vault>/.obsidian/plugins/brainscan/
  3. Enable BrainScan in Obsidian β†’ Settings β†’ Community plugins.
  4. In the plugin settings, paste your token (BrainScan β†’ Settings β†’ Connect Obsidian) and set the API base URL to your backend.

Not yet listed in the official Obsidian community-plugins directory β€” see the roadmap below.


Connections β€” coming soon

Today BrainScan shows you yourself. Next, it connects you to other minds.

The Brain Card already captures who someone is at the level that actually matters for connection β€” how they think, what drives them, how they relate, what they're looking for. We're building a connection layer on top of that:

  • Make your brain discoverable. Opt in to a shared pool with the Brain Card (or just the sections) you choose to expose. Nothing is public unless you say so.
  • Describe the brain you're looking for. Not keywords β€” traits. "A builder with high openness and a direct style," "a calm thinking partner who values depth over speed," "a co-founder whose drive matches mine." You tell BrainScan the mind you want to find.
  • Match on substance, not surface. Matching runs on the underlying signal and the 13 facets β€” the same evidence-based read the card is built from β€” so you connect over how people actually think and what they care about, rather than a bio or a job title.
  • Mutual by design. Connections surface when there's a real fit on both sides, and you stay in control of who can see you and reach you.

It's the natural next step: a card that reads you honestly is also the most honest basis for finding the people you'd genuinely click with β€” collaborators, co-founders, or just minds worth knowing.


Privacy

  • Your notes are converted to embeddings and stored in a private per-user namespace. Raw text is not persisted after analysis and is never shared between users.
  • Profiles are private or public by your choice; you can hide individual sections.
  • Self-hosting means your data and keys never leave your own infrastructure.

Roadmap

  • Connections β€” trait-based matching: find and connect with minds whose Brain Cards fit what you're looking for
  • Publish the plugin to the Obsidian community store
  • Notion / ChatGPT-export / plain-text ingestion
  • One-command Docker setup
  • Configurable analysis model (Haiku/Sonnet) for cheaper scans

License

MIT β€” do what you want; no warranty. BrainScan is a self-reflection tool, not a clinical or psychological assessment.

About

🧠 An AI that reads your second brain (Obsidian/Notion) and shows you how you actually think β€” a whole-person Brain Card from your own notes. RAG + Claude. Self-hostable.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages