Checklists app (Alpha 2 network)

I present: safe://checklists.
The idea is that on the first screen you can create checklists and view lists that you have made previously. Clicking on one of the lists takes you to that list, where you can create entries and check them off as they are completed.
The way it works behind the scenes is that every time a change is made, the state of the app is serialized and saved in a mutable data entry. This is the same way that @draw’s safe://todo app works, so thanks to him for doing the heavy lifting there.
Speaking of safe://todo, the most interesting feature of my app is interoperability with that site. When safe://checklists loads, in addition to looking for its own data, it also looks to see if the user has a data entry from safe://todo. If so, it creates a list on the home screen which ties directly to the same list that you see on safe://todo. When you modify that list, it is saved to the data location used by safe://todo. So you can make changes on one site, then see that change reflected on the other site when you refresh. This is a simple example of users maintaining control of their own data on the SAFE network, as opposed to having their data locked away in a data silo provided by the application vendor. By using common data formats, the user’s information can be presented and manipulated by different apps, giving much greater freedom and flexibility to the user (no lock-in to a specific provider etc).

troubleshooting: if you have any trouble with the app, right click on the page and go to ‘Inspect Element’, then click on the ‘console’ tab and send the log that you see there to me via DM.

25 Likes

I like your explanation of what happens on the backend!

As more and more apps are created (including Maidsafe) maybe an ‘infographics template’ of sorts could be made available for devs to illustrate basic connectivity and how they utilize the SAFE building blocks.

Like a Maidsafe created/ outsourced/sanctioned/ library of icons and typography that Devs could use as a tool to attract devs and investors to a project.

We know what a battle it’s been to explain the network in general and the ongoing work by some community members to help in that area…could a consistent visual messaging be part of that…maybe the new digital marketing guys area of expertise.

Would really like to know what software Dion uses…he’s best I’ve seen in the infotech game Dion Hinchcliffe


7 Likes

When clicking “Allow” in the Authenticator for safe://checklists/ I get the following error:

initSAFE error: -2000: Unexpected (probably a logic error): ‘SAFE_containerName’ not found in the access container

3 Likes

Haven’t looked yet @drehb but I love the explanation and the ideas you are showing here. Very similar to what the remotestorage.io guys have - they have a scheme for publicising the different object/file formats that different RS apps create to provide similar (user controlled) inter-operability. I’ve been focussed on my fork of their backend so haven’t looked into their data philosophy, but it may be of interest to you (see also SOLID, from Sir Tim if you haven’t already - there’s a topic for it). I look forward to playing with checklists :slight_smile:

UPDATE: Now looking … Possible Bug:
I just tried todo, created a short list, checked one item and then ran checklists (for the first time) but got this in a modal dialogue:

initSAFE error: -2000: Unexpected (probably a logic error): ‘SAFE_containerName’ not found in the access container

There were no errors in the browser console, just your ready/initialzed/authorized messages.

5 Likes

Hmm, I had tried to make a variable for the container name as I plan on changing where the data is stored in the future. I have updated it to just be ‘_public’, so it should work now if you could give it another try.
Strangely for me it worked with the code below…maybe because originally I had ‘_public’ in my code, then later changed it to be as below (which wasn’t working for you guys), but since I had already authorized, SAFE saw no new permissions requested so didn’t get far enough to look for the container or something?

broken code:
const SAFE_containerName = ‘_public’

const app_info = {
name: ‘Checklists’,
id: ‘Checklists.SAFE.Alpha2’,
version: ‘0.1.0’,
vendor: ‘drehb’
}
// line below not working unless previously authorized
const access = {
SAFE_containerName: [‘Read’, ‘Insert’, ‘Update’]
}
const options = { own_container: false }

2 Likes

Better, but still hitting bugs for me:

First run loaded safe://todo
I created a list ‘Overview’, which seemed to work
I could enter safe://todo list and see my entries :clap:
I went back, entered ‘Overview’, but couldn’t see away to create entries anywhere
Closed the tab (accident)

Re-opened the tab
I don’t have any lists now :frowning_face:
I can’t enter a name to create a new list either

Console shows unexpected identifier in myscript.js
myscript.js contains:

Core error: Error while serialising/deserialising: Deserialise error: IoError: failed to fill whole buffer

Hope this helps. Nice app idea - showing data sharing is a big step forward so good luck getting the bugs ironed out :slight_smile:

2 Likes

Works really well :slightly_smiling_face:

I think a lot of people are going to have difficulty getting their head around this concept. We’ve been used to thinking in one way for so long and it requires quite a change of mindset. Thanks for creating this genuinely useful demo. What would it take to make entries editable?

5 Likes

wow wow:+1::+1
Thank you for your hard work

2 Likes

It would be doable. @draw has that in his app when you double click, so I could do something similar. It would also be nice to be able to reorder the lists items somehow. This app is my intro to javascript, so it is a bit of a slow slog for me.

2 Likes

Very nice! :slight_smile:

Got this error after adding second entry, unchecking first entry and checking second (in first out of two lists created):

2 Likes

@drehb re the invalid successor error, make sure you are using the file version, and add one to it. Not the entry version of the container version. To get the file version you need to get the metadata for the file once you have the file handle. Hope that helps :slight_smile:

1 Like

Thanks guys. I didn’t make it smart yet in the way it saves data. It just tries to save every time you change something without considering if previous change has been accepted by the network, etc. So probably if you change stuff quickly it’ll get tripped up.

4 Likes