You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,7 +48,7 @@ Notely is built with Electron + React and is designed for project notes, meeting
48
48
- Preview Mermaid diagrams and rendered Markdown content.
49
49
- Create and edit structured technical diagrams with **Draw.io integration** directly from markdown previews, supporting drag-and-drop import for `.drawio` and `.drawio.xml` files, image export, and offline drawing.
50
50
- Visualize the workspace as an interactive note graph.
51
-
- Use built-in AI features powered by Vercel AI SDK (Gemini, Groq, OpenAI) with a 3-Brain Architecture (`WorkspaceBrain`, `ReasoningBrain`, `ActionBrain`), autonomous multi-step Planner, semantic domain tools, local-first Embeddings Engine (`BGE-small-en-v1.5` ONNX model), recursive SQLite Knowledge Graph, strict read-only note immutability safeguards, ReAct self-correction engine (`SelfCorrectionEngine`), and an automated diagnostic evaluation harness (`AgentHarness`).
51
+
- Use built-in AI features powered by Vercel AI SDK (Gemini, Groq, OpenAI / OpenAI-compatible endpoints) with a 3-Brain Architecture (`WorkspaceBrain`, `ReasoningBrain`, `ActionBrain`), autonomous multi-step Planner, semantic domain tools, local-first ONNX Embeddings Engine (`BGE-small-en-v1.5`), zero-latency Context Compaction (`CompactionEngine`), local GLiNER2 ONNX Knowledge Graph Engine, strict read-only note immutability safeguards, ReAct self-correction engine (`SelfCorrectionEngine`), and an automated diagnostic evaluation harness (`AgentHarness`).
52
52
- Aggregate tasks across notes with **Open Tasks** and **All Tasks** panels.
53
53
- Open Tasks focuses on unchecked items.
54
54
- All Tasks includes open + closed items with filtering and note grouping.
@@ -61,7 +61,7 @@ Notely is built with Electron + React and is designed for project notes, meeting
- View note statistics (word count, line count, reading time estimate) in the status bar.
63
63
- Copy note content as HTML or plain text directly from the editor toolbar.
64
-
- Execute JavaScript (`js`/`javascript`) and Python (`py`/`python`) code blocks locally with the interactive ▶ Run (Play) button in both Markdown Previews and the popup Code Editor modal. Outputs (stdout/stderr) are rendered in an integrated high-contrast dark terminal output pane.
64
+
- Execute JavaScript (`js`/`javascript`), Python (`py`/`python`), Bash (`bash`/`sh`), PowerShell (`powershell`/`ps1`), and HTML live-preview code blocks locally with the interactive ▶ Run (Play) button in both Markdown Previews and the popup Code Editor modal. Outputs (stdout/stderr) are rendered in an integrated high-contrast dark terminal output pane.
65
65
- Navigate nested folders with breadcrumb links for easy folder traversal.
66
66
- Navigate active note tabs using **Ctrl+Tab** (next tab) and **Ctrl+Shift+Tab** (previous tab) standard shortcuts.
67
67
- Copy note link paths relative to the current workspace root from right-click context menus on tabs and dashboard document list items.
Copy file name to clipboardExpand all lines: docs/architecture.md
+7-2Lines changed: 7 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -112,7 +112,7 @@ The Electron main process (`electron/main.cjs` & `electron/lib/`) coordinates ap
112
112
***Vector Embeddings Engine (`EmbeddingDB.js`)**: Stores 384-dimensional `BGE-small` vector chunks in `{workspace}/.notes-app/ai-embeddings.db`. Features physical vector dimension validation (`verifyModelDimensions`) to prevent dimension mismatches.
113
113
***Knowledge Graph Subsystem (`GraphService.js`, `GraphDB.js`)**: Maps note relations, tags, mentions, Wikilinks, Images, Local Documents, and External URLs in `{workspace}/.notes-app/ai-graph.db`. Executes relation traversals via SQLite **Recursive Common Table Expressions (CTEs)**.
114
114
***Agent & Tool Orchestration**: Integrates with a local embedding runtime and cloud LLMs (Gemini, Groq, OpenAI) using the Vercel AI SDK.
115
-
***Local GGUF Engines**: Supports local text generation and offline graph extraction via `node-llama-cpp`. `LocalModelManager` handles shared runtime loads of the Qwen GGUF model to prevent CPU/RAM overheads.
115
+
***Local ONNX Neural Models**: Vector embeddings (`BGE-small-en-v1.5`) and Knowledge Graph entity/relationship extraction (`gliner2-multi-v1-onnx`) run 100% on-device and offline using `onnxruntime-node`.
* Video & Audio recordings (`.mp4`, `.webm`, `.mp3`, `.wav`, `.m4a`).
262
264
* Document attachments (`.pdf`).
263
265
* Excalidraw drawing files (`.excalidraw`).
264
-
***Hidden Subsystem Folder (`{workspace}/.notes-app/`)**: Internal SQLite caches for AI and system features:
266
+
***Hidden Subsystem Folder (`{workspace}/.notes-app/`)**: Internal SQLite caches for AI, tasks, and system features:
267
+
*`task-db.sqlite`: Stores workspace-wide task metadata, priorities, due dates, assignee tags, source note hashes, and line indices for bi-directional checklist synchronization.
265
268
*`ai-embeddings.db`: Stores chunk text, line offsets, hashes, and 384-dimensional binary vector `BLOB`s.
266
269
*`ai-graph.db`: Stores extracted Knowledge Graph entity nodes, Wikilinks, media links, and relationship edges.
267
270
*`ai-logs.db`: Stores multitenant application, git, embedding, graph, and AI log entries.
271
+
*`app-state.json`: Caches workspace UI state, last opened note handles, and view preferences.
Copy file name to clipboardExpand all lines: docs/developer/index.md
+78-13Lines changed: 78 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,25 +9,90 @@ category: Developer
9
9
10
10
Notely is built with Electron, React, and Vite.
11
11
12
-
## Architecture
12
+
## 1. Core Architecture & Process Model
13
13
14
14
```mermaid
15
15
graph TD
16
-
A[Electron Main Process] -->|IPC Bridges| B[Electron Preload Script]
17
-
B -->|Services| C[React Renderer Frontend]
18
-
D[Local Filesystem] <--> A
19
-
E[Git Binary] <--> A
16
+
A[Electron Main Process main.cjs] -->|ContextBridge| B[Preload Bridge preload.cjs]
17
+
B -->|React Hooks & Services| C[React Renderer Process src/]
18
+
A -->|UtilityProcess| D[AI Background Worker workerProcess.cjs]
19
+
A -->|Node.js child_process| E[Native Git & PTY Terminals]
20
+
A <--> F[(SQLite & Markdown Storage)]
20
21
```
21
22
22
-
-**Main Process (`electron/main.cjs`)**: Handles system calls, window lifecycle, local file input/output, Git operations via `simple-git`, and local network pairing processes.
23
-
-**Preload (`electron/preload.cjs`)**: Exposes structured API handles safely to the renderer context using `contextBridge`.
24
-
-**Renderer (`src/`)**: Built using React, CodeMirror for the editor canvas, and Lucide for icons.
23
+
-**Main Process (`electron/main.cjs`)**: Handles window lifecycle, file I/O, IPC handler registration, menu creation, and system integrations.
24
+
-**Background Utility Process (`workerManager.cjs` / `workerProcess.cjs`)**: Spawns an isolated Node.js `UtilityProcess` for asynchronous vector embedding generation and Knowledge Graph indexing. This keeps background indexing CPU spikes off the main thread.
2.**Payload Schema Validation (`ipcSchemas.cjs`)**: Validate raw payloads against strict schema contracts (`validatePayload`) to ensure type safety before processing file paths or commands.
43
+
44
+
---
45
+
46
+
## 3. Development Workflow & Commands
47
+
48
+
### Development Server
49
+
```bash
50
+
npm run dev
51
+
```
52
+
Launches Vite HMR server and Electron wrapper simultaneously.
53
+
54
+
### Build Production Bundle
55
+
```bash
56
+
npm run build
57
+
```
58
+
Compiles Vite frontend assets and validates CommonJS Electron main scripts.
59
+
60
+
### Documentation Site
61
+
```bash
62
+
npm run docs:dev # Launch VitePress live preview server
63
+
npm run docs:build # Build static production docs site
64
+
```
65
+
66
+
---
67
+
68
+
## 4. Test Suite Execution
69
+
70
+
Notely uses **Vitest** for comprehensive unit, integration, and IPC service testing:
71
+
72
+
```bash
73
+
# Run all unit and integration tests
74
+
npm test
75
+
76
+
# Run tests in watch mode
77
+
npm run test:watch
78
+
79
+
# Run P2P network integration test harness
80
+
npm run test:p2p
81
+
```
82
+
83
+
### Key Test Directories
84
+
-`tests/ai/`: Core AI orchestration, 5-stage `AIFlow`, 4-layer planning, compaction, and facade integrity tests.
Copy file name to clipboardExpand all lines: docs/editor/code-blocks.md
+11-5Lines changed: 11 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -67,18 +67,24 @@ Click **Save** to write changes back to the note, or **Cancel** to discard.
67
67
You can run code snippets directly from your notes:
68
68
69
69
1. Hover over a code block in **Preview** mode.
70
-
2. If the block is written in JavaScript (`js`, `javascript`) or Python (`py`, `python`), the **▶ Run** button in the hover toolbar will be active.
71
-
3. Click **▶ Run** to execute the script locally.
72
-
4. The output is displayed in a collapsible, high-contrast dark terminal output frame beneath the code block.
70
+
2. If the block is written in a supported language, the **▶ Run** button in the hover toolbar will be active.
71
+
3. Supported execution languages include:
72
+
-**JavaScript** (`js`, `javascript`): runs locally via `node`.
73
+
-**Python** (`py`, `python`): runs locally via system `python` / `python3`.
74
+
-**Bash** (`sh`, `bash`): runs shell scripts locally via `bash` or `sh`.
75
+
-**PowerShell** (`ps1`, `powershell`): runs scripts via `powershell` or `pwsh`.
76
+
-**HTML** (`html`): renders live HTML DOM output inside an interactive preview drawer.
77
+
4. Click **▶ Run** to execute the script or preview output.
78
+
5. Command outputs (stdout/stderr) are displayed in a collapsible, high-contrast dark terminal output frame beneath the code block.
73
79
74
80
You can also execute code from inside the **Dedicated Code Editor** modal using the **Execute** button in the top toolbar.
75
81
76
82
::: warning Security Note
77
-
Running code execution spawns a local process on your machine using your local `node` or `python`/`python3` installation. Only run code from trusted workspaces and sources.
83
+
Running code execution spawns a local process on your machine using your local system environment. Only run code from trusted workspaces and sources.
78
84
:::
79
85
80
86
::: info Execution Limits & Loops
81
-
Code execution terminates automatically after 10 seconds. If your code hangs or enters an infinite loop, the runner will kill the subprocess safely and report a timeout error.
87
+
Code execution terminates automatically after 10 seconds. If your code hangs or enters an infinite loop, the runner will kill the subprocess safely and report a timeout error. Buffer sizes are capped at 64KB.
Copy file name to clipboardExpand all lines: docs/feature-reference.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -81,7 +81,7 @@ Notely provides a rich experience for working with code snippets:
81
81
-**Auto-detection**: Paste a snippet without a language tag and Notely will automatically detect it (e.g., JavaScript, Python, HTML).
82
82
-**Auto-formatting**: Use the 🪄 Format button in the preview hover toolbar or inside the editor to instantly auto-indent and format your code using Prettier.
83
83
-**Dedicated Editor**: Click the ✎ Edit button on any code block in Preview mode to open a distraction-free Code Editor popup with syntax highlighting, search, and language selection.
84
-
-**Code Execution**: Click the ▶ Run button in the hover toolbar or inside the popup editor to execute JavaScript (`js`, `javascript`) and Python (`py`, `python`) snippets locally. Output is displayed in an integrated high-contrast dark terminal output drawer (with exit status and a "Clear" button). Execution times out automatically after 10 seconds to prevent hanging. For other languages, the run button is disabled with a helpful tooltip.
84
+
-**Code Execution**: Click the ▶ Run button in the hover toolbar or inside the popup editor to execute JavaScript (`js`), Python (`py`), Bash (`sh`), PowerShell (`ps1`), and HTML live-preview snippets locally. Output is displayed in an integrated high-contrast dark terminal output drawer (with exit status and a "Clear" button). Execution times out automatically after 10 seconds to prevent hanging. For unsupported languages, the run button is disabled with a helpful tooltip.
Copy file name to clipboardExpand all lines: docs/git/branches.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ Configure an upstream remote (like GitHub, GitLab, or a self-hosted Git server)
24
24
-**Pull**: Fetch and merge changes from the remote repository to update your local workspace.
25
25
-**Push**: Upload your local commits to the remote repository.
26
26
27
-
Credentials are saved securely within your system keychain.
27
+
Authentication uses Personal Access Tokens (PAT). When performing remote actions with a PAT, Notely temporarily injects the token into the git remote URL for the operation and immediately restores the clean original URL afterwards, keeping plain-text credentials out of persistent repository settings.
0 commit comments