feat: MVP-2 completion - search, quick add, backlinks, guided forms
## Search & Retrieval - Improved search ranking with scoring (title match, favorites, recency) - Highlight matches with excerpt extraction - Fuzzy search with string-similarity - Unified noteQuery function ## Quick Capture - Quick Add API (POST /api/notes/quick) with type prefixes - Quick add parser with tag extraction - Global Quick Add UI (Ctrl+N shortcut) - Tag autocomplete in forms ## Note Relations - Automatic backlinks with sync on create/update/delete - Backlinks API (GET /api/notes/[id]/backlinks) - Related notes with scoring and reasons ## Guided Forms - Type-specific form fields (command, snippet, decision, recipe, procedure, inventory) - Serialization to/from markdown - Tag suggestions based on content (GET /api/tags/suggest) ## UX by Type - Command: Copy button for code blocks - Snippet: Syntax highlighting with react-syntax-highlighter - Procedure: Interactive checkboxes ## Quality - Standardized error handling across all APIs - Integration tests (28 tests passing) - Unit tests for search, tags, quick-add Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -17,6 +17,8 @@ model Note {
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
tags NoteTag[]
|
||||
backlinks Backlink[] @relation("BacklinkTarget")
|
||||
outbound Backlink[] @relation("BacklinkSource")
|
||||
}
|
||||
|
||||
model Tag {
|
||||
@@ -33,3 +35,14 @@ model NoteTag {
|
||||
|
||||
@@id([noteId, tagId])
|
||||
}
|
||||
|
||||
model Backlink {
|
||||
id String @id @default(cuid())
|
||||
sourceNoteId String
|
||||
targetNoteId String
|
||||
sourceNote Note @relation("BacklinkSource", fields: [sourceNoteId], references: [id], onDelete: Cascade)
|
||||
targetNote Note @relation("BacklinkTarget", fields: [targetNoteId], references: [id], onDelete: Cascade)
|
||||
createdAt DateTime @default(now())
|
||||
|
||||
@@unique([sourceNoteId, targetNoteId])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user