Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/keep-starknet-strange/joyboy

Decentralized social built with Nostr and powered by Starknet account abstraction.
https://github.com/keep-starknet-strange/joyboy

account-abstraction cairo consumer-app mobile-app nostr nostr-protocol p2p-network react-native social-fi social-network starknet

Last synced: 2 months ago
JSON representation

Decentralized social built with Nostr and powered by Starknet account abstraction.

Awesome Lists containing this project

README

        


joyboy_logo

[![Starknet Test Workflow Status](https://github.com/keep-starknet-strange/joyboy/actions/workflows/starknet-contracts.yml/badge.svg)](https://github.com/keep-starknet-strange/joyboy/actions/workflows/starknet-contracts.yml)

[![Exploration_Team](https://img.shields.io/badge/Exploration_Team-29296E.svg?&style=for-the-badge&logo=data:image/svg%2bxml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIGlkPSJhIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxODEgMTgxIj48ZGVmcz48c3R5bGU+LmJ7ZmlsbDojZmZmO308L3N0eWxlPjwvZGVmcz48cGF0aCBjbGFzcz0iYiIgZD0iTTE3Ni43Niw4OC4xOGwtMzYtMzcuNDNjLTEuMzMtMS40OC0zLjQxLTIuMDQtNS4zMS0xLjQybC0xMC42MiwyLjk4LTEyLjk1LDMuNjNoLjc4YzUuMTQtNC41Nyw5LjktOS41NSwxNC4yNS0xNC44OSwxLjY4LTEuNjgsMS44MS0yLjcyLDAtNC4yN0w5Mi40NSwuNzZxLTEuOTQtMS4wNC00LjAxLC4xM2MtMTIuMDQsMTIuNDMtMjMuODMsMjQuNzQtMzYsMzcuNjktMS4yLDEuNDUtMS41LDMuNDQtLjc4LDUuMThsNC4yNywxNi41OGMwLDIuNzIsMS40Miw1LjU3LDIuMDcsOC4yOS00LjczLTUuNjEtOS43NC0xMC45Ny0xNS4wMi0xNi4wNi0xLjY4LTEuODEtMi41OS0xLjg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jMsLjkxLDEuNDIsMi4wN2wtMTMuMzQtMy42M1oiLz48L3N2Zz4=)](https://github.com/keep-starknet-strange)

[![Built with React Native](https://img.shields.io/badge/Built%20with-React%20Native-%2361DAFB?style=for-the-badge&logo=react)](https://reactnative.dev/)

[Website](https://www.joyboy.community/) | [Telegram](https://t.me/JoyboyStarknet) | [Twitter](https://x.com/JoyboyStarknet)

## Overview

Decentralized social built with Nostr and powered by Starknet account abstraction.

## Origin story

The name "Joyboy" is inspired by the character from the manga series "One Piece". Joyboy is a mysterious figure from the Void Century who left behind a treasure called the "One Piece". What if the treasure is the friends we made along the way? A decentralized social network should be a treasure trove of memories and connections.

Also, Joyboy refers to a figure in the Caribbean mythology, a dancing god with a constant smile.

> Joyboy is considered as the personification of freedom and joy.

Yes! This is what social networks should be about. A place where you can be yourself, express your thoughts and feelings, and connect with others.

Freedom requires censorship resistance, and Nostr provides exactly that.

## Contribute

Register to [Only Dust](https://onlydust.com/) to get rewarded for your contributions.

Tech stack:

- Starknet smart contracts in Cairo - [Learn Cairo now](https://book.cairo-lang.org/)
- React Native for the mobile app - [Learn React Native now](https://reactnative.dev/docs/tutorial)
- Typescript for the Nostr relayer - [Learn Typescript now](https://www.typescriptlang.org/docs/handbook/2/basic-types.html)

## Roadmap

- [x] Cairo implementation of Nostr signature verification
- [x] Starknet account contract implementation, controlled by Nostr keypair
- [ ] Joyboy landing page
- [x] SocialPay feature to send and receive tips through Nostr signed messages
- [x] Implement a full Nostr client application with Starknet integration
- [x] Run Nostr relay server
- [ ] Crossover with [Vault](https://github.com/keep-starknet-strange/vault) to bring Social features to the Vault application

## Architecture

### Tips
There are two alternatives: WalletConnect, one which expects Nostr users to set up oridinary Starknet wallet like Argent or Braavos, and so called SocialPay which uses custom Account Abstraction contract based on bip340 signature scheme (Nostr native).

#### Wallet Connect
##### Tip to a recipient that never accepted the tip and don't have an account on SN
```mermaid
sequenceDiagram
actor Alice
actor Bob
participant backend as Backend
participant transfer as Deposit Contract
participant erc20 as ERC20

Note over Alice,erc20: Alice tip is escrowed by the Deposit Contract
activate Alice
Alice->>erc20: approve(Deposit Contract, x)
Alice->>transfer: transfer(Bob Nostr Address, x)
transfer->>erc20: transferFrom(Alice, Deposit Contract, x)
transfer->>Alice: deposit_id
deactivate Alice

Note over Alice,erc20: Bob claims the tip with his Nostr identity
activate Bob
Bob->>backend: claim(deposit_id)
Note right of Bob: deposit_id is signed
with Nostr key
backend->>transfer: claim(deposit_id)
transfer->>erc20: transferFrom(Transfer Contract, Bob, x)
deactivate Bob
```

##### Tip to a recipient that earlier accepted the tip
```mermaid
sequenceDiagram
actor Alice
participant transfer as Deposit Contract
participant erc20 as ERC20

activate Alice
Alice->>erc20: approve(Deposit Contract, x)
Alice->>transfer: transfer(Bob Nostr Address, x)
Note left of transfer: Deposit Contract knows
Bob's SN address
transfer->>erc20: transferFrom(Alice, Bob, x)
deactivate Alice
```

#### SocialPay

##### Alice sends tokens to Bob

```mermaid
sequenceDiagram
actor Alice
actor Bob
participant SocialPay gateway
participant Starknet Node
participant Alice Account
participant STRK Token

Alice->>SocialPay gateway: @joyboy send 10 STRK to @bob
activate SocialPay gateway
SocialPay gateway->>Starknet Node: SocialPay transaction
Starknet Node->>Alice Account: SocialPay handler
Alice Account->>STRK Token: transfer
Starknet Node->>SocialPay gateway: SocialPay transaction complete
SocialPay gateway->>Bob: @bob you just received 10 STRK from @alice
SocialPay gateway->>Alice: @alice transfer of 10 STRK to @bob is complete
deactivate SocialPay gateway
```

## Modules

Onchain

The onchain components of the project are implemented as a suite of Starknet smart contracts.

### Build

To build the project, run:

```bash
scarb build
```

### Test

To test the project, run:

```bash
snforge test
```

## Mobile

The Joyboy Mobile app is built with React-native & Expo.
[Current version](https://app.joyboy.community)

[Mobile repo](https://github.com/keep-starknet-strange/joyboy/blob/main/JoyboyCommunity/README.md)

Pick an issue with the labels "mobile" to start work on React-native and contribute!

### Test

To test the mobile app, run:

```bash
cd JoyboyCommunity
yarn install
yarn start
```
Select Expo web, Android or IOS. You can scan it with Expo GO on your phone.

## Resources

- [Starknet](https://starknet.io/)
- [Nostr](https://www.nostr.com/)
- [Nostr Implementation Possibilities](https://github.com/nostr-protocol/nips)
- [JoinStr: Decentralized CoinJoin Implementation Using Nostr](https://www.nobsbitcoin.com/joinstr-decentralized-coinjoin-implementation-using-nostr/)
- [Smart Vaults - Bitcoin multi-custody signature orchestration - website](https://www.smartvaults.io/)
- [Smart Vaults - Bitcoin multi-custody signature orchestration - repo](https://github.com/smartvaults/smartvaults)

## Contributors ✨

Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):



Abdel @ StarkWare
Abdel @ StarkWare

💻
Maciej Kamiński @ StarkWare
Maciej Kamiński @ StarkWare

💻
MSG
MSG

💻
Catherine Jonathan
Catherine Jonathan

💻
Ayush Tomar
Ayush Tomar

💻
Mubarak Muhammad Aminu
Mubarak Muhammad Aminu

💻
UÄŸur Eren
UÄŸur Eren

💻


Oshioke Salaki
Oshioke Salaki

💻
Bhavya Gosai
Bhavya Gosai

💻
BlackStarkGoku
BlackStarkGoku

💻
IsraelRex
IsraelRex

🎨
Emmaunuel Ejembi
Emmaunuel Ejembi

💻
Abdulhakeem Abdulazeez Ayodeji
Abdulhakeem Abdulazeez Ayodeji

💻
Joseph Chimebuka
Joseph Chimebuka

💻


omahs
omahs

💻
Caleb
Caleb

💻
Ben Ickah
Ben Ickah

💻
Emmanuel Soetan
Emmanuel Soetan

💻
princeibs
princeibs

💻
goofylfg
goofylfg

💻
lfg2
lfg2

💻


Collins Ikechukwu (devcollins)
Collins Ikechukwu (devcollins)

💻
petersssong
petersssong

💻

This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!