DEV Community

Elizabeth Sobiya
Elizabeth Sobiya

Posted on

HawkDoc: An Open Source Notion-Style Editor Built on Lexical

I was trying to use SuperDoc for a project and kept running into limitations. Customisation was harder than expected and the performance was not where I needed it.

So I decided to build my own editor called HawkDoc, using Claude as a coding assistant for a large part of the development.

HawkDoc focuses on fast document editing with zero-lag typing. Many editors re-render large parts of the UI on every keystroke or ship heavy dependencies just to support basic formatting. I wanted something simpler and faster.

Tech Stack

  • Lexical (Meta) as the editor engine. Its node-based architecture avoids full re-renders during formatting operations.

  • Yjs + Hocuspocus for real-time collaboration using CRDTs, allowing conflict-free document syncing.

  • Redis + PostgreSQL for storage. Yjs deltas are first written to Redis and flushed to Postgres every 30 seconds so the database does not receive keystroke-level writes.

  • React + TypeScript for the frontend UI.

  • @react-pdf/renderer for client-side PDF export with watermark support.

What Works Today

  • Block-based editor
  • Slash commands
  • Template variable injection ({{variable_name}} rendered as styled chips)
  • Image uploads
  • Markdown, HTML, and PDF export
  • Auto-save
  • Selection bubble menu

What Is Still in Progress

  • Real-time collaboration UI
  • Document workspace and file list
  • DOCX import
  • Version history
  • Authentication UI (JWT backend already implemented)

Claude Code helped speed up a lot of the early development, especially when building the editor integrations and export pipeline.

I would be curious to hear how other developers are using AI coding assistants when building new tools.

The project is MIT licensed and open for feedback and contributions.

GitHub

https://github.com/hawk-doc/hawkdoc

Top comments (0)