mirror of
https://github.com/Dasemu/Synapse.git
synced 2026-11-26 23:36:20 +00:00
Describe Synapse's own Markdown dialect, export format and editor behaviour as Synapse's, rename Logseq-named history test identifiers, and set the app label/window titles to Synapse. The importer keeps its Logseq naming. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5.1 KiB
5.1 KiB
Synapse plan
Goals
An outliner for linked notes and journals that fixes what Logseq/Obsidian lack: native performance on Android, Linux and Windows, a real database instead of re-parsing Markdown on every start, heavy assets handled properly, built-in sync (self-hosted) and backup, semantic search and AI, and a "brain-like" model where connections have strength, memory is episodic (journals) and knowledge resurfaces on its own.
Gaps we fix (vs Logseq / Obsidian / Notion)
| Pain | Synapse answer |
|---|---|
| Electron apps: slow start, RAM hungry, poor mobile | Rust core + Flutter AOT native UI |
| Logseq re-indexes huge graphs, chokes on big assets | SQLite store + content-addressed blob store, incremental index |
| Sync is paid or fragile (iCloud/Syncthing conflicts) | Own op-log sync with HLC clocks, self-hosted server |
| Only keyword search | Full-text (tantivy) + vector search, hybrid ranking |
| Links are manual | Auto-link suggestions (title/alias matching + embeddings) |
| Journals are isolated files | Journals chained in time; pages anchored to their journals |
| No history beyond file history | Automatic git-like snapshots, restore any version |
| Calendar/tasks live elsewhere | CalDAV events + VTODO tasks inside journals |
Brain-like model
- Episodic memory: every journal links to the previous and next journal that exists.
- Origin: a page created inside a journal block remembers that journal (
origin_journal). - Activity trail: each edit of a page records the day; the page links to those journals.
- Synapses: every link is an edge with a weight. Co-visiting or co-editing two notes strengthens their edge (Hebbian); weights decay over time unless reinforced.
- Spreading activation: "related" panel = activate the current note, propagate through weighted edges with decay, rank by activation (plus vector similarity).
- Resurfacing: spaced-repetition-style review of notes/blocks flagged as cards, and "on this day" + "forgotten but strongly connected" suggestions in the daily journal.
- Consolidation (AI): nightly/weekly summaries of journals into evergreen notes, proposed links and tags; the user accepts or rejects (rejections lower the edge weight).
Features (scope)
- Logseq importer: pages, journals, properties, block refs, embeds, tags, aliases, assets
(large files streamed into the blob store),
logseq/config.ednbasics. - Efficient storage: SQLite (WAL) + blob store, op log for sync and undo.
- Native GUI with rich text (block outliner, inline formatting, images, code, tables).
- Auto-link suggestions.
- Vector search (embeddings via AI provider or local model), hybrid with full-text.
- Standalone (local graph) and client-server (online graph) modes, same API.
- Semi-integrated AI: Anthropic, OpenAI, Gemini, Ollama/OpenAI-compatible; user API keys stored in the OS keystore. Ask-your-graph (RAG), summarize, rewrite, extract tasks.
- Modules: WASM plugins (sandboxed, capability-based API) for commands, block renderers, importers. Phase 3.
- Performance: lazy loading, virtualized lists, incremental indexing, background workers.
- Temporal journals and page anchoring (see brain-like model).
- Automatic backup: periodic git snapshots of a Markdown export of the graph.
- Rich text.
- CalDAV calendars and task lists (VTODO), shown in journals, two-way sync.
- Graph views: force graph, timeline (journals on a line, pages hanging from their journals), local neighborhood, heat map of activity.
- Extras: queries (Datalog-lite filters), templates, flashcards (SRS), quick capture (Android share target, global hotkey on desktop), web clipper via share, encryption at rest for the server, PDF/image annotation as blocks (later).
Phases
- Phase 0 – Foundation (this branch): workspace,
synapse-core(model, SQLite store, link parser, temporal links, synapses, blob store, op log), docs. - Phase 1 – Parallel build (one session per piece, each in its own worktree/branch):
synapse-import– Logseq importer.synapse-search– tantivy full-text, vector index, hybrid search, auto-link suggestions.synapse-ai– providers, chat + embeddings,Embedderimpls, RAG helpers.synapse-history– automatic git snapshots of a Markdown export, restore.synapse-caldav– CalDAV events and VTODO tasks client + mapping to blocks.synapse-sync+synapse-server– op-log sync protocol, axum server, auth.synapse-ffi+app/– Flutter app: outliner editor, journals, search, timeline view.
- Phase 2 – Integration: wire search/AI/history/caldav/sync into FFI and the app; spreading-activation "related" panel; graph and timeline views polished; Android build.
- Phase 3 – Modules & extras: WASM plugin host, flashcards, queries, templates, consolidation, encryption.
Dependencies (core)
rusqlite(bundled SQLite: portable to Android/Windows, no system lib).uuidv7 (time-ordered ids, good index locality),chrono(dates/journals).serde/serde_json(properties, op payloads),thiserror(errors),blake3(fast content hashing for the blob store).