@hack.near [Posted on DevHub](https://near.social/#/devgovgigs.near/widget/Post?id=1083) ## Idea: Groups on the BOS #### PROBLEM As you may know, there are potential challenges when decentralized groups (across teams / organizations) build open web applications involving multiple components, which are independently owned and controlled by separate accounts. #### SOLUTION For #BOSHACKS, our goal is to develop a support system that helps every NEAR community self-organize, collaborate on everything, and communicate within `groups` focused on specific topics or initiatives. #### BACKGROUND ##### SocialDB Permissions Using the blockchain operating system (#BOS), users can give other accounts permission to update their on-chain data, including JavaScript code they saved as a widget. This process has been documented in a [post](#/mob.near/widget/MainPage.Post.Page?accountId=root.near&blockHeight=85026336) by @root.near and implemented in a [widget](#/microchipgnu.near/widget/GrantPermissions) by @microchipgnu.near. ##### DAO Groups A decentralized autonomous organizations (#DAO) empowers its members to define procedures and policies by which they approve / reject proposals. Groups in a "[Sputnik DAO](https://github.com/near-daos/sputnik-dao-contract)" contract have role-based permissions, and the `FunctionCall` proposal type allows people to vote on whether to do any action that is possible using NEAR. #### REFERENCES 1. [Idea: Groups on near.org | RFC](https://near.social/devgovgigs.near/widget/gigs-board.pages.Post?id=1042) by @gauthamravi.near 2. [Specification with Open Discussion](https://github.com/near/near-discovery/discussions/342) by @charleslavon.near #### REQUIREMENTS * Group Creator and Editor * Name (with automatically generated ID) * Description: Purpose, Vision, and Mission * Admins / Moderators * Rules + Guidelines * Members --> Contributors * Profile Picture * Background Image * Location * Links * Group Roles and Permissions * Owner * Admins * Moderators * ***Members*** * *Non-members* * Community Projects / Apps with Settings * Managing Features and Group Defaults * Pages, Feeds, Events, Menus, etc. ##### Important Features: 1. Joining and Leaving 2. Discovering Groups 3. Building with Templates 4. Customizing Social Feeds 5. Moderating Content Channels 6. Curating Community Experiences 7. Updating Roles and Permissions 8. Visualizing Social Graphs #### CONTEXT A single namespace-permission-management contract does not cover groups doing actions outside the NEAR SocialDB. The `FunctionCall` proposal type does not enable individual members of a group to approve transactions without a voting process and universal policies. For those reasons, I'm sharing the idea to build a complementary on-chain type with a common data model for every group. This would help anyone connect and coordinate around shared goals, etc. ##### Schema There is a standard `AccountList` for lists of accounts; for example, followers of a NEAR Social profile. | Key | Type | Description | | --- | --- | --- | | **`[account_id]`** | Empty string | A dynamic key representing the account ID for every account in the list. For example, `alex.near` as a key means that account belongs to the list. | ##### Example ```json { "alex.near": "", "root.near": "", "mike.near": "" } ``` We can use that model in / across graphs of connections to represent mutual relationships between everyone and everything. This would provide a common approach to listing members of all kinds of groups. Please share feedback in the comments! #### RESOURCES ##### Things and Templates for Groups * [Basic Group Creator](https://near.social/hack.near/widget/create.group) (adaptation of [Team Builder](https://near.social/near/widget/ComponentDetailsPage?src=efiz.near/widget/team.builder)) * [Group Metadata Editor](https://near.social/hack.near/widget/group.editor) (adaptation of [Profile Editor](https://near.social/near/widget/ComponentDetailsPage?src=mob.near/widget/ProfileEditor)) ##### "Open Web of Trust" * [Demo with Visualization](https://near.social/hack.near/widget/trusted.community) (adaptation of [Mass Follow](https://near.social/near/widget/ComponentDetailsPage?src=zavodil.near/widget/MassFollowing)) * [Profile with "Trusts You" Badge](https://near.social/near/widget/ComponentDetailsPage?src=hack.near/widget/trusted.profile) (adaptation of [Profile Page](https://near.social/near/widget/ComponentDetailsPage?src=mob.near/widget/ProfilePage)) * [Stats: "Trusted By" and "Trusting"](https://near.social/near/widget/ComponentDetailsPage?src=hack.near/widget/trust.stats) (adaptation of [Follow Stats](https://near.social/near/widget/ComponentDetailsPage?src=mob.near/widget/FollowStats)) ##### Example of Reusable Graph * [Connect Button](https://near.social/near/widget/ComponentDetailsPage?src=hack.near/widget/connect.button) (adaptation of [Follow Button](https://near.social/near/widget/ComponentDetailsPage?src=near/widget/FollowButton)) * [List of Connections](https://near.social/hack.near/widget/connections?accountId=james.near) (adaptation of [Following List](https://near.social/near/widget/ComponentDetailsPage?src=near/widget/FollowingList)) ### Reply to get involved ⬇️ Questions and suggestions are much appreciated!