NotasMD

NotasMD

Markdown-first note editor with tags and full-text search, built to capture ideas fast without leaving the keyboard.

Next.js 15TypeScriptSupabaseTailwind CSSTiptapZustandVitest
View liveView repo

The problem

I was using Notion for quick notes, but it was slow to open and Markdown didn't feel native. I wanted something local-first, minimal, with instant search, that didn't depend on a heavy app just to jot down a 2-line idea.

Role and impact

Technical decisions and challenges

The challenge was saving every change without the editor "jumping" or losing the cursor position. I evaluated simple debounce versus an optimistic approach with Zustand for local state and syncing to Supabase every 2 seconds.

I ended up using Zustand + 800ms debounce, because local state updates instantly (zero visual lag) and the sync to Supabase runs in the background without blocking user input.

I compared Postgres tsvector (via Supabase) against a client-side library like Fuse.js.

I chose tsvector because it scales better as notes grow, and I don't have to load the entire dataset into the client to search.

Autosave flow

Cargando diagrama…
Editor → local debounce (Zustand) → sync to Supabase → conflict resolution

Detailed stack

LayerTechnologyWhy
FrontendNext.js 15, Tiptap, Zustand, TailwindTiptap lets me extend the editor (code, checklists) without rewriting it
BackendSupabase (Postgres + tsvector, RLS)Native search in the DB, secure multi-user access with RLS
TestingVitest, React Testing LibraryCoverage of the Markdown parser and tagging logic
Editor with a long note and Markdown syntax highlightingEditor with a long note and Markdown syntax highlighting 2Live search as you type

What I would do differently

I'd implement offline-first sync from day one with something like PowerSync or RxDB, instead of adding it later. The current autosave assumes a stable connection, and that's a real limitation for field use or intermittent connectivity.