It is totally unclear for me (a developer that wants to build an app with SAFE) how to do it? Is it going to be any “hello world SAFE App” tutorial in the nearest Future?
One should be coming at the end of this sprint. A week or two.
Wait weren’t the installers supposed to come out yesterday? Or are we onto a new sprint?
They extended this sprint an extra week. So next week? Or am I a week behind?
Edit: I guess I’m a week behind.
We finished the sprint but need to catch up (API changes were bigger than anticipated), nobody said yesterday AFAIK.
first things first i’m looking forward to the installers and will have my parents and other friends play around with them! =)
… but for them being a little bit impressed and getting as enthusiastic as i am i’m very willing to wait some days you can’t predict everything accurately … thats just how it is in life
there will be tutorials as soon as it makes sense to have them @Anton_Kulaga =) have a cup of tea+some cookies and watch awesome stuff happening in this forum too much pressure isn’t good for code quality
(ps: and MS isn’t that bad in terms of reaching goals in time i’ve seen a project falling back 3 years in their schedule within 2 years of work xD )
(pps: ok time for a bad joke: reverse engineering just became redefined!)
The tutorial could come in 2 flavors:
- One as an Electron app, because it could also present how to authenticate to the Launcher.
- The other one could be a basic website, that the user could upload via the demo “Manage Websites”, showing how a webpage can tap into safe to put / get a text file.
I think it might even be easier if it’s done without Electron as that adds complexity in itself (e.g. Golang w/ the HTTP client + https://godoc.org/golang.org/x/crypto/nacl). But here’s an example of me authenticating and getting a key to the launcher with my own app: https://github.com/cretz/safe-poc-browser/blob/master/app/backend/api.js#L70. Granted I don’t use the key in code, it shows how it’s done. This is the same thing that is done in the demo app. I would be very happy to explain anything from the API perspective or the Electron perspective about how the API works and how to auth and use it programmatically.
Websites cannot “tap into safe” yet, though I think instead of my POC I might just build the browser to show how this can be done.
The main reason I haven’t published any documentation or tutorials is because I fear that the APIs aren’t stable. Actually, I take that back, I hope the APIs aren’t stable because the launcher API leaves a lot to be desired (nacl whole-thing crypto instead of TLS (or nothing considering it’s localhost to localhost), not using proper HTTP headers for different pieces, some things in the path whilst some in the query string, etc).
Thank you for your reply, I will look at your example, which, though I do not understand yet, at least I could compile and launch
I thought only binaries were able to authenticate against the Launcher, but if this is unnecessary, this is will indeed be easier.
Anything that can speak to localhost:8100 on your system can auth as an app. But there may be some confusion when you use the word binaries…nothing has to be precompiled or anything, but that is a much nicer way to distribute software.
A quick rundown of the flow. My nodejs app connects over HTTP to the launcher node app which uses a node FFI lib to communicate via C ABI exposed in safe_ffi which is statically built with the other safe_* libs it talks to. And then all the way back (not even speaking of base 64 encoding and nacl encryption that is done between the two node pieces or the base 64’ing that happens between the launcher and the safe_ffi).
Yeah languages aside I think I’d need pictures to understand any of this.
I am hoping to have something like this working for others to play around with soon. I agree that it isn’t obvious to many folk what can be achieved already with the API. Some good examples will go a long way here.