by jpereira on 3/5/25, 5:55 PM with 60 comments
For the last 8 months we've been working on leaflet.pub, a web app for making delightful documents. We're trying to strike a balance between Notion and Google Docs — very fast, ultralight and easy to share, but also supporting rich blocks and multiple pages.
Weirdly, none of the many notetaking/document apps that we could find hit this combination, so we made Leaflet. With it you can:
- Instantly create a doc, without an account - Share read and edit links - Sign-in with email to sync your docs to different devices - Add rich blocks, like canvases, subpages, rsvps, and polls
It's really useful for one-off collaborations, running events, or just when you need a blank page without having to buy into a whole organizational system.
We also spent a lot of time making sure Leaflets look good. We've found that there's a pretty blurry boundary between a document and a website, so making something that people can feel proud to publish online was key.
Here's a couple examples!
- Jake's presentation on Slöjd, traditional handcraft pedagogy (https://leaflet.pub/3d28b4a7-3703-4ae5-aaf6-d270ffe1151f) - Laura's documentation of her website redesign (https://leaflet.pub/14aba696-e894-440a-9d06-917641a2bfce)
Some technical details that might be interesting:
- We do sync and all our client-side state via Replicache, which I really love! - Data is modeled as a set of facts about entities, a la Datomic, forming a graph. This has been flexible enough for us to quickly build new features, like canvases and nested pages, without committing to a single document structure. - We use ProseMirror, but not for the entire document. Instead every text block is a separate ProseMirror instance. This lets us keep the document structure in our database and our schema, without having to dive into ProseMirror's every time we want to modify things.
Our (somewhat messy) source is available here: https://github.com/hyperlink-academy/leaflet if you want to dig deeper!
On the horizon:
- Better home and document organizing features — things like search, tagging, collections etc. - We're really excited about ATProto and Bluesky and are working on a set of lexicons and an AppView for document publishing! This will include a lexicon for rich text documents, as well as one publications, and some concept of memberships or subscriptions. - More blocks! Tables, code blocks, etc.
Some things we're particularly proud of:
- Our list handling - Custom theming - Keyboard handling on iOS Safari (and generally works excellently on mobile) - Side-scrolling multi-page interface - Works as a PWA!
Some things that still need work:
- While faster than others, still a lot of work we can do on performance, both speed when working with very large documents and loading docs generally - Drag and drop and selection in general could be a lot nicer - Keyboard navigation across multiple pages - Multiplayer cursors, and generally real-time sync could be sped up greatly leveraging CRDTs (we already use YJS, just could move updates around faster)
You can create a new document just by visiting https://leaflet.pub (or https://leaflet.pub/new if you're signed in) — would love to hear your thoughts and any feedback if you give it a try!
by jofer on 3/6/25, 12:17 AM
May or may not be relevant for you (and is definitely a very different field/product), but if you're releasing client libraries/SDKs of any sort, it might be good to be aware of. There's a large ecosystem of plugin libraries named "leaflet-foo" or "foo-leaflet" etc in addition to the "main" one. If you start releasing any libraries to work with your app (even if they're not JS), you'll likely want to be aware of and work around naming collisions for library names.
Either way, looks nifty!! I love the approach and we need more people willing to do something like this that competes with google docs / etc, but does so by targeting a specific use case / niche / etc and not by trying to do everything.
by gazook89 on 3/6/25, 2:01 AM
But otherwise, this pretty well lines up with an idea that I had just been mulling over in the last 2 days. Which is pretty eery, but well timed. Realistically I wasn't ever going to do it, so I'm glad I may not have to miss out.
by nsriv on 3/5/25, 10:06 PM
by ChrisArchitect on 3/5/25, 11:15 PM
by amendegree on 3/5/25, 11:32 PM
I’m always weary of getting involved in a new tool only for the rug pull to happen later.
by deanebarker on 3/6/25, 1:20 PM
by breadchris on 3/6/25, 4:43 AM
Looking forward to tracking this project! Is there a community one could join to get updates?
by layer8 on 3/6/25, 2:31 AM
– When tapping on the leaflet icon in the bottom left, the whole text area is erased (Safari on iPad).
– The strikethrough icon is a bit hard to recognize, because the stroke merges with the S line. Some text editors use a different letter for that reason, for example a T, and add a small gap along both sides of the stroke to emphasize the overlay (only on the icon, not on the actual text being edited).
– Making the strikethrough line lighter than the text color is a bit unconventional, I’m not sure it helps readability. In the default text size, the line is easy to overlook, also because it is pretty thin (on a hi-DPI display). This is particularly the case on bold and/or italic text.
– No dark mode support, it seems.
by holistio on 3/6/25, 5:26 AM
by cetra3 on 3/5/25, 11:46 PM
by sabellito on 3/5/25, 10:49 PM
by sno6 on 3/6/25, 1:37 AM
All the best!
by dirkc on 3/6/25, 11:56 AM
Also interesting to see that you chose WhatsApp for the RSVP element. Did you use Twilio for the integration and what was the level of effort needed?
by crossroadsguy on 3/6/25, 3:36 AM
by jslakro on 3/6/25, 12:10 PM
by rafram on 3/6/25, 12:09 AM
by jayloofah on 3/5/25, 10:44 PM
by zekenie on 3/6/25, 12:58 AM
I wish canvases had edges connecting nodes
by pjzh on 3/6/25, 7:29 AM
by croisillon on 3/6/25, 8:22 AM
my only nitpick at this moment: i like to see my scrollbars on a desktop
by simmo9000 on 3/5/25, 11:19 PM
by android521 on 3/6/25, 11:10 PM
by gr4vityWall on 3/6/25, 2:13 AM
Is there a tutorial for how to self-host it?
by pwillia7 on 3/5/25, 10:37 PM
by pazimzadeh on 3/6/25, 5:33 AM
Can you edit a button after adding it?
by klntsky on 3/6/25, 11:06 AM
by ftr1200 on 3/5/25, 10:41 PM
Loading the landing page was a breathe of fresh air. Thank you.
by pokpokpok on 3/6/25, 4:13 AM
by kaizenb on 3/6/25, 6:55 AM