Skip to content

Gurehmat/Meridian

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Meridian

A personal knowledge graph I built to map my thinking and find where my own ideas conflict with each other.

Meridian

You paste in notes, journal entries, readings, whatever you are thinking about. It extracts the key concepts, builds a visual graph, and then tells you when something you believe contradicts something else you added weeks ago. It also surfaces non-obvious connections across completely different domains.

The part I find most interesting: most AI tools have no memory across sessions. Meridian accumulates everything and reasons across the whole graph every time you add something new.


How it works

Text comes in, Gemini extracts structured concepts and relationships, MiniLM generates 384-dimensional embeddings for each concept, MongoDB Atlas Vector Search finds semantically similar concepts across your entire history, and then Gemini analyzes each pair for contradictions and unexpected connections.

The graph updates in real time after each ingestion. Red dashed lines are contradictions. Green lines are connections. Gray lines are extracted relationships from the same source.

input text
    -> Gemini 2.5 Flash (concept extraction)
    -> all-MiniLM-L6-v2 (embeddings, runs locally)
    -> MongoDB Atlas Vector Search (semantic similarity)
    -> Gemini 2.5 Flash (contradiction + connection detection)
    -> react-force-graph-2d (interactive visualization)

Stack

Frontend React 18, TypeScript, Vite, Tailwind CSS
Graph react-force-graph-2d
Auth Firebase (Google sign-in)
Backend Python, FastAPI
AI Google Gemini 2.5 Flash
Embeddings sentence-transformers/all-MiniLM-L6-v2
Vector search MongoDB Atlas Vector Search (cosine, 384 dims)
Database MongoDB Atlas

Features

  • Ingest plain text or PDFs
  • Concept and relationship extraction via Gemini
  • Local embedding generation with MiniLM
  • Vector similarity search across all prior knowledge
  • Contradiction detection with explanation
  • Cross-domain connection surfacing
  • Belief shift tracking over time (if your understanding of a concept changes across entries, it logs the shift)
  • Interactive force-directed graph, color-coded by relationship type
  • Entry browser with concept counts
  • Node search, node detail panel, delete with cascade cleanup

Running locally

Prerequisites

  • Python 3.11+
  • Node.js 18+
  • MongoDB Atlas account (free M0 tier)
  • Gemini API key (Google AI Studio)
  • Firebase project with Google sign-in enabled

Backend

cd server
pip install -r requirements.txt

Create server/.env:

MONGODB_URI=your_mongodb_atlas_connection_string
GEMINI_API_KEY=your_gemini_api_key
python -m uvicorn app.main:app --reload --port 8080

MongoDB Atlas Vector Search index

Create a vector search index named embedding_index on the concepts collection:

{
  "fields": [
    {
      "type": "vector",
      "path": "embedding",
      "numDimensions": 384,
      "similarity": "cosine"
    }
  ]
}

Frontend

cd client
npm install

Create client/.env:

VITE_API_URL=http://127.0.0.1:8080
VITE_FIREBASE_API_KEY=your_key
VITE_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
VITE_FIREBASE_PROJECT_ID=your_project_id
npm run dev

Open http://localhost:5173.


Structure

meridian/
├── client/
│   └── src/
│       ├── components/     # Graph, Sidebar, Navbar, RightPanel
│       ├── contexts/       # Auth context
│       ├── lib/            # API client, Firebase
│       └── types.ts
└── server/
    └── app/
        ├── routes/         # ingest, graph, insights, timeline
        └── services/       # Gemini, embedder, extractor, graph ops

gurehmat.dev

About

Personal knowledge graph that maps your thinking and finds where your ideas contradict each other

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors