5 ms·
I tried to build StackOverflow for flashcards (i.e. spaced repetition with collaboration as a first class feature.) After working on it on nights/weekends for ~
by dharmaturtle 5y ago
I tried to build StackOverflow for flashcards (i.e. spaced repetition with collaboration as a first class feature.) After working on it on nights/weekends for ~2 years, I realized my architecture was shit. I started out with Blazor + F# + PostGres, but eventually I realized that syncing offline client DBs to the cloud was a very nontrivial problem. So I moved to event sourcing. Turns out that's not much better - I started to write my own IndexedDB wrapper, then said "you're a moron" and switched to CouchDb/PouchDb/RxDB. I also wanted to support plugins. I thought I figured that out with Blazor, but eventually I realized that more powerful plugins would want to manipulate the DOM directly. Blazor's virtual DOM kills that possibility. So, I'm off the dotnet ecosystem (I am so, so sad to leave F#) and onto Typescript + SolidJS. I would've gone ReScript but that's tightly coupled to React which uses the VDom. Perhaps I should be using Svelte - I'm not 100% on any of this new architecture yet. So my project has not yet entirely failed... I just realized I spent ~2 years on the wrong architecture.
The carcass of my attempt in dotnet: https://github.com/dharmaturtle/cardoverflow https://github.com/dharmaturtle/cardoverflow
- rustybolt 5y agoNot sure if it's intentional , but your post reads somewhat like satire.
- dharmaturtle 5y agoNot satire, just being blunt. What do you think I'm satirizing? The magpie developer?
- rustybolt 5y agoYes, nothing wrong with learning new technologies but this seems like using your side project as an excuse to learn new technologies. Also nothing wrong with that, but personally I like to think more about architecture than about the particular implementation.
- dharmaturtle 5y agoFair point. In my defense, people say you should pick the tech-stack you're most familiar with: https://news.ycombinator.com/item?id=29626371 https://news.ycombinator.com/item?id=29626371 Perhaps I'm misusing the word architecture - I guess I really mean tech-stack. 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.
- NicoJuicy 5y agoWhy indexed db and offline syncing? Ps. https://martendb.io/ https://martendb.io/ and https://www.microsoft.com/en-us/download/details.aspx?id=23217 https://www.microsoft.com/en-us/download/details.aspx?id=232... ( Microsoft sync framework)
- dharmaturtle 5y agoA person should be able to study their flashcards/notes in an offline environment. E.g. on a plane, on a train in a tunnel, where-ever. Also, flash cards are quite personal, and many people have hesitations about trusting them to some cloud-only server. Imagine if Obsidian/VSCode/your-note-app only worked while online. (Heck, look at how much pain Notion is going through trying to support offline behavior.) At the very least there needs to be a way to export their data to some CSV. IndexedDB is a nightmare, but it has a library that lets it easily sync with the cloud (PouchDb/CouchDb). I'd consider Sqlite, but its syncing features/community are significantly smaller than *ouchDb. Unfortunately MartenDB is on PostGres (which makes it unviable for electron-style clients) and Microsoft Sync Framework looks dead.
- 5y ago
- maximp 5y agoDid you ever have any users? Or did the technical challenges stop you short of shipping the product?
- dharmaturtle 5y agoNo users - no launch. I have many conversations with potential users though... I'm 100% positive this is something that people want. E.g. right now the way they solve the problem of collaborating on flashcards is by using _google sheets_ to collect errata on shared decks. https://www.reddit.com/r/medicalschoolanki/comments/f0bj27/official_errata_google_doc_links_for/ https://www.reddit.com/r/medicalschoolanki/comments/f0bj27/o... This workflow involves manually checking the sheets link, downloading it, converting it to the correct format, importing it into your collection, and hope it doesn't override/corrupt your own customizations to a particular card. It's absolutely fucking nuts. 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.
- quadrature 5y agoCan you launch without offline sync ?.
- dharmaturtle 5y agoGreat question. I've thought hard about this. I originally built it to be online-first, thinking "you can add offline support later". This is the version that's demoed in the video on the Github - and is over a year old at this point. I abandoned this for multiple reasons: 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.
- redact207 5y agoI feel your pain. I'm a .net guy who transitioned to typescript 5 years ago. 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.
- dharmaturtle 5y agoThe main thing that's been scaring me away from Firebase is the vendor-lockin/pricing. My target audience are students who are very price sensitive, and I hear firebase is pricy as heck. I will likely launch this as a freemium service. Sync is kinda table stakes, so it'll need to exist in some capacity for free users.