rallydotfm / rally

Rally is an open-source alternative to Twitter Space and Clubhouse for web3 communities and enthusiasts. Built with Lens Protocol, Guild SDK and Livekit.
https://alpha.letsrally.fm
Other
46 stars 2 forks source link

Encode Next Video Hackathon submission #15

Open timotejGerzelj opened 1 year ago

timotejGerzelj commented 1 year ago

Introduction

We are Rally, a team of two developers based in Slovenia. We set out to address the shortcomings of current social audio apps, such as Clubhouse, Twitter Space, Zoom, and Discord.

Currently, there is no easy-to-use app that allows users to easily find, create, and monetize audio room/content without either:

To solve those issues, we decided to create Rally, an open-source social audio app designed for web3 communities. Our goal is to connect web2 and web3 technologies to create a social audio app that respects data ownership and privacy while offering the most seamless and user-friendly experience possible.

Methodology

We conducted in-depth user research on the current state of social audio apps to gather data on what should be kept, what should be improved, and what should be tossed.

From there, after getting feedback from social audio apps users that are web3 native, we planned what would be the essential features of a web3 alternative to Clubhouse and Twitter Space.

Our objectives:

To create a social audio app that would fit the needs we highlighted from our research, we decided to build Rally with the following features:

Features added and achievements:

Results

We are currently in alpha testing and have received positive feedback from over 524 followers on Twitter. We have already held a couple of audio rooms on our platform with many Lens communities such as memester, Lens China!

Challenges and future work

Our current challenges we are working on are the following:

We are still in the alpha phase, but we have several ideas for additional features to improve our platform. In the coming months, we hope to secure grants to help us achieve these goals:

Conclusion

Thank you for your attention. If you're interested in trying out Rally, please visit https://alpha.letsrally.fm/ We hope to see you on our platform soon!

naomiHauret commented 1 year ago

1. Connect wallet

Technology used in this flow

  • SIWE
  • Lens Protocol
  • ENS
  • The Graph

The first thing to do on Rally is to connect your wallet - not just for the sake of it, but because your wallet and on-chain identity will be used to recommend content that match your interests and grant you access to specific content (audio rooms/recordings).

We implemented Sign in with Ethereum + Sign in with Lens ; SIWE is used in combination with Guild to grant access to audio rooms, and Sign in With Lens unlocks features related to the user's social graph (follow/unfollow for instance).

Screenshot 2023-01-11 at 19-45-45 Rally - Open-source social audio app for web3 communities Screenshot 2023-01-11 at 19-45-52 Rally - Open-source social audio app for web3 communities Screenshot 2023-01-11 at 19-45-57 Rally - Open-source social audio app for web3 communities Screenshot 2023-01-11 at 19-46-08 Rally - Open-source social audio app for web3 communities Screenshot_20230111_195913 Screenshot 2023-01-11 at 19-53-36 Rally - Open-source social audio app for web3 communities Screenshot 2023-01-11 at 19-54-12 Rally - Open-source social audio app for web3 communities Screenshot 2023-01-11 at 19-43-58 Rally - Open-source social audio app for web3 communities Screenshot 2023-01-11 at 19-44-06 Rally - Open-source social audio app for web3 communities Screenshot 2023-01-11 at 19-45-27 Rally - Open-source social audio app for web3 communities

naomiHauret commented 1 year ago

2. Search and retrieve content

Technology used in this flow

  • Polygon
  • The Graph
  • ENS
  • Lens Protocol
  • IPFS

Some of the biggest pain points in current social audio apps is the difficulty to easily find recordings/and or rooms matching your interests.

Our attempt to tackle down this issue in Rally relies on Polygon, The Graph and Lens Protocol :

  1. Users create their rallies using our smart contract (deployed on Mumbai/Polygon)
  2. If they want their rallies to be indexed (meaning appearing in the home page, search pages, in their public profile page and in the upcoming page), the newly created entity will be picked by our subgraph and indexed. Our subgraph also allows user to search for recordings. They can filter rallies by state (eg: live, finished, soon), category (uses Lens profile interests under the hood), date, creator, and apply more filters related to their preferences.
  3. On top of using a custom subgraph, we are also using Lens Protocol to help users search for publications and other Lens users. Rallies can be recorded and this recording can then be cross-published on Lens, which means that public recordings can be found on other Lens apps as well.

Screenshot 2023-01-11 at 19-42-03 Rally - Open-source social audio app for web3 communities Screenshot 2023-01-11 at 19-42-10 Rally - Open-source social audio app for web3 communities

Screenshot 2023-01-11 at 19-42-31 Rally - Open-source social audio app for web3 communities Screenshot 2023-01-11 at 19-42-39 Rally - Open-source social audio app for web3 communities Screenshot 2023-01-11 at 19-42-47 Rally - Open-source social audio app for web3 communities Screenshot 2023-01-11 at 19-43-11 Rally - Open-source social audio app for web3 communities Screenshot 2023-01-11 at 19-43-20 Rally - Open-source social audio app for web3 communities Screenshot 2023-01-11 at 19-43-37 Rally - Open-source social audio app for web3 communities Screenshot 2023-01-11 at 19-43-45 Rally - Open-source social audio app for web3 communities

naomiHauret commented 1 year ago

3. Creating a rally

Technology used in this flow

  • Polygon
  • Lens Protocol
  • The Graph
  • Guild
  • ENS
  • IPFS

All users can create a rally by using our smart contract (deployed on Mumbai).

We decided to rely on a blockchain based solution to manage the state of our audio rooms (called rallies) in order to have a single source of truth for all audio rooms. This ensure the state integrity of the audio room (if the creator has a sudden bad network, the room won't close - it needs manual input) and censorship-resistance (only the rally creator can close the room).

We decided to use Polygon as it offers low-fees and is going carbon-neutral, but also because of the great efforts Polygon is making to bridge the gap between web2 and web3.

Back to the rally creation - the user just needs to input the typical data for an event (name, date, category...). The difference between Rally and drop-in audio platforms is that our gated-room feature is powered by Guild, a platformless membership system that allows creators to gate access to their rallies with a very large requirement spectrum, like having certain words in your Twitter bio, interacting with a certain function of a smart contract, etc. This also eases onboarding for users and creators: no need to recreate/rejoin a group, everyone is already there.

Rally also makes it easy to invite co-hosts and speakers: you just need to add the Ethereum address of the co-host/speaker. To ease this process, we crafted every "Input an Ethereum address" fields so that users can search for other people by their Lens handle and their ENS name.

Additionaly, besides token gating, creators can also set-up who can access their rallies by deciding to index it or not. As mentioned before, indexed rallies appear in multiple pages (home page, search pages, upcoming pages, profile pages ...), which is why we offer the option of keeping a rally "unindexed" (it will still be accessible by anyone that has a link, and will be accessible by the creator from their dashboard).

Once the creator is ready, they just need to click on the "Create Rally" button, which will upload the rally metadata to IPFS and create the rally on chain.

Screenshot 2023-01-11 at 19-26-47 Rally - Open-source social audio app for web3 communities Screenshot 2023-01-11 at 19-27-09 Rally - Open-source social audio app for web3 communities Screenshot 2023-01-11 at 19-27-15 Rally - Open-source social audio app for web3 communities Screenshot 2023-01-11 at 19-27-29 Rally - Open-source social audio app for web3 communities Screenshot 2023-01-11 at 19-27-55 Rally - Open-source social audio app for web3 communities Screenshot_20230111_203232 Screenshot 2023-01-11 at 19-51-03 Rally - Open-source social audio app for web3 communities

naomiHauret commented 1 year ago

4. Dashboard & rally management

Technology used in this flow

  • Polygon
  • The Graph
  • Storj

Once a rally was created, it will be displayed in the creator's dashboard. From there, they can decide to :

Screenshot 2023-01-11 at 19-28-05 Rally - Open-source social audio app for web3 communities Screenshot 2023-01-11 at 19-28-36 Rally - Open-source social audio app for web3 communities Screenshot 2023-01-11 at 19-28-43 Rally - Open-source social audio app for web3 communities Screenshot 2023-01-11 at 19-28-52 Rally - Open-source social audio app for web3 communities Screenshot 2023-01-11 at 21-13-09 Rally - Open-source social audio app for web3 communities Screenshot 2023-01-11 at 21-13-24 Rally - Open-source social audio app for web3 communities Screenshot 2023-01-11 at 21-12-56 Rally - Open-source social audio app for web3 communities

naomiHauret commented 1 year ago

5. Join a rally and interact

Technology used in this flow Polygon Livekit Guild ENS Lens

Once a rally is created, its creator needs to "open" it. This is done by signing an on chain transaction which will change the rally status and make it possible for other people to join it. Depending on the gating conditions and the maximum of people allowed in the room, other users will be able to join the room. Before that, they can configure their room identity by picking their Lens profile, their ENS, or to customize their display name and avatar. Other users in the room will still be allowed to view each others on-chain identity by clicking on each participants avatar (just like Clubhouse or Twitter Space).

Once a user joins a rally, they get one of those 3 roles:

The rally creator and other co-hosts can grant speaking privileges to audience members, and all audience members can require to join the stage by raising their hand: then, it's up to the creator and their co-hosts to grant them speaking privileges or not. When joining the stage, users need to activate their microphone - the UI indicates whether they are muted or not, and also indicates when someone is speaking.

In addition of granting speaking privileges, the creator and their co-hosts can revoke this privilege, as well as also kick out permanently a participant from this rally. Beside raising their hands, all participants can also react using an emoji.

To approach the Clubhouse/Twitter Space user experience, we crafted the audio room to be "portable" : users are free to continue navigating Rally and change page while chatting. They can easily go back to the room page from the toolbar. We also added a "help" modal that details all the icons on the toolbar and their effects.

Screenshot 2023-01-11 at 19-51-21 Rally - Open-source social audio app for web3 communities Screenshot 2023-01-11 at 19-51-37 Rally - Open-source social audio app for web3 communities Screenshot 2023-01-11 at 19-51-54 Rally - Open-source social audio app for web3 communities Screenshot 2023-01-11 at 19-52-02 Rally - Open-source social audio app for web3 communities Screenshot 2023-01-11 at 19-52-07 Rally - Open-source social audio app for web3 communities Screenshot 2023-01-11 at 19-52-13 Rally - Open-source social audio app for web3 communities Screenshot 2023-01-11 at 19-52-21 Rally - Open-source social audio app for web3 commu
![Screenshot 2023-01-11 at 19-52-31 Rally - Open-source social audio app for web3 communities](https://user-images.githubusercontent.com/15010369/211903413-288a41a6-2fb8-4d94-9c8e-13f507fad7d5.png)
nities Screenshot 2023-01-11 at 19-52-25 Rally - Open-source social audio app for web3 communities Screenshot 2023-01-11 at 19-52-31 Rally - Open-source social audio app for web3 communities Screenshot 2023-01-11 at 19-52-35 Rally - Open-source social audio app for web3 communities Screenshot 2023-01-11 at 19-52-56 Rally - Open-source social audio app for web3 communities Screenshot 2023-01-11 at 19-53-36 Rally - Open-source social audio app for web3 communities Screenshot 2023-01-11 at 19-54-12 Rally - Open-source social audio app for web3 communities Screenshot 2023-01-11 at 19-54-16 Rally - Open-source social audio app for web3 communities Screenshot 2023-01-11 at 19-57-27 Rally - Open-source social audio app for web3 communities Screenshot 2023-01-11 at 19-57-42 Rally - Open-source social audio app for web3 communities Screenshot 2023-01-11 at 19-57-49 Rally - Open-source social audio app for web3 communities Screenshot_20230111_195658 Screenshot_20230111_195715 Screenshot_20230111_195806 Screenshot_20230111_195824

Screenshot_20230111_195858 Screenshot_20230111_195913

Screenshot_20230111_212013

naomiHauret commented 1 year ago

6. Recording a rally

Technology used in this flow

  • Livekit
  • Storj

If the user enabled the "Enable recording" option when they created their rally, they will be able to activate the "Recording" feature. Only the creator can record the room via Rally. The audio tracks of all users will be combined in a single .ogg file that the creator will be able to download afterwards.

To record a room, the creator just need to click on "Manage live", and click on "Start recording". Once they are done, they go back to the "Manage live" menu and click on "Stop recording".

Room recordings are done through Livekit, and all recordings are saved on a StorJ bucket. From the dashboards, users can easily display, listen and download to their recordings. We give users 3 days to download their recordings before deleting them.

Screenshot_20230111_210400 Screenshot 2023-01-11 at 21-02-22 Rally - Open-source social audio app for web3 communities Screenshot 2023-01-11 at 21-02-27 Rally - Open-source social audio app for web3 communities Screenshot 2023-01-11 at 21-02-37 Rally - Open-source social audio app for web3 communities Screenshot 2023-01-11 at 21-02-53 Rally - Open-source social audio app for web3 communities

naomiHauret commented 1 year ago

7. Closing a rally

Technology used in this flow

  • Livekit
  • Polygon

The creator can decide to close their rally whenever they want ; but before that, all users can freely decide to leave the rally by clicking the "Leave quietly" button in the toolbar.

Closing the rally will trigger a transaction in the creator's wallet. When successful, any ongoing recording is stopped, the room is destroyed, and the user is redirected to their dashboard.

Screenshot 2023-01-11 at 21-14-30 Rally - Open-source social audio app for web3 communities

naomiHauret commented 1 year ago

8. Publishing a recording

Technology used in this flow

  • Polygon
  • Bundlr
  • Lit (access control)
  • Lens Protocol

Creators can attach a recording to their rally so that other users can listen to it later. To do so, they just need to click on "Publish recording" or "Update recording" from their dashboard.

In the "Publish recording page", the creator will first need to activate Bundlr, the storage solution we use for recordings. Once this is done, the user just needs to add their file, and add other information about their recording.

If they wish too, they can :

  1. Gate the access recording
  2. Share their recording on their Lens profile

Users can gate their access with :

If the creator wants to, they can also cross-share their recordings to Lens : they just need to enable the option and complete the different Lens modules to configure who can view, access and and interact with their publication.

Both the recording file and its metadata file are uploaded to Bundlr ; if the user opted-in to gate access to their recording, the metadata file will be encrypted with Lit protocol before being uploaded. To create the recording, the user will need to sign a couple of messages in their wallet :

  1. Upload the audio file to Bundlr (not mentioned but we allow users to send funds to their Bundlr balance)
  2. If gated, encrypt the metadata file
  3. Upload the (encrypted) metadata file to Bundlr
  4. Attach the newly created recording (and Lens publication) to the rally

To reduce the amount of interactions needed with the wallet, we use Lens dispatcher to publish gasless transactions.

If the user enabled sharing on Lens, they'll be able to see their publications on other applications that support Lens, like Lenster.

Screenshot_
![Screenshot_20230111_212344](https://user-images.githubusercontent.com/15010369/211914149-ebad1ddf-2b0a-4658-80cc-b0dd15b54230.png)
![Screenshot_20230111_212706](https://user-images.githubusercontent.com/15010369/211914150-21ec5335-4558-44dc-9010-03aeba46d68f.png)
![Screenshot_20230111_212740](https://user-images.githubusercontent.com/15010369/211914151-c8082800-df72-46a1-a08a-1c8f23dc6ca4.png)
![Screenshot_20230111_212754](https://user-images.githubusercontent.com/15010369/211914154-42625d7f-9cd6-4669-b73e-b81ca04537f0.png)
20230111_212256 Screenshot_20230111_212316 Screenshot_20230111_212330 Screenshot_20230111_212344 Screenshot_20230111_212706 Screenshot_20230111_212740 Screenshot_20230111_212754 Screenshot 2023-01-11 at 21-23-50 Rally - Open-source social audio app for web3 communities Screenshot 2023-01-11 at 21-24-02 Rally - Open-source social audio app for web3 communities Screenshot 2023-01-11 at 21-24-15 Rally - Open-source social audio app for web3 communities Screenshot 2023-01-11 at 21-24-21 Rally - Open-source social audio app for web3 communities Screenshot 2023-01-11 at 21-24-25 Rally - Open-source social audio app for web3 communities Screenshot 2023-01-11 at 21-49-11 Rally - Open-source social audio app for web3 communities Screenshot 2023-01-11 at 21-50-18 Rally - Open-source social audio app for web3 communities Screenshot 2023-01-11 at 21-50-28 Post by @naomi • Lenster

naomiHauret commented 1 year ago

9. Lens publication / Interacting with a recording

Technoloy used in this flow

  • Lens Protocol

If a creator shared their recording on Lens, they will be able to unlock a comment/collect/mirror section on the rally page. Both the publication and the comment will also render as a timestamp that will make jumping to a specific moment of the recording very simple (like Youtube comments).

Only users which wallet meet the requirements specified by the creator of the recording will be able to interact with it.

Screenshot 2023-01-11 at 21-51-01 Rally - Open-source social audio app for web3 communities Screenshot 2023-01-11 at 21-51-13 Rally - Open-source social audio app for web3 communities Screenshot 2023-01-11 at 21-51-20 Rally - Open-source social audio app for web3 communities Screenshot 2023-01-11 at 21-51-36 Rally - Open-source social audio app for web3 communities Screenshot 2023-01-11 at 21-51-51 Rally - Open-source social audio app for web3 communities Screenshot 2023-01-11 at 21-51-59 Rally - Open-source social audio app for web3 communities

Screenshot 2023-01-11 at 21-52-1
![Screenshot 2023-01-11 at 21-53-43 Rally - Open-source social audio app for web3 communities](https://user-images.githubusercontent.com/15010369/211916496-6c41efaf-dbbe-4182-9099-858093a755a3.png)
2 Rally - Open-source social audio app for web3 communities ![ Screenshot 2023-01-11 at 21-53-09 Rally - Open-source social audio app for web3 communities Screenshot 2023-01-11 at 21-53-28 Rally - Open-source social audio app for web3 communities Screenshot 2023-01-11 at 21-53-03 Rally - Open-source social audio app for web3 communities Screenshot 2023-01-11 at 21-50-50 Rally - Open-source social audio app for web3 communities Screenshot 2023-01-11 at 21-59-53 Rally - Open-source social audio app for web3 communities Screenshot 2023-01-11 at 21-59-57 Rally - Open-source social audio app for web3 communities

naomiHauret commented 1 year ago

10. Interacting with a recording / Lit Protocol

Technoloy used in this flow

  • Lit Protocol

As mentioned before, creators can gate the access to their recordings so that only specific people can listen to it. When a recording is encrypted, a "Decrypt" button is displayed, and only a signature done from an eligible wallet with decrypt the recording metadata file.

Screenshot 2023-01-11 at 22-02-10 Rally - Open-source social audio app for web3 communities

Screenshot 2023-01-11 at 22-01-49 Rally - Open-source social audio app for web3 communities

naomiHauret commented 1 year ago
  1. Interacting with others /

Technoloy used in this flow

  • Lens Protocol
  • Livepeer video player

Rally uses Lens as its decentralized social graph to make interoperabiltity and onboarding easier: other content creators are already there, along with their content. Rally supports decrypting Lens publications, and display videos in Livepeer player.

Screenshot 2023-01-11 at 22-09-00 Rally - Open-source social audio app for web3 communities Screenshot 2023-01-11 at 22-09-08 Rally - Open-source social audio app for web3 communities Screenshot 2023-01-11 at 22-09-19 Rally - Open-source social audio app for web3 communities

naomiHauret commented 1 year ago

Summary Rally is an open-source alternative to Clubhouse and Twitter Space for Web3 communities. Our goal is to create an easy and fun to use application that respects privacy, data ownership and require the bare minimum from users to onboard them.

During this hackathon, we worked on the following features:

We also started to work on the following feature, but couldn't finish on time :

We had the following ideas but didn't have the time to start working on them :

naomiHauret commented 1 year ago

Our subgraph https://api.thegraph.com/subgraphs/name/timotejgerzelj/rallysubgraph Our verified smart contract, published on Mumbai: 0x584b082236a826e7b519aC88958331e8DB34eC8B

Subgraphs we are using : Uniswap V3 & Messari (Uniswap V3) to resolve ERC20 tokens https://api.thegraph.com/subgraphs/name/uniswap/uniswap-v3 https://api.thegraph.com/subgraphs/name/messari/uniswap-v3-polygon

Unlock to resolve locks https://api.thegraph.com/subgraphs/name/unlock-protocol/mainnet-v2 https://api.thegraph.com/subgraphs/name/unlock-protocol/polygon-v2

NFTPort API endpoints we are using :

ENS Resolver

Lens Protocol features we support :