Kommit + Fission integration

Integrated my flashcards app with webnative. This one was more complex than Launchlet because of:

  • the data model (a “Deck” has many “Cards” which have many “Spacings”)
  • the complex folder structure (/deck_id/cards/date/card_id/…)
  • storing audio recordings

Sign in with your Fission account with something like (boris@fission.codes).

I realize I was not writing to /private/Apps/ and so I fixed that here, will update Launchlet for this soon.

Seems like everything basically works but there may be a bug when deleting folders: fs.rm resolves but doesn’t seem to delete the folder. This only creates an issue when deleting the entire deck and I have to figure out how to deal with that.

Here’s a short video demo:

Source code:

You’re on a tear, great to see.

Yeah I noticed the launchlet directory. That’s a bug in webnative — you shouldn’t have benn able to create it there. I think we’re looking at that today.

Awesome app! I started making myself a deck to learn Russian, which I’ve wanted to learn for a long time. Love the audio feature, really helpful to hear the pronunciation.

I made a handful of cards in Chrome and played through them. Switched over to Firefox, signed in with Fission, and my deck with all its cards loaded up as expected. Noticed that the voice in Chrome was female and the voice in Firefox was male (and sounded way more robotic :robot:). Is the read back feature using a web API?

One small quirk that I noticed – When I delete a card, quickly go back to the game options page, then return to the cards, the deleted card reappears. If I repeat those steps immediately afterwards. the card does not reappear.

Hey @rosano – before you go much further :slight_smile: – I’m assuming you’re just “guessing” with any email-like string that ends in @fission.codes and then popping over to Fission Auth?

Technically usernames are @fission.name although that isn’t exposed anywhere. The “right” way to do this is to use webfinger on the domain fragment, and ask the corresponding server how to auth an ID.

That’s roughly how federation will work, although there may be some UX niceties with that.

Thinking this through some more, we might also be able to lean on IndieWeb stuff here. If I type in boris@bmannconsulting.com and “delegate” to Fission as boris.fission.name, that could work too.

I looked it up, and as I suspected, remoteStorage does use Webfinger. Hmm. So, yeah, I think I can make a .well-known on my own bmannconsulting.com domain and just plug whatever I want in for the following values:

{
  "links": [
    {
      "rel": "http://tools.ietf.org/id/draft-dejong-remotestorage",
      "href": "https://storage.5apps.com/tony",
      "properties": {
        "http://remotestorage.io/spec/version": "draft-dejong-remotestorage-13",
        "http://remotestorage.io/spec/web-authoring": null,
        "http://tools.ietf.org/html/rfc6749#section-4.2": "https://5apps.com/rs/oauth/tony",
        "http://tools.ietf.org/html/rfc6750#section-2.3": null,
        "http://tools.ietf.org/html/rfc7233": "GET"
      }
    }
  ]
}

remotestorage I think specifies OAuth for their IETF spec, but from your POV – you just basically want a known way to say “ask Fission for auth for this user”. I’ll see about putting this on my server and we can experiment with what makes sense.

In any case – very cool to see app #2 in place here!

Hi @boris

I created loads of folders under private.
I appreciate the original intent of restricting apps to be able to write to only specific folders.
I suppose the fix will prevent writing into these folders.
I would appreciate if read access would remain, at least for the time being, while I transition to the model that enforces the original way WNFS was envisioned.

This would be a possibly breaking change.
For the accounts I actively use.
One more reason to want to know what version of WNFS is active.
As I load wnfs dynamically,
I could arrange version switch in my code if need be.

What do you think?

TrailMarks top level private folders

@bgins I’m super happy the app helped you start the learning process :slight_smile: . Yes, the text-to-speech is via a web API and the voice depends on the browser and operating system; I have some control over the speed of the voice and other parameters but for the moment it’s whatever the device decides. On both iOS and Android there are some sophisticated options for languages where you can download higher quality versions of some languages and also select a default gender; sometimes you might have to look under accessibility/text-to-speech settings rather than language. I imagine it would be similar on the desktop.

The deleting card thing could be a long-time bug that occurs because I sometimes have to cache objects. I thought I fixed this a while ago so let me investigate…

1 Like

@boris Whoa I didn’t know you could ‘delegate’ another name, gotta try that myself. Yes, I’m doing hacky string matching at the moment but Webfinger would be ideal. Similar to remoteStorage, I would need a response from the Fission server to say ‘this is a Fission’ right? I’ll add fission.name for the time being.

It’s possible to write to private folders specified in permissions.fs.privatePaths right? In my case, I had requested access to permissions.app but was able to write to a folder outside of scope. I have the impression that the developer is free to choose between either place.

Gave it a quick look. I think if you go to the game options page before fs.publish has returned, it will not clear the card object from the cache. I think when the API is updated to call that method automatically the app will no longer need to wait at various moments.

You have to request access to the private tree. Otherwise writing should happen just below the app folder. It’s a bug we uncovered recently.

Yes, the well-known folder tells you about endpoints and such.

Just refreshing my Webfinger knowledge.

In pseudo code:

  • User enters user@example.com
  • query example.com/.well-known
  • if not found, invalid
  • if valid, follow delegation rules
  • if fission, then fission auth

I’ll experiment with delegation on my domain to my existing 5apps account for starters.

@gyuri-lajos your app just needs to ask for permission for the root private folder and the user can continue putting folders anywhere in the tree.

1 Like

Can confirm, delegation works, here’s how I’m logged in:

kommit-remotestorage

And here’s a direct link to my webfinger: https://bmannconsulting.com/.well-known/webfinger

1 Like

Holy cow that’s cool! I guess that maps the entire domain to your email? I wonder how it would work for having multiple emails on the same domain.

Technically any USER@bmannconsulting.com would delegate to just my boris account on 5apps, because it’s just a static file. This is the default place where Webfinger looks for info given an email shaped identifier.

You need to run a webfinger server in order to have one domain handle multiple users, but it scales all the way down to a user being able to host a single static file as I have done here.

There are other server apps like Mastodon that use Webfinger for discovery. They are also good candidates to bundle storage hosting for users.

1 Like

I just wrote some reflections on using Kommit collaboratively with friends:

2 Likes

This is absolutely lovely. Both for the story it tells and the way it is written. I just read it out loud at the breakfast table.

1 Like

An honour to be read at such an occasion, feeling proud of that :slight_smile: