notes: private Obsidian vault tracker at /trackers/notes
All checks were successful
Deploy production / deploy (push) Successful in 1m19s

Vault files stay the source of truth (bind-mounted read-write at /notes):
atomic writes chowned to the vault owner, hash-checked saves (409 on a
newer file), deletes to .trash. notes.* is a full-text/link index kept
current by a recursive watcher plus a 60s rescan; live updates over the
owner-only /ws/notes channel (paths and hashes only). Wikilinks, embeds,
backlinks, tags, callouts, image paste. Owner-only everywhere (404).
This commit is contained in:
2026-10-26 01:27:41 +00:00
parent 6654c0990a
commit e33afe5387
28 changed files with 44610 additions and 3 deletions

View File

@@ -0,0 +1,14 @@
import { json } from '@sveltejs/kit';
import { requireOwner } from '#lib/server/owner.js';
import { allEntries } from '#lib/server/notes/indexer.js';
import { noStore } from '#lib/server/notes/http.js';
import type { RequestHandler } from './$types';
// The whole tree again (the page uses it after a WebSocket reconnect, in case it missed events).
export const GET: RequestHandler = async (event) => {
requireOwner(event);
const tree = allEntries().map(
(e) => [e.path, e.kind === 'note' ? 'n' : e.kind === 'conflict' ? 'c' : 'a', e.mtime] as const
);
return json({ tree }, { headers: noStore });
};