CortexCache was born out of a simple but powerful frustration — the lack of a private, offline way to store and query knowledge. I constantly stumbled upon useful web pages, research papers, and PDFs that I wanted to capture and later ask questions about, but every solution depended on the cloud and compromised privacy. When the hackathon challenge encouraged privacy-first, client-side AI, the vision clicked. I wanted to create a tool that felt like a personal research assistant, entirely under the user’s control something that could index, recall, and reason over your data without ever sending a single byte off your device. CortexCache became my answer: a secure, intelligent, and fully offline “second brain.”

CortexCache transforms how users interact with their personal knowledge. Through a Chrome extension, users can capture any webpage or upload PDFs directly into the app. The data is then stored entirely within their local browser storage nothing leaves their machine. Once imported, the system automatically divides the content into coherent, 500-word chunks optimized for retrieval and context preservation. The magic happens when the user asks natural-language questions: a lightweight local AI pipeline identifies the most relevant segments, synthesizes a direct answer, and displays it instantly. The result feels like chatting with your own curated database, except everything is local, secure, and lightning fast.

We built CortexCache using a modern, privacy-respecting tech stack centered on React, TypeScript, and Vite for the frontend. For storage, we used IndexedDB wrapped with an idb abstraction layer to reliably manage documents, chunks, and metadata. The deterministic chunking algorithm was a key breakthrough it ensures every document is split into consistent, logical segments, which makes retrieval both accurate and explainable. On the intelligence side, we implemented a thin AI layer built around the chrome.ai API, managed by a custom Local Queue Manager. This queue persists tasks, retries automatically after failures, and supports a developer-mode AI mock that enables complete end-to-end demos even without internet or API access. That combination a local database, resilient queue, and AI fallback made the entire system self-sufficient.

  • Persists all requests using local storage, allowing tasks to resume after crashes or browser restarts.
  • Implements automatic retry logic with exponential backoff for flaky environments.
  • Maintains idempotency, so duplicate jobs never corrupt state or drain compute.
  • Includes a developer-mode AI mock, a fully simulated inference layer for testing and demos when API access or internet isn’t available.

The hardest problems weren’t about algorithms but about the constraints of the browser. Manifest V3’s service workers have unpredictable lifecycles, often sleeping or terminating mid-process, which risked losing captured data. To solve this, we built a persistent messaging bridge between the extension and the PWA, ensuring every capture was safely committed to storage. Designing a fully offline queue that was both persistent and idempotent meaning no duplicates even after restarts was another major engineering challenge. Handling retry logic, atomic state transitions, and ensuring data recovery required meticulous design. We also had to fight race conditions and caching edge cases that only appear under real browser behavior, which made the dev-mode AI mock not just a bonus, but an essential safeguard for reliability and testing.

Our proudest accomplishment is creating a complete, production-grade tool that truly respects user privacy while still delivering an AI-powered experience. The resilient AI queue stands out as a technical highlight it combines fault tolerance, automatic retries, and offline persistence to create a seamless system that works even when disconnected. Watching CortexCache accurately pull contextual answers from a local PDF without touching the internet was a defining moment. Beyond the technical wins, we’re proud of how cohesive the user experience feels: the interface is clean, the performance is snappy, and every interaction reinforces the core idea of empowerment through data ownership.

CortexCache taught us the discipline of local-first design thinking. When you can’t rely on a server, you must define exactly how data flows, syncs, and persists. It forces clarity in both architecture and user experience. We learned the importance of deterministic processing, which simplifies retrieval, reproducibility, and prompt consistency. But the most valuable lesson came from embracing “graceful degradation” building systems that don’t fail hard when conditions are imperfect. Our AI mock mode, initially meant for testing, became a core feature that guaranteed smooth demos and consistent results under any network or permission scenario. This experience fundamentally changed how we approach resilience and user trust.

The next chapter for CortexCache is about deepening intelligence and expanding utility still fully offline. We plan to integrate client-side semantic embeddings (using WebAssembly) to enable meaning-based search rather than just keyword matching. This will make queries smarter, contextual, and faster. We’re also designing new ways to transform captured content into learning tools: Concept Maps, Summarization modes, and a Flashcard System with spaced repetition for knowledge retention. Finally, we’ll add a one-click snapshot feature for export and backup, ensuring your “knowledge vault” can move safely across devices. Long term, we want CortexCache to represent a new category of personal AI one that works for you, not over you bringing intelligence, privacy, and autonomy together in one sleek, local-first system.

Built With

  • ai
  • ai-queue-management
  • api
  • bridge
  • chrome
  • chrome-built-in-ai-apis
  • chrome-extension-apis-(manifest-v3)
  • chrome.ai
  • chunking
  • cross-platform-troubleshooting
  • deterministic
  • developer-mode
  • engine
  • extension
  • extension-to-pwa-messaging
  • framer
  • idb-wrapper
  • indexeddb
  • local
  • local-storage-optimization
  • manager
  • manifest
  • mock
  • modular-design-patterns
  • motion
  • node.js
  • npm
  • offline-first-architecture
  • pdf.js
  • prompt
  • pwa
  • queue
  • rapid-prototyping
  • react
  • service
  • tailwindcss
  • typescript
  • v3)
  • vite
  • web
  • worker
  • workers
Share this project:

Updates