Show HN: Lightwave – 实时笔记应用,3.5 年手写的 JavaScript

1作者: jv22222大约 2 小时前
嗨,HN! 我独自开发这个项目大约三年半了。我一直在尝试各种新的项目/笔记工具(Notion、Asana、Trello 等),但最终总是回到纯文本文件。我想要的是一种初次使用时感觉像文本编辑器,但需要时又能演变成真正结构化的工具。 [https://lightwave.so](https://lightwave.so) 技术栈是 Laravel、MySQL、Redis,以及客户端手写的 JavaScript。没有使用像 React/Vue 等框架。大约 270 行 jQuery(总代码量超过 8 万行)用于一些遗留的 DOM 实用程序,外加 IndexedDB 用于本地持久化。实时协作使用混合方法:HTTP/2 POST 用于可靠的操作 + 通过 Laravel Reverb 的 WebSockets 用于实时光标、在线状态和编辑。 这只是一个预发布压力测试,而不是发布。Lightwave 将会是一个付费产品。目前我开放它是因为任何单独的测试都无法模拟被真实流量“打脸”的体验。 上面的链接有一个按钮,可以一键创建测试账户。 已知的不足之处:光标和选择系统是从头开始构建的(像 VS Code 一样,而不是一个 contenteditable 包装器),所以存在很多问题。可能缺少一些键盘快捷键。仅限桌面端,尚未实现无障碍功能。我正在实时修复问题。 应用程序内有一个“提交错误或反馈”按钮,如果出现问题,请随时反馈。很乐意回答关于架构或任何其他问题的提问。 一些亮点: - 粘贴 Markdown,获得原生块。复制块,获得 Markdown。 - 分层文档结构。分层文件管理器。 - 实时协作,共享光标、选择和在线状态。 - 代码块,带语法高亮。LaTeX 数学公式块。 - 完整的数据导出:Markdown、JSON 和附件。没有锁定。 - 完整的撤销/重做功能,并恢复光标位置。
查看原文
Hi HN!<p>I&#x27;ve been building this solo for about three and a half years. I kept trying every new project&#x2F;notes tool (Notion, Asana, Trello, etc.) and always ended up back in a plain text file. I wanted something that felt like a text editor on first touch but could grow into real structure when you needed it.<p><a href="https:&#x2F;&#x2F;lightwave.so" rel="nofollow">https:&#x2F;&#x2F;lightwave.so</a><p>The tech stack is Laravel, MySQL, Redis, and hand-rolled JavaScript on the client. No frameworks like React&#x2F;Vue&#x2F;etc. ~270 lines of jQuery (out of 80k+ total LOC) for a few legacy DOM utilities, plus IndexedDB for local persistence. Real-time collaboration uses a hybrid approach: HTTP&#x2F;2 POST for resilient ops + WebSockets via Laravel Reverb for live cursors, presence, and edits.<p>This is a pre-release stress test, not a launch. Lightwave will be a paid product. Right now I&#x27;m opening it up because no amount of solo testing replicates getting punched in the mouth by real traffic.<p>The link above has a button to create a test account in 1 click.<p>Known rough edges: the cursor and selection system are built from scratch (like VS Code, not a contenteditable wrapper), so there&#x27;s a lot of surface area. Some keyboard shortcuts may be missing. Desktop only, accessibility not yet implemented. I&#x27;m shipping fixes in real time.<p>There&#x27;s a &quot;Submit Bug or Feedback&quot; button inside the app if something breaks. Happy to answer any questions about the architecture, or anything else.<p>Some highlights:<p>- Paste markdown in, get native blocks. Copy blocks out, get markdown back.<p>- Hierarchical document, structure. Hierarchichal file manager.<p>- Live collab with shared cursors, selection, and presence.<p>- Code blocks with syntax highlighting. LaTeX math blocks.<p>- Full data export: markdown, JSON, and attachments. No lock-in.<p>- Full undo&#x2F;redo with cursor restoration.