The next step is for me to understand how I’m going to use and structure the Orbit database to create a functional user system, allowing people to create an account and make post under it while other users can add posts to playlists and comment on them. I’m still new to Orbit and have a hard time understanding the exact structure of the functions I’ll need to use.
When an user registers, they’re given the name of the new database as well as its password. That database must have 4 overall functionalities: Parts only the owner can read (eg: private messages), parts only the owner can modify (eg: creating posts, changing profile information), parts that anyone may read (eg: the contents of posts, profile information), and parts that anyone may modify (eg: comments on your posts). Parts that are readable and / or writable only to the owner must be protected by the password / key and securely encrypted to anyone who doesn’t have it… parts that are readable and / or writable to anyone must be public.
So first I will need functions that let the user create an account (sub-database) protected by a password or private key… after that I’ll need functions that can read and write various data and fields in this database, some only accessible to the owner while others to anyone else. For instance, if you’re looking at a post made by an user, the site script will need to tell Orbit “get data from orbitdb/the_site/the_user/the_post”. Ideally posts and profiles can be stored as json files, from which you read parameters like the date or content or attachments as variables in the object… if not I’m also fine with the database storing each value as an individual boolean / float / integer / string.
Can anyone please point me to any examples that can make getting started easier? If someone already attempted such a project, I’d like to see a simple showcase of it. Otherwise I’d like a list of all the OrbitDB function calls I’ll be using in my site scripts for each of those functionalities. Thank you.