by dharmaturtle · 4y ago · 0 comments
The carcass of my attempt in dotnet: https://github.com/dharmaturtle/cardoverflow
Also nothing wrong with that, but personally I like to think more about architecture than about the particular implementation.
I'm most familiar with F#, so I went with that and Blazor initially (to avoid learning JS). PostGres feels fairly uncontroversial. Perhaps I magpied from there to event sourcing - I still find it surprising that an indexdb-eventsourcing-wrapper doesn't exist. I considered ReScript given my F# background (the two share a similar philosophy/syntax).
Now though, I'm trying to "pick the best tool for the job" instead of "use what you know". AFAIK if you want offline syncing, the best tool for the job is CouchDb/PouchDb. If you want to avoid the VDom, Svelte or SolidJS are the most popular options.
Please let me know if I'm mistaken - perhaps I'm too lost in my own head.
If I may, could I suggest Firebase as something to consider? It has automatic offline sync over indexdb, and you can subscribe your app to data changes to sync all devices etc.
It takes about a day to get your head around how it works, and given your use case you probably just need the Hosting, Firestore + Auth modules.
I use it a lot now in my side projects and it has been life changing in terms of taking away all of the boilerplate code and letting my just write app code.
I'm 100% sure it (or something like it) is desperately needed by the world. However, students aren't really well known for paying for software, so this remains a nights/weekends thing.
1. Adding offline support is very nontrivial. It (may) influence your choice of DB and your data schema. This is a type of master-master replication, since the user is the master of their data, and this is quite painful in RDBMS-land. I'm avoiding having to migrate my schema to support offline sync.
2. There already exist solutions that are online-first. E.g. Quizlet, mochi.cards, remnote. I find all their tools for collaboration lacking, despite being online-first... which is surprising. They don't even support something as basic as commenting on a card. This blows my mind. Imagine Github without issues/discussions/pull requests.
3. Users have repeatedly told me that they prefer offline-first. This is probably due to them coming from Anki - a popular open source offline-first program. Anki is my real "competition" - not billion-dollar Quizlet.