A high-performance, open-source document editor built on Lexical.
⚠️ HawkDoc is currently in MVP stage. Feedback and contributions are welcome.
UI is actively being improved. This is the current MVP version.
HawkDoc is a document editor focused on performance and template rendering. It is built on Lexical — Meta's editor framework — and designed to handle large documents, dynamic template variables, and document export without blocking the UI.
The project is currently MVP stage. The core editor is functional. The collaboration layer, auth, and DOCX pipeline are planned.
- Lexical editor with block types: H1, H2, H3, paragraph, bullet list, ordered list, code block, quote, divider
- Slash
/command menu with keyboard navigation - Formatting toolbar: Bold, Italic, Underline, Strikethrough, inline code, link
- Floating bubble menu on text selection
- Template variable injection — type
{{variable_name}}to insert a styled placeholder chip - PDF export with watermark (via the Export menu in the toolbar)
- Markdown and HTML export
- Auto-save with 800ms debounce
- Editable document title
- Code block with copy-to-clipboard
- Image upload — persists after refresh, included in PDF export
git clone https://github.com/hawk-doc/hawkdoc.git
cd hawkdoc
# Install dependencies
npm install
# Start PostgreSQL and Redis
docker compose up -d
# Copy environment files
cp apps/api/.env.example apps/api/.env
cp apps/web/.env.example apps/web/.env
# Generate a JWT secret and paste it into apps/api/.env
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
# Start both servers
npm run dev| Server | URL |
|---|---|
| Frontend | http://localhost:5173 |
| API | http://localhost:3001 |
See CONTRIBUTING.md for full setup guide, Windows instructions, and common errors.
| Layer | Technology |
|---|---|
| Frontend | React 18, TypeScript, Tailwind CSS v3, Vite |
| Editor | Lexical (Meta) |
| Collaboration | Yjs + Hocuspocus |
| PDF Export | @react-pdf/renderer |
| Backend | Node.js 20, Express, TypeScript |
| Database | PostgreSQL 16 |
| Cache | Redis 7 |
| Auth | JWT |
| Validation | Zod |
| Area | Status |
|---|---|
| Editor (Lexical) | Working |
| PDF export | Working |
| Markdown export | Working |
| HTML export | Working |
| Template variables | Working |
| Image upload | Working |
| Auto-save (localStorage) | Working |
| Backend API (Express) | Skeleton |
| Auth (JWT backend) | Skeleton |
| Real-time collaboration (Yjs) | Planned |
| DOCX import/export | Planned |
The UI is intentionally minimal at this stage. Design improvements will come later.
- Real-time collaboration (Hocuspocus + Yjs)
- User auth UI (JWT backend is ready)
- Document list and workspace
- DOCX import/export
- Version history
Contributions are welcome. Please read CONTRIBUTING.md before opening a PR.
- All PRs target the
devbranch - Follow Conventional Commits
- Look for
good first issuelabels to get started
MIT © HawkDoc Contributors

