I took the initial idea from this post: I found the possibility of gently, recurringly directing myself to ruminate on certain concepts compelling.
Here's my original spec:
- spaced interaction: follows simplified leitner-box sequencing
- notes aren't flashcards, however: doesn't ask you to answer a question
- each note is not a fact, but an e.g. claim, or observation, or mental model
- rather than increasing retrieval strength of note's content, aims to exercise contemplation/investigation of note's content
- in addition to note's content, each interaction provides user with a single question
- only presents you with one prompt per interaction, but lets you swipe to choose a different prompt if desired
- user fills out one prompt (via a textbox) to 'complete' the interaction
- next time the note comes up
- it's got the initial text, but also
- the commentar(y/ies) you've added prior (hidden accordion-style?)
While working toward an MVP, I replaced:
- the Leitner-box system sequencing with a simple
<select>
that included a ~Fibonacci sequence of days, for greater flexibility; and - the "each interaction provides user with a single question" model with a randomly-selected "prompt-note" to pair with, complement, qualify, contradict, or otherwise Hegel-dialecticify the note-under-contemplation's content.
After working through such options as (in decreasing order of repugnance) "ZettelCast", "Reflectric", "Myslennya", and "Forster-Wallace Collider", I settled on the provisional name of "Mokko", a nice two-syllable Japanese abstract noun to pair with my personal usage of Anki.
And this repo is the backend for that app!
Let me begin not with an excuse, or apology, but defiant explanation: I had a vision of a tool, and I. Wanted. It. Now. The two frameworks I've worked with the most are React and Rails, and so that's what I decided to use for getting a working prototype out the door.
I adapted the JWT from this tutorial; I felt like devise
was overkill for this project and liked that it didn't unnecessarily incorporate that gem.
Early on, I committed the cardinal sin of touching migration files (it was late on a Thursday! I was tired and had stuff to do!); that should explain any remaining discrepancies inside db/migrate/*
.
Beyond that, the majority of the non-CRUD functionality is in (ayyy look! More antipatterns!) the NotesController
, particularly NotesController#review
.
For a local version, you'll...
- pull down the repo;
- run
bundle install
; - run
rails db:prepare
; and - run
rails s -p 5000
(assuming you want to use it with the complementary frontend code.)
This'll return JSON from e.g. Postman, but I'd recommend pulling and running a local version of the app's UI, as well, for readability/discoverability.
For setting up a remote version, I'll leave the steps to the professionals.
Not much, at least for a while.
I dropped the app on Netlify/Heroku and used it for six weeks, to
- confirm that it engaged recurring focus on ideas that interested me, perhaps even actuating new thoughts or interpretations of those ideas (success!); and
- surface frictions, deficiencies, bugs, etc that arose during daily usage (...alas, also success!)
My initial extrinsic motivation for creating/using this tool, however, was to first populate, then winnow down, topics on which I might conduct PhD research. And that's not on the horizon for severrrrrral years.
(Moreover, it's something I'd like to eventually share with non/quasi-technical peers for review, and the best way to do that is likely as a native app with eventual cloud-backup. And that means either learning QT or diving back into Electron... both of which are probably even further down the horizon.) 😹