Inspiration
As a full-stack engineer, my notes are my second brain—filled with code snippets, API keys, private thoughts, and project strategies. For years, I’ve been stuck in the "AI Catch-22":
- Use a "Smart" Cloud Tool: I could use tools like Notion AI or ChatGPT, but I'd have to upload my most sensitive, private data to a third-party server. This was a non-starter.
- Use a "Dumb" Local Tool: I could use a simple
notes.txt, which was private but "dumb." It couldn't find meaning, only exact keywords withCtrl+F.
I was forced to choose between an assistant that was smart or one that was private. I couldn't have both.
This challenge was the "aha!" moment. With Google's built-in Gemini Nano, I finally saw a way to build the tool I'd always wanted: one that could bring the AI to the data, not the other way around.
What it does
MindKeep is a "no-compromise" AI second brain that runs 100% locally in your browser. It's both smart and private.
- 100% Private, Encrypted Notes: It's a full-featured notes app with a rich text editor. All your notes are encrypted with the Web Crypto API (AES-GCM) and stored only in your browser's IndexedDB. Nothing ever leaves your machine.
- AI-Powered Semantic Search: You can ask questions in natural language, like "What's my AWS key?" MindKeep uses a local AI model to understand the meaning of your question and find the exact note, even if it doesn't contain those keywords.
- In-Page AI Assistant: MindKeep injects a floating AI assistant onto any website. You can ask it to write an email, fill a form, or debug code, all using your private notes as its context.
- Custom AI Personas: You can create custom "personas" (e.g., "Email Writer," "Code Helper") that instruct the AI on how to behave for different tasks.
How we built it
MindKeep is built on a 100% local-first architecture.
- The "Brain" (Gemini Nano): The core intelligence is Google's Gemini Nano, accessed via the
chrome.ai(Prompt API). We built a robust, stateful session manager around it to handle conversational history, token tracking, and the "Persona" system. We also use theSummarizer APIfor auto-generating note titles and theRewriter APIfor the in-page text editor. - The "Memory" (Local Vector Search): We used Transformers.js to generate 384-dimensional vector embeddings (semantic "fingerprints") for every note locally in the browser. This is what enables the high-speed, private semantic search.
- The "Vault" (Encryption & Storage): We used the native Web Crypto API to encrypt all note content before it's saved. Dexie.js (an IndexedDB wrapper) manages the local database of encrypted notes and their vector embeddings.
- The "Foundation": The extension is built with Plasmo, React 18, and Tailwind CSS, with TipTap as the rich text editor.
Challenges I ran into
The biggest challenge by far was the "WASM Wall." Transformers.js (our vector library) runs on WebAssembly (WASM). By default, a Chrome extension's Content Security Policy (CSP) blocks wasm-unsafe-eval, which is required for it to run. This meant my core semantic search feature was completely broken.
After hours of debugging, the solution was to write a post-build script (fix-manifest.js). This Node.js script runs automatically after pnpm run build and dynamically patches the manifest.json file. It injects the exact CSP rule (script-src 'self' 'wasm-unsafe-eval') needed to allow WASM, but only for the extension's internal pages, solving the problem without compromising security.
Accomplishments that I am proud of
I am incredibly proud of building a tool that successfully breaks the "smart vs. private" compromise. I didn't just build a simple AI wrapper; I built a complete system that proves local-first AI is viable.
My biggest accomplishment is the robust AI session manager. It's not just a simple one-off prompt. It's a stateful system that manages conversation history, tracks token usage (warning you at 90% of the quota), and injects custom "personas" using the systemPrompt. This is what makes the In-Page Assistant feel like a true, context-aware partner.
What I learned
I learned that the future of personal AI is local. For the first time, tools like Gemini Nano allow us to build applications that are truly helpful without being invasive. I learned that with modern browser APIs (like chrome.ai and Web Crypto) and clever libraries (like Transformers.js), we can build apps that rival the power of cloud-based tools, all while giving the user 100% data ownership.
What's next for MindKeep
This is just the beginning. My next steps are focused on making MindKeep the only notes app you'll ever need:
- Secure, E2E Encrypted Sync: The #1 feature is to allow syncing between devices. We will build a "Bring Your Own Storage" model (e.g., using Google Drive or a private S3 bucket) where all data is end-to-end encrypted before it ever leaves the browser.
- Deeper OS Integration: I want to build a desktop companion app (e.g., with Tauri or Electron) that can read local files and make your entire computer semantically searchable.
- AI-Powered Organization: I plan to use the
Summarizer APIto automatically cluster notes into relevant topics and build visual mind-maps, helping you discover connections in your knowledge you never saw before.
Built With
- dexie
- indexeddb
- plasmo
- pnpm
- react
- tailwind
- tiptap
- transformers.js
- typescript
- web-crypto
Log in or sign up for Devpost to join the conversation.