Readit News logoReadit News
Posted by u/seansh 2 years ago
Show HN: Unforget, the note-taking app I always wanted: offline first, encryptedunforget.computing-den.co...
Hi HN! I created Unforget out of years of frustration with Google Keep and the lack of alternative that met all my needs. I hope you find it useful too!

Features include:

  - import from Google Keep
  - offline first including search
  - sync when online
  - own your data and fully encrypted
  - Desktop, mobile, web
  - lightweight, progressive web app without Electron.js
  - markdown support
  - programmable with public APIs
  - open source [1]
While I still use org mode for long-form notes with lots of code, Unforget has become my go-to for quickly jotting down ideas and to-do lists after migrating the thousands of notes I had on Google Keep.

In addition, I'm thrilled to announce the opening of our software agency, Computing Den [2]. We specialize in helping businesses transition from legacy software, manual workflows, and Excel spreadsheets to modern, automated systems. Please get it touch to discuss how we can help you or if you wish to join our team.

[1] https://github.com/computing-den/unforget

[2] https://computing-den.com

whartung · 2 years ago
What has been your experience writing the "off line first" style PWA?

There's an appeal to it, basically using the web purely as distribution, and the browser as the runtime. But I'm concerned with the fiddly-ness of local storage and such like that. The "out of site, out of mind" nature of it. The data not being in a "~/.app/app.dat" file, etc. The idea of it potentially just up and vanishing with a browser update. And, heck, just the complexity of dealing with the schema versioning in the native web model.

As well as the portability of data (say when you copy over to a new computer).

The idea of simple web distribution is compelling. Now you need nothing more than a github account, and off you go. No server, no nothing.

But I still feel (perhaps ignorantly) that the data situation is still on shaky ground. (Discounting the whole lack of something like SQLite, etc.)

And, the idea of bundling something like SQLite as a webassembly blob just makes me itch.

Just curious how that's worked out.

seansh · 2 years ago
There's definitely a lot of fiddlyness when it comes to the web stack.

Having said that, indexeddb has been very reliable. There are some annoying limitations though. For example, if you want to create an index on a store using multiple keys, you can't specify which key should be ascending or descending.

If you add the PWA to your home page, i.e. install it, then the browser must not clear indexeddb on an update or something. And as far as I can tell, browsers do respect that.

My overall experience building PWA has been mixed. I think it really depends on what app you're making. For a note taking app, where the data can be backed up to the cloud encrypted and synced, I really think a PWA is the best option. But if you want tighter integration with the platform e.g. accessing the file system, then I would stay away from PWA.

Another issue is ios safari which is missing a lot of features for PWAs and I think unlikely to support them in the future. E.g. background sync, offline push notifications, etc.

Are you considering PWA for any particular app?

whartung · 2 years ago
I'm just writing little stuff in Java, and use that as my x-platform environment, but even it has its challenges.

So, I was considering a PWA. I don't need tight local integration per se. I do have a conceptual problem not being able to save a file or read a file, even if it's just chosen by the user. I THINK I can do that. I THINK you can pop a file chooser to read a file, but not necessarily just open any file you want. If you can read/write a file as directed by a user, that would be fine. I can see the rest being stored in the IndexDB. And that gives the option of an export/backup if it becomes necessary for peace of mind.

Then there's the whole x-browser game, I'm not really looking at mobile, just desktop, but I'd like to support FF/Chrome/Safari/Edge.

It's not rocket science stuff by any means. But I don't want a user to call up and talking about how their data suddenly vanished because they went to get the latest, and I did something innocent/ignorant (or not), or THEY did something (deleted their PWA icon, copied it, moved it, etc.), or the browser did something.

I have no experience with it, so for now, I'm not comfortable because I don't have my "hands" on the data.

If I can export it, then the comfort level goes way up. Inform the user to back up "just in case", especially early on when we're all still bumping in the dark.

To be clear, I don't want a server side, I have no interest in standing up a service component. I have less interest in maintaining a service component. I'd like the code to be local and "standalone" as practical.

But I also want something a touch more than "git clone app; cd app; ./build".

dunham · 2 years ago
You mention in the sample page that Safari on desktop "cannot install". But in recent versions of macos, it has "save to dock" in the "Share" menu.

This creates Unforget.app in ~/Applications which appears to work. I've also successfully used this with Tana in the past. Did you run into trouble with that or have you not tested it?

austinjp · 2 years ago
I've been pondering similar regarding data persistence. One half-assed idea I have is simply to prompt the user to save the data regularly. A reminder with a button/link which triggers data serialisation from storage and then triggers the save dialogue. The serialisation/save could be triggered manually any time. A reciprocal import would also be needed of course.

Another similarity half-baked plan is for a PWA to regularly post (encrypted?) data to a service I'd host that simply forwards the data to the user's choice of cloud storage. It would require initial setup and probably regularly refreshing token, but should be workable.

cyanydeez · 2 years ago
Ive got a PWA forth coming, i expect to make a electron or other companion app to make.it self hostable via webrtc.
reitanuki · 2 years ago
> The idea of it potentially just up and vanishing with a browser update.

Anyone writing applications in the browser should be very cautious to note that many browsers will jettison some types of their website storage if disk space is low.

This is frustrating at the best of times, but if there's no server-side backup then frustration would be an understatement.

I am not sure if this caveat applies to localStorage but from experience it does to IndexedDB — seemingly even in Electron applications (??).

seansh · 2 years ago
> from experience it does to IndexedDB — seemingly even in Electron applications (??).

oh fun! I haven't run into that. But if you're using electron or any platform's local webkit wrapper, then it makes a lot more sense to forgo the browser's storage and directly use sqlite + server-side backup if possible.

dugmartin · 2 years ago
I think the safest offline storage is to use the browser file system (https://developer.mozilla.org/en-US/docs/Web/API/File_System...) so the data is out of the browser's hands.

It works pretty well with the only downside being the user needs to re-select the file/directory to use each time they use the app and there is no way to force the file picker to start in a specific directory other than the "well known directories".

mayne · 2 years ago
Now, you only need to select the directory once, and the browser will retain permissions

https://developer.chrome.com/blog/persistent-permissions-for...

balajics · 2 years ago
!The data not being in a "~/.app/app.dat" file, etc.

It is possible to do this now in chromium based browsers. Refer https://developer.chrome.com/docs/capabilities/web-apis/file...

tithe · 2 years ago
It seems it's using `better-sqlite3`[0] and saving the database to a file called "private/unforget.db"[1].

(Although, I don't have experience with SQLite, so that file might be as volatile as `localStorage`.)

[0] https://www.npmjs.com/package/better-sqlite3

[1] https://github.com/computing-den/unforget/blob/master/src/se...

seansh · 2 years ago
Yes that's the database on the server for storing encrypted notes and syncing. My experience with SQLite has been very positive. It really is rock solid.

Also, wanted to mention that Unforget doesn't use browser's localStorage. LocalStorage has a low limit and the browser can nuke it when it wants. Instead we use IndexedDB which has much higher limits and persistent.

lxgr · 2 years ago
I’ve been using Omnivore (a “read it later” app), which I otherwise love, but even though it’s an iOS app, offline support is one of its biggest weaknesses.

As far as I know, it’s using some caching library at the HTTP level (as opposed to handling its own persistence at the application layer), and in falls apart every time I have a poor connection, remaining broken (even after fully going offline) until I’m back online.

winrid · 2 years ago
This was my concern with building a PWA, which is why SidewaysData is a native desktop app. The downside of course is updates, but that's manageable.
cyanydeez · 2 years ago
If you have a.desktop app, zetup a webrtc connection and you can create a teathered.webapp in PWA.
colinhb · 2 years ago
Looks great! One thing I’d suggest (which still isn’t clear to me but interested enough to investigate later): make the note taking workflow clear…

* Is this a bunch of titled markdown docs organized (conceptually) into folders/hierarchically?

* Is this a bunch of untitled/title optional “cards” organized by tag?

* Is this a long, markdown document, which you append to?

These are similar to different mainstream and less so note taking systems, and would appreciate understanding what workflow you’ve designed and optimized around.

Saying you started as a Google Keep user is helpful, buy I’ve only used other systems (Homebrew textfiles, Simplenote, obsidian, etc), and have some concepts around what Evernote and OneNote are like, so giving a couple more signposts on usage would be helpful.

seansh · 2 years ago
Thanks for the feedback. You're right I didn't really think about the fact that you may come from a very different system with different concepts. I'll explain the workflow better in the demo notes.

To answer your questions quickly, I usually keep very small notes just a few lines or todo checkboxes. One note per idea. But sometimes an idea grows over many days and that note gets much larger. There's no limit to how large a note can get.

You can always set the title of the note using # which is standard markdown, or leave a blank line after the first line and it automatically becomes the title.

There's no concept of tag per se but you can write #someTag and then literally search for #someTag. The search feature is just substring search over all the notes (no stemming or anything fancy).

colinhb · 2 years ago
Thanks for the clarification, still haven’t really played with it, but take it these are the mechanics (not the workflow)…

* You have a big chronologically ordered list of notes

* By default, all notes are in view

* You can make a title (instructions in demo), but significance of title is only internal to note (not for ordering/management)

* Big list of notes is union of two disjoint sets: pinned and unpinned

* Can view either all notes, pinned notes, or un-pinned notes

But not sure if I have that right. FWIW appreciate some of the design decisions I’m seeing, just haven’t had time to poke around to understand.

realityfactchex · 2 years ago
1. Nice. The more kinds of self-run notes apps to choose from, the better, IMO.

2. Nit - on the demo page: Priavcy --> Privacy

3. Why does one of my browsers raise the error, "Your browser does not support service workers. Please use another browser."? Can this be worked around, or is the use of service workers essential to the distinguishing characteristics of the app? Genuinely curious.

seansh · 2 years ago
Thanks a lot. Well without the service worker it wouldn't work offline any more and that's one of the key features. I remember trying to write down some notes in Keep while traveling just to find out it sometimes doesn't work offline.

I'm curious which browser are you using?

csense · 2 years ago
Not OP, but I get this message too. I'm using a modern Firefox (Firefox has supported service workers since 2016) so browser version isn't an issue.

I don't know much about service workers. But, after some searching I found out they apparently aren't supported in private / incognito mode.

I do 95%+ of my browsing in incognito mode, so this makes a lot of sense.

realityfactchex · 2 years ago
> I'm curious which browser are you using?

Tor Browser

> Well without the service worker it wouldn't work offline any more and that's one of the key features.

Thanks, that definitely seems worthwhile then!

Deleted Comment

wonger_ · 2 years ago
And another small typo: GitHub falvored -> GitHub flavored
seansh · 2 years ago
fixed, thanks!
imranhou · 2 years ago
Any plans on integrating something like this? - https://simplemde.com/ when the notes get heavy, I prefer a simpler wysiwyg editor than to keep up with markdown syntax, especially if my notes contain tables etc.
seansh · 2 years ago
I'd love to have a wysiwyg editor. It's just that in my initial tests I couldn't find one that worked well on all platforms. I'll try this one too. Thanks!
imranhou · 2 years ago
What problems did you encounter with something like https://ui.toast.com/tui-editor? Which is much more featureful than simplemde.
achrono · 2 years ago
Neat work and more power to you to build further.

This reminded me of Joplin. What's the direction you're looking to take this in?

seansh · 2 years ago
Thanks you. I tried Joplin too. I really like it but there were a few issues other than its being an electron app.

For example, the workflow didn't seem very fast to me. For example, open the app, then at most after one tap you should start typing immediately, enter multiple todo items without going to menus or pressing any other buttons. On desktop, it should all be keyboard driven anyways. In other words, I want the UI to get out of the way. I think this is something that many note taking apps miss.

As for the direction, I'd like to make it easier to migrate from other apps. There's already a Google Keep importer but there should be many more.

Also, with the public APIs, I'd love to see some Emacs, vscode, vim clients/integrations :)

Other than that, it pretty much covers all my needs at this point.

ASalazarMX · 2 years ago
I'm always on a quest for a better structured knowledge storage, and while I usually stay away from electron apps / desktop JS, I see that the most experimentation comes from them.

Since it's a JS application, have you considered supporting Mermaid diagrams? While heavy, Joplin is my goto for notes these days because Mermaid syntax has been a game changer compared to simple markdown.

https://mermaid.js.org/

izoow · 2 years ago
Being similarly frustrated with note taking apps lately (Android), I finally discovered one that's pretty amazing, so I'd like to mention it. It's called Zettel Notes [1]. It's all offline, with support for many syncing options, and the notes are simple markdown files stored in a directory.

[1] https://play.google.com/store/apps/details?id=org.eu.thedoc....

cenamus · 2 years ago
Can also vouch for Zettel notes, git integration with sourcehut was a bit fiddly but once set up it's great. Even supports most the the Org I use
j_walter · 2 years ago
I'm always looking for a good note taking app that is self-hosted but still looks great on mobile AND desktop. Any chance you plan to release a docker container at some point?
seansh · 2 years ago
Thanks, sure, I wouldn't mind releasing a docker container if it'll make it easier to deploy.