An offline-first AI research assistant that syncs across devices. Built with PowerSync, React, and Claude AI.
Works offline. Thinks with AI. Syncs everywhere.
| Main View | Note Detail | Knowledge Graph |
|---|---|---|
![]() |
![]() |
![]() |
| Research Agent | Ask AI | New Note |
|---|---|---|
![]() |
![]() |
![]() |
- Offline-First: Create and browse research notes without internet. Changes sync automatically when connectivity returns.
- AI-Powered Analysis: Notes are automatically summarized, tagged, and connected by Claude AI (Haiku for fast processing).
- Knowledge Graph: Interactive force-directed visualization of note connections. Drag nodes, click to navigate, see relationships on hover.
- Tag Cloud: Visual topic frequency display in the sidebar. Click any tag to filter notes instantly.
- Research Agent Chat: Conversational AI agent (Mastra-powered) that uses tools to search notes, find connections, and synthesize research.
- Ask Your Research: Query across all your notes using natural language.
- Research Brief: One-click AI-generated summary across all your notes.
- Sync Conflict Viewer: Visual timeline of sync conflict resolution. See how PowerSync handles concurrent edits across devices — field-level diffs, resolution strategies, and conflict statistics.
- Cross-Device Sync: PowerSync Sync Streams keep data in sync across all connected devices.
- Local-First Editing: Full CRUD operations on local SQLite. Edits queue and sync when online.
- Frontend: React 18 + TypeScript + Vite
- Sync Engine: PowerSync (self-hosted) with Sync Streams
- Backend: Node.js + Express
- AI Agent: Mastra framework with tool-using Research Agent
- AI Models: Claude (Anthropic API), OpenAI, or Ollama (fully local, no cloud needed)
- Database: PostgreSQL (primary) + MongoDB (PowerSync storage)
- Local Storage: SQLite (via PowerSync WASM in browser)
# 1. Clone and set up
git clone https://github.com/Fulcria-Labs/syncmind.git
cd syncmind
# 2. Configure environment (see .env.example)
cp .env.example .env
# Set ANTHROPIC_API_KEY or OPENAI_API_KEY for cloud AI,
# or leave blank to use Ollama locally (fully offline AI!)
# 3. Start all services (PostgreSQL, MongoDB, PowerSync, Backend)
docker compose up -d
# 4. Install and run frontend
cd frontend && npm install && npm run dev# Populate with sample research notes to explore all features
docker compose exec postgres psql -U syncmind -d syncmind -f /docker-entrypoint-initdb.d/seed.sqlThis loads 6 interconnected research notes covering AI, RAG, embeddings, and more - with pre-computed AI tags, summaries, and a knowledge graph ready to explore.
Browser (SQLite via WASM)
|
|-- Local reads (instant, offline)
|-- Local writes (queued offline)
|
v
PowerSync Service (Sync Streams)
|
|-- Bidirectional sync
|-- Conflict resolution
|
v
PostgreSQL (source of truth)
^
|
Express Backend ----> Mastra Agent ----> AI (Claude/OpenAI/Ollama)
SyncMind can run entirely locally with Ollama:
# Install and start Ollama
ollama pull qwen2.5-coder:7b-instruct-q4_K_M
# Start SyncMind without any API keys - Ollama auto-detected
docker compose up -d
cd frontend && npm install && npm run devThe header shows "LOCAL AI" when using Ollama, making the local-first experience complete: local data (SQLite), local sync (PowerSync), and local AI (Ollama).
PowerSync is central to the architecture:
-
Sync Streams define granular data sync rules per table (notes, connections, tags) with owner-based filtering.
-
Local SQLite via
@powersync/webprovides:- Instant reads against local database (zero network latency)
- Full offline CRUD - create, edit, delete notes without connectivity
- Reactive queries via
useQueryhooks that auto-update when data changes
-
Backend Connector handles JWT authentication, CRUD upload to PostgreSQL, and automatic retry with conflict resolution.
-
Offline-First UX: Visual sync status (online/offline/syncing), offline banner, AI features gracefully degrade while core note-taking always works.
- User creates a note (writes to local SQLite immediately)
- PowerSync syncs the note to PostgreSQL
- Backend detects unprocessed notes via polling
- Claude AI generates: summary, tags, and connections to related notes
- AI results written to PostgreSQL
- PowerSync syncs AI results back to the user's local SQLite
- UI updates reactively via
useQueryhooks - no refresh needed
AI processing happens server-side without blocking the user. Results appear automatically across all connected devices.
The conversational Research Agent uses Mastra with 5 specialized tools for deep research exploration:
- search-notes: Find notes by keyword or topic
- get-note-detail: Retrieve full note content + connections
- list-all-notes: Overview of entire research collection
- get-tags: Analyze research themes via tag frequency
- get-connection-graph: Map relationships between notes
The agent autonomously chains tools together for complex queries — e.g., "How are my RAG notes connected?" triggers search, detail retrieval, and graph analysis in sequence.
Works with Claude, OpenAI, or fully local Ollama. See MASTRA_USAGE.md for full agent documentation.
# Run all 2,368 tests across 63 suites (backend + frontend)
npm test
# Backend tests only (645 tests across 19 suites: AI processing, agent tools, data layer, auth, transactions, edge cases)
cd backend && npm test
# Frontend tests only (1,723 tests across 44 suites: components, keyword extraction, schema, sync connector, NoteSearch, SyncDashboard, SyncConflictViewer, E2E demo journey, integration)
cd frontend && npm testsyncmind/
frontend/ # React + TypeScript + Vite
src/components/
KnowledgeGraph.tsx # Force-directed graph visualization
TagCloud.tsx # Topic frequency display
NoteEditor.tsx # Create new notes
NoteList.tsx # Searchable note list
NoteDetail.tsx # Full note view with AI insights
AskAI.tsx # Natural language Q&A
AgentChat.tsx # Mastra-powered research agent chat
SyncConflictViewer.tsx # Real-time sync conflict resolution viewer
src/lib/
AppSchema.ts # PowerSync table definitions
Connector.ts # PowerSync backend connector
backend/ # Express API + Mastra agent + AI processing
powersync/ # PowerSync service config + sync rules
db/ # PostgreSQL schema
docker-compose.yml # Full stack orchestration
MIT





