Add an optional UID when accessing the Planet
For several different reasons, it would be handy to have a UID associated with projects on the Planet: (1) one could search by UID and (2) as we migrate to a git backend, we would want the "owner" of a project to be able to manage "pull requests". That said, for privacy reasons, I don't think we should actually store any user identifiable data.
Here is a possible approach:
We can insert three fields into each project description as we save on the server: (1) a UID determined by the user, (2) some group name, e.g., the name of a school (or anonymous by default), and (3) a secret phrase of some sort. These could be saved to local storage (so you need not type them in each time) and encoded using a public key for storage on the Planet.
If the server was somehow compromised, the IDs would remain anonymous.
The user would be able to search/sort based on their ID and group without the need to know how the encoding works. We could also make it possible to search/sort by group only, which might be useful for teachers. The same ID pair would be saved in local storage and used as the git ID. Probably secure enough.
If the user somehow forgets their ID, c'est la vie. The files will always be readable by anyone so that they can clone and start again.
Would using this to start working on a Node-based planet as per #1963 be a good idea? This would allow the new node-based server to associate a user id with everyone and make it easier to store git-based projects.
Pinging @eohomegrownapps :)
@Nepaltechguy2, this sounds great :) It would probably be good to first deliver an API specification for the new planet (if you're adapting the API), and then to achieve feature parity with the original as detailed in https://github.com/sugarlabs/planet-server/blob/master/README.md. On the client side, all API communication happens here (https://github.com/sugarlabs/musicblocks/blob/master/planet/js/ServerInterface.js), so it should be reasonably straightforward to adapt.
I started on both here: https://github.com/Nepaltechguy2/git-planet -- let me know your thoughts so far?