Skip to content

feat(notes): wikilink parser, link/tag indexes, and REST CRUD API#321

Merged
ElioNeto merged 10 commits into
mainfrom
feat/notes-engine-v2
May 26, 2026
Merged

feat(notes): wikilink parser, link/tag indexes, and REST CRUD API#321
ElioNeto merged 10 commits into
mainfrom
feat/notes-engine-v2

Conversation

@ElioNeto
Copy link
Copy Markdown
Owner

Implements the complete notes engine API layer covering Epic #275 issues #277-#281.

Endpoints:

  • GET/PUT/DELETE /notes/{path} - note CRUD
  • POST /notes/{path}/rename - rename with index updates
  • GET /notes/{path}/backlinks - incoming links
  • GET /notes/{path}/links - outgoing links
  • GET /notes/{path}/graph - D3.js-compatible graph view
  • GET /tags - list tags with counts
  • GET /tags/{tag}/notes - paginated notes by tag

Closes #277, Closes #278, Closes #279, Closes #280, Closes #281

ElioNeto added 2 commits May 25, 2026 18:56
- Parser: wikilinks ([[target]], [[target|display]], ![[embed]], #heading, ^block-id)
- Parser: tags (#tag, #tag/subtag, code-block/comment aware)
- Parser: YAML frontmatter (title, aliases, tags, custom fields)
- Index: bidirectional link index with atomic diff-based updates
- Graph: BFS traversal, depth control, tag grouping, D3 JSON output
- NoteEngine: full CRUD, tag management, snapshot via TimeTravelEngine

Closes #276
…UD endpoints

- Issue #277: Expose Wikilink parser public types (Wikilink, LinkType, ParsedNote)
- Issue #278: Expose NoteIndex public API with get_backlinks/get_forward_links
- Issue #279: Expose TagIndex public API with search_by_tag pagination
- Issue #280: Add GET /notes/{path}/graph endpoint with depth/max_nodes/tag_filter
- Issue #281: Full Notes CRUD REST API:
  - GET    /notes  - list notes with prefix filter
  - GET    /notes/{path} - get note with rich metadata
  - PUT    /notes/{path} - create/update note
  - DELETE /notes/{path} - delete note
  - POST   /notes/{path}/rename - rename with index updates
  - GET    /notes/{path}/backlinks - incoming links
  - GET    /notes/{path}/links - outgoing links
  - GET    /tags - list all tags with counts
  - GET    /tags/{tag}/notes - paginated notes by tag
- Add Frontmatter Serialize/Deserialize derives for JSON responses
- Add NotesEngine type alias for ergonomic API handler usage
- Register NotesEngine as app_data in server startup
- All validation: cargo check, clippy, 61 notes tests + full workspace tests pass

Closes #277, Closes #278, Closes #279, Closes #280, Closes #281
@ElioNeto ElioNeto force-pushed the feat/notes-engine-v2 branch from 48dd088 to 09da620 Compare May 25, 2026 22:13
ElioNeto added 3 commits May 25, 2026 19:49
- Issue #282: Add per-note version tracking via __version:* LSM keys
- Add NoteEngine::put_note_with_version(), save_version(), get_version_history()
- Add NoteEngine::get_note_at_version(), remove_version(), restore_version()
- Add REST endpoints:
  - GET    /notes/{path}/history              - list versions
  - GET    /notes/{path}/history/{timestamp}  - get version content
  - DELETE /notes/{path}/history/{timestamp}  - remove a version
  - POST   /notes/{path}/restore?timestamp=   - restore from version
  - POST   /notes/{path}/snapshot             - manual TimeTravel snapshot
- Auto-save version on PUT /notes/{path}
- Register TimeTravelEngine as app_data in server
- All validation: cargo check, clippy, fmt, 61 tests pass

Closes #282
- Issue #283: Inverted index stored as fts:{term} → [{path, count}]
- Tokenizer: split on punctuation, lowercase, stop words, min/max length
- TF-IDF relevance scoring with term frequency and inverse document frequency
- Phrase search: "exact phrase" queries
- Snippet generation with context around matched terms
- Auto-index on note write, auto-cleanup on note delete
- Checksum-based change detection (skip re-index when content unchanged)
- REST endpoint: GET /search?q=...&limit=20
- 7 unit tests for tokenizer, snippet, and checksum

All validation: cargo check, clippy, fmt, 68 tests pass

Closes #283
- Issue #285: Notes page with file explorer sidebar + markdown editor
- Issue #286: Graph view page with depth selector, nodes/edges tables
- Issue #289: Tags page with tag list and note browsing per tag
- Add 7 new API methods to ApexStoreService (getNotes, getNote, putNote,
  deleteNote, getGraphData, getTags, getTagNotes)
- Register /notes, /graph, /tags routes in app.routes.ts
- Add Content navigation group to sidebar (Notes, Graph View, Tags)

Closes #285, Closes #286, Closes #289
ElioNeto added 3 commits May 25, 2026 20:11
Backend (#291, #292):
- Add GET /stats/all for frontend compatibility
- Add POST /keys with {key, value} body (frontend-compatible)
- Add GET /keys/search?q=... for key search
- Add POST /keys/batch for batch insert
- Add GET /scan for full key scan
- All new endpoints return {success, data} format

Frontend pages (10 new admin/management pages):
- #293: Compaction & Memtable Flush Management Page
- #294: Health Probes & System Status Dashboard
- #295: Rate Limiting Dashboard
- #296: Backup & Restore Management Page
- #297: Time Travel / Snapshot Browser Page
- #298: Webhook Management Page
- #299: Pub/Sub Topic Inspector Page
- #300: SQL Query Runner Page
- #301: Resilience Dashboard
- #302: Access Control Policies Page

All pages follow existing Angular patterns (standalone, dark theme, signals, toasts)

Closes #291, Closes #292, Closes #293, Closes #294, Closes #295,
Closes #296, Closes #297, Closes #298, Closes #299, Closes #300,
Closes #301, Closes #302
- #303: Replication Topology & Status Page
- #304: Vector Index & Semantic Search Page
- #305: Data Sync & Multi-Model Management Page
- #311: CDC (Change Data Capture) Configuration Page
- #312: Bulk Import / Export Page
- #313: Server Configuration Viewer Page
- #314: Chaos Engineering & Fault Injection Page
- #315: Log Level & Telemetry Configuration Page
- #316: Tenant Quotas & Query Budget Management Page
- #317: Data Scrubber & Idempotency Key Management Page
- #318: Backpressure & Retry Configuration Page
- #319: WASM Plugin Manager Page
- #320: CI/CD Fixtures & Test Data Management Page

All pages follow existing Angular patterns (standalone, dark theme, signals, toasts)

Closes #303, Closes #304, Closes #305, Closes #311, Closes #312,
Closes #313, Closes #314, Closes #315, Closes #316, Closes #317,
Closes #318, Closes #319, Closes #320
- #307: GraphQL Playground page with query editor and response viewer
- #309: Light/dark theme toggle with localStorage persistence
- Add .light-mode CSS class overriding dark theme variables
- Add executeGraphQL() method to ApexStoreService
- Register /graphql route and navigation link
- Theme toggle button in sidebar with Sun/Moon icons

Closes #307, Closes #309

Also partially addresses #310 (sidebar navigation improvements)
ElioNeto added 2 commits May 25, 2026 20:42
- Issue #284: Add WebSocket endpoint at /ws/sync
- Add SyncManager with CRDT engine, client registry, broadcast
- Sync protocol: sync_push, sync_ack, subscribe message types
- LWW conflict resolution via existing CrdtEngine
- Broadcast changes to all connected clients
- Add actix-ws 0.3 dependency for WebSocket support
- Add get_all_entries() method to CrdtEngine
- Register SyncManager as app_data in server

All validation: cargo check, clippy, fmt, 68 tests pass

Closes #284
…ing infra

- #287: Template engine for daily notes with {{variable}}/{{date:}}/{{time:}} syntax
- #288: Frontmatter validation with schema-based field checking
- #306: Frontend WebSocket sync service (connect, push, receive changes)
- #308: Frontend testing infrastructure (Karma, Jasmine, sample tests)
- #306: Sync status page with connection monitoring

Closes #287, Closes #288, Closes #306, Closes #308
@ElioNeto ElioNeto merged commit 686170b into main May 26, 2026
14 checks passed
@ElioNeto ElioNeto deleted the feat/notes-engine-v2 branch May 26, 2026 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

REST API for Notes CRUD Note Graph View API Tag Index Engine Backlink & Forward-link Index Wikilink Parser for [[wikilink]] syntax

1 participant