10 ms·
Twinkle Notes: Cross-platform encrypted notes app
- thebeardisred 7y agoKudos on the courage to go with the AGPL. It immediately raises my interest quite a bit.
- torstenvl 7y agoI've seen a lot of these kinds of apps lately that have their own one-off sync mechanism. Can I ask what were the design considerations that led to that choice, rather than letting users sync a store via their own back end (Dropbox, iCloud, rsync...)?
- jlongster 7y agoI develop an app like this (https://actualbudget.com/ https://actualbudget.com/) and I'll give you my reasons. Those kinds of syncing work will files, and treat each individual file as a blob. Apps don't work this way. Apps need databases and fine-grained change tracking. You absolutely don't want to make a change in two places on two separate devices and then have a sync conflict. If you throw the sqlite db file on dropbox, that's exactly what will happen. You could try to build your app around files, but now you are rebuilding a database (and not a good one). There are a few services that offer syncing more appropriate for apps, like Apple's CloudKit (I think that's the one?). These could work, but in Apple's case you can only run your your app on macOS/iOS. There are a few generic syncing layers like PouchDB, and there are tradeoffs with all of those. Some of these tradeoffs are deal breakers. (there aren't a ton of good options yet) But there are good reasons why you an app can't just eschew syncing onto the user, and assume they'll find a good syncing service. It needs to be tightly integrated with how the database works.
- yoz-y 7y agoThose are all good reasons but I’d argue that starting from the desire to be able to use existing sync services and building on that may be more user friendly. Yes you essentially need to rebuild a database, but this is for example what 1Password did.
- jlongster 7y agoI disagree. I mean, it depends on the kind of app. The data requirements of some apps might do well in a simpler model that can work OK with existing syncing services. But the majority of apps need more complex needs and you definitely should not go and build a new database. The user experience will end up being flaky (syncing problems) and/or slow (the database is not good). Not to mention that now in addition to setting up the app, the user now needs to go sign up for one of those services if they haven't already. With integrated syncing, the user just fires up the app and syncing works and they never have to care about how it works. There's a reason a whole field of research exists into things like CRDTs. Distributed apps are not trivial, and only ones with simple data needs could get by without a more rigorous approach.
- rpdillon 7y agoI generally agree with your reasoning, but recently experienced a counter-example myself. I recently picked up Joplin for note-taking, and the fact that it can sync reliably through my NextCloud instance via WebDAV was the deciding factor in me sticking with it. If I had to rely on a company to stick around to sync my notes, or I had to run a custom backend, I would have simply moved on. As is, Joplin is pretty close to an ideal note-taking system for me.
- jlongster 7y agoThat's awesome, there's definitely room for apps like that. I have nothing against them, but there are tradeoffs. Seems like that could work well for that kind of app.
- wolfhumble 7y agoIf you don't mind, what type of database does 'Actualbudget' use? Thx!
- jlongster 7y agoInternally it just uses sqlite, and there's a syncing layer on top of it. I gave a talk about it here: https://www.dotconferences.com/2019/12/james-long-crdts-for-mortals https://www.dotconferences.com/2019/12/james-long-crdts-for-...
- wolfhumble 7y agoOkay, thanks! :-)
- vbezhenar 7y agoYou keep local copy of database and cloud copy of database. When cloud copy changes, you detect difference and apply it to your local copy, resolving conflicts if necessary, then copy your local copy back to cloud. It might be more difficult to implement, but it allows user to use any sync option.
- leppr 7y agoJust wanted to say I love this business model of providing a free open source app, with convenient secure syncing being the paid option. The trade-offs for a user who's committed to not paying for the premium features are mainly about convenience and security (having to maintain a fork, and missing out on automatic security updates), which ressembles those they would have to make by pirating a closed-source app. Right now the license is AGPL, is this temporary (since the website calls the app "Source available" vs "Open-Source")? PS: The submission title should begin with "Show HN:".
- twknotes 7y agoWe are definitely using AGPL because, for the paranoid, they should be able to build their own binaries and distribute to their friends.
- CiPHPerCoder 7y ago> end-to-end encrypted https://github.com/twinkle-labs/twinkle-notes/blob/45206f9d61899a934c65db85f49a705730046fad/site-lisp/lib/space-list.l#L53-L66 https://github.com/twinkle-labs/twinkle-notes/blob/45206f9d6... For AES in CBC mode, IVs have two requirements: 1. They must never repeat. 2. They must be unpredictable. Generating them from a SHA256 hash of some low-entropy data is not a good practice. https://paragonie.com/blog/2016/05/how-generate-secure-random-numbers-in-various-programming-languages#commonlisp-csprng https://paragonie.com/blog/2016/05/how-generate-secure-rando... Furthermore, not authenticating your ciphertext means padding oracle attacks can be launched against the app. https://robertheaton.com/2013/07/29/padding-oracle-attack/ https://robertheaton.com/2013/07/29/padding-oracle-attack/
- kebman 7y agoWhat do you think about NaCl for a project like this?
- CiPHPerCoder 7y agoLibsodium (a fork of NaCl) is preferable to NaCl. JS: https://www.npmjs.com/package/sodium-plus https://www.npmjs.com/package/sodium-plus (I wrote this one.) Lisp: https://github.com/orthecreedence/cl-sodium https://github.com/orthecreedence/cl-sodium Java (Android): https://github.com/terl/lazysodium-android https://github.com/terl/lazysodium-android Other bindings: https://libsodium.gitbook.io/doc/bindings_for_other_languages https://libsodium.gitbook.io/doc/bindings_for_other_language...
- lawl 7y ago> Libsodium (a fork of NaCl) is preferable to NaCl. Can you elaborate on this? Quickly looking over your libsodium based sodium-plus it doesn't seem like it has been audited. (I know libsodium itself had an audit) Where as for example tweetnacl-js [0] has been audited. That's not meant to take a dump on your project, but I just don't understand why it is better, or preferable. [0]: https://github.com/dchest/tweetnacl-js#audits https://github.com/dchest/tweetnacl-js#audits
- paulcarroty 7y agoI prefer to write notes directly in VSCodium ans sync them to private git repository. Very useful. https://github.com/patleeman/VSNotes.git https://github.com/patleeman/VSNotes.git
- muhammadusman 7y agothanks for sharing this, trying it now :)
- tobib 7y agoI can recommend https://notable.md https://notable.md which I sync to a private git repo.
- wtmt 7y agoA few questions and observations: * If I choose to use this notes app on multiple devices, and am careful enough to be the only person using it and complete any note taking on one device at a time (closing the app properly), I should be able to store and sync the sqlite database on any cloud storage service and wouldn't need the paid sync option, correct? In other words, the sync option makes multiple clients opening and making updates in the same time period a non-issue? * The costing seems a bit weird when one digs in, because it defaults to counting in one GB increments even though the unit is stated as GBm and compared to things like KWh in the explanation. Even if you store only a few bytes of notes (or a few KBs), the documentation says that you'd still pay a minimum of 1GBm. So that works out to a $7.176 a year if you don't cross 1GB in storage used. * Since this is open source with AGPL, anyone could fork it to support a custom sync mechanism that allows to store the database on cloud storage/sync services, but would have to make the source available if they distribute the app to others.
- twknotes 7y ago> store and sync the sqlite database on any cloud storage service It would be quite slow. > a minimum of 1GBm Our servers are quite dumb that if you are hosting your space with us, we need to reserve some storage space for you. That's a fixed cost for us even if you are not effectively using that storage.
- wtmt 7y agoWhy would a notes database, that’s mostly (or all text) even take up a lot of space and make syncing the entire database slow? If someone is using just a few MBs of data, the speed of syncing that is immaterial. Your servers not being able to account for smaller storage sizes is a technical limitation that you have built. You can take a look at tarsnap for inspiration on how to account for very small amounts of data. I’m not saying you should account for bytes, but even taking it at a fraction of what you’re currently doing would be better and fairer to paying customers. You would also discourage hoarders who thrive on utilizing a lot more and get subsidized by those who barely store much.
- vzaliva 7y agoI was in search of a good cross-platform notes app. Like Evernote, but preferably free with the open data format. I concluded that for me, personally, emacs org-mode with notes files stored in the Dropbox folder turns out to be an optimal solution. YMMV.
- jayaram 7y agoAfter spending a lot of time testing out different apps, I ended up doing the same. Also orgzly for android works pretty well with org files stored on dropbox!
- hsjkfhskjfd 7y agoSame problem here. Resorted to keeping everything plain text after trying so many half-baked and sticky note taking apps that prevent your notes from being ported. Currently using this Chrome extension: https://chrome.google.com/webstore/detail/marcador/nneoamjiblbbinjjnbajbeaeohmnmkdl https://chrome.google.com/webstore/detail/marcador/nneoamjib... Started as just adding bookmarks to your Dropbox, but now it lets you add plain text notes. And it only has access to its own app directory--not your whole Dropbox!
- c-smile 7y agoI think that my Sciter.Notes (https://notes.sciter.com https://notes.sciter.com) will qualify that. Notes are stored in local db yet notebooks in the db can be mapped on file folders (e.g. folder on DropBox containing html files - each note is a single HTML file). The note db file can be protected/encrypted by OS means. Windows/Mac/Linux.
- urlwolf 7y agoAgreed. Sciter notes is a gem. It's fantastically fast. C-smile, congrats on writing this masterpiece. I wish you best of luck. If you found a biz model to support it and add features, it'd be great. So much low hunging fruit in a world of electron apps and a crowd (HN) that mostly hates them.
- tobib 7y ago
- rhubinak 7y agoAnd an actually free (automatic sync with no limit on data capacity) alternative: https://standardnotes.org/ https://standardnotes.org/
- tobib 7y agoI'm assuming this is an app with a GUI. I wish there were screenshots showing what it looks like.
- urlwolf 7y agoTried it on mint (LTS). uname -a (base) Linux q 5.3.0-28-generic #30~18.04.1-Ubuntu SMP Fri Jan 17 06:14:09 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux I get: /opt/app.twinkle.notes/twinkle (base) dist:/opt/app.twinkle.notes var:/home/q/.config/twinkle dist=/opt/app.twinkle.notes var=/home/q/.config/twinkle * Twinkle Lisp 2020 * DevTools listening on ws://127.0.0.1:16780/devtools/browser/6d2dd982-a67d-4915-8517-83d4394054a3 error: file '/opt/app.twinkle.notes/lisp/lib/sqlite3.l': position 13622: line 386: invalid number #1: /opt/app.twinkle.notes/lisp/init.l:42: (load "lib/sqlite3.l") [2020-02-05 23:23:09,394950 init#0] finished due to run time error This is the deb file on your website.
- twknotes 7y agoThis seems strange. Can't reproduce the problem here. Can you please help to check what's on line 386?
- rkagerer 7y agoOn windows/linux, we have no choice but to use chromium embedded framework. But, there are so many choices. Does it really have to be html-based?
- twknotes 7y agoSometimes you just want to make something work, as soon as possible.
- sghacker 7y agoreally like the cross-platform nature and the E2E encryption. a powerful application masked by a humble appearance. ideal for creative workers. Would be good see this extended to include password protections, audio conferencing, etc.