Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/luloxi/punksociety

Social protocol with monetized interactions ๐Ÿ’ฐ
https://github.com/luloxi/punksociety

foundry nextjs react scaffold-eth-2 social-media solidity typescript

Last synced: 2 months ago
JSON representation

Social protocol with monetized interactions ๐Ÿ’ฐ

Awesome Lists containing this project

README

        

Social protocol where interactions are monetized ๐Ÿ’ฐ allowing users to earn through engaging with their community ๐Ÿซ‚.

๐ŸŽ Current build focuses on implementing USDC, NFTs and interaction between users on an Avalanche L1 with USDC as native gas and onramp USDC with Coinbase OnchainKit

# ๐Ÿค˜ Features

> NOTE: This is a work in progress and most features are not yet implemented.

- ๐Ÿ’ธ **When bridged to PunkSociety, you can select different options to stake your USDC or bridged asset**
- โ›“๏ธ **Avalanche L1 with USDC as native gas** and other tokens bridged from other chains.
- ๐Ÿ’ฐ **Social monetization**: Likes, comments, shares and follows send USDC to the user on the other end
- ๐Ÿ“ˆ **Revenue dashboard**: Users can track and analyze their earnings
- ๐Ÿคนโ€โ™‚๏ธ **Post types**: Posts can have text, image, audio, video, links and polls
- ๐Ÿ”” **Notifications**: Receive alerts on activity
- ๐Ÿ’Œ **Messaging**: Direct messaging and group chat features
- ๐ŸŽจ **Profile customization**: Users can customize their profile and create post collections
- ๐Ÿ“ฑ **Web 2.5 login**: Social login options with Web2 platforms (Google, Twitter, etc.)
- ๐ŸŒ **Multi-chain support**: Bridge your posts as NFTs to Avalanche L0 and other chains to access NFT markets
- ๐ŸŽง **Accessibility support**: ARIA compliant for screen readers and other assistive technologies
- ๐Ÿ“š **Educational content**: Onboarding tutorials and step-by-step guides

# ๐Ÿค˜ Roadmap

๐Ÿ“ฅ To see pending project tasks, [see this Trello](https://trello.com/b/HLBnvKSu/punksociety)

## ๐Ÿฃ Phase 1 (MVP)

- โœ… **Create PunkPosts contract**
- โœ… **Create PunkProfile contract to register users info and socials**
- โœ… **PunkSociety contract:** Social interactions
- โœ… **Post creation tool**
- โœ… **User profile page**
- โœ… **Search**: By address or username
- โœ… Enable options for sharing on other platforms
- โœ… **Avalanche L1 with USDC as native gas:** Use an Avalanche L1 with USDC as native gas (Reference: [Create an Avalanche L1](https://docs.avax.network/tooling/create-deploy-avalanche-l1s/create-avalanche-l1))
- โœ… Enable liking with incentive
- โœ… Enable posting with a fee to owner

## ๐Ÿ“ˆ Phase 2 (Business model)

- **Incentive model**: Social interactions send $ to the user on the other end
- **USDC Staking/Lending model**: Bridged USDC can be lent or staked on AAVE and/or Compound (or similar) so users can earn interest on their USDC while using the platform
- **Business Model**: PunkSociety collects 1% fees from social interactions and from USDC lending revenue
- **Easy onramp tool**: Easy USDC buying tool for onboarding new users. (Reference:[FundButton from Coinbase](https://onchainkit.xyz/fund/fund-button) | [OnchainKit extension for Scaffold-ETH 2](https://github.com/scaffold-eth/create-eth-extensions/tree/onchainkit))
- **Built-in bridge manager**: Built-in simple tool for bridging USDC and NFTs to and from Avalanche, Base, Ethereum, and other EVM chains (Reference: [avalanche-interchain-token-transfer](https://github.com/ava-labs/avalanche-interchain-token-transfer) | [Chainlink CCIP Cross Chain Tokens](https://docs.chain.link/ccip/tutorials/cross-chain-tokens))
- Make PunkSociety the only one who can deploy contracts on the chain (Reference: [Avalanche Contract Deployer Allowlist](https://academy.avax.network/course/multi-chain-architecture/06-permissioning-users/06-contract-deployer-allowlist))
- **Dashboard Insights**: Track and analyze your revenue
- Enable following users, liking, commenting and sharing posts on frontend
- **Multi-language support**: Switch between languages (include emoji language)
- **Individual post viewer**
- **Accesibility support**: For the hearing and visually impaired, the app should be ARIA compliant to support screen readers and other assistive technologies (Reference: [ARIA](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA))
- **Add special metadata to NFTs** for screen readers and SEO

## ๐ŸŒ Phase 3 (Indexing)

- **Integrate The Graph to index activity** and save RPC calls (Reference: [Bootstrap a Full Stack Modern dapp using the Scaffold-ETH CLI and Subgraph Extension](https://siddhantk08.hashnode.dev/bootstrap-a-full-stack-modern-dapp-using-the-scaffold-eth-cli-and-subgraph-extension) | [The Graph tool for creating a subgraph](https://thegraph.com/docs/en/developing/creating-a-subgraph/))
- **Notification system**
- Search by post content

## ๐Ÿ’ฌ Phase 4 (Social enhancement)

- **Direct messages:** Allow users to send private messages to each other (Reference [Push Protocol](https://push.org/))
- Enable audio, video and links with preview type of posts
- **Polls**: Allow users to create polls
- **Customization**: Allow users to customize their profile appearance
- **Collections**: Create and share collections of posts
- **Groups**: Allow users to create and join groups with custom chat and newfeed
- **Categories**: Allow users to categorize their posts, filter by category and search by category

## ๐Ÿ‘จโ€๐Ÿฆฝ Phase 5 (Ease of use)

- **Web 2.5 social login with account abstraction:** Sign up and log in with Google, Twitter, Instagram, etc. (Reference: [wagmi-thirdweb Connect Button](https://github.com/thirdweb-example/wagmi-thirdweb?ref=blog.thirdweb.com))
- **Educational Content**: Include onboarding tutorials and step-by-step guides to help users understand what they can do on the platform

# ๐Ÿค˜ Development

๐Ÿ“ฅ To see pending development tasks, [see this Trello](https://trello.com/b/HLBnvKSu/punksociety)

## ๐Ÿ› ๏ธ Technical details

โš™๏ธ Currently built using [Scaffold-ETH 2](https://scaffoldeth.io/), [Foundry](https://book.getfoundry.sh/), [OnchainKit](https://onchainkit.xyz/), [Pinata](https://pinata.cloud/), [Vercel](https://vercel.com/), [NextJS](https://nextjs.org/), [RainbowKit](https://rainbowkit.com/), [Wagmi](https://wagmi.sh/), [Viem](https://viem.sh/), and [Typescript](https://www.typescriptlang.org/).

๐Ÿฆ Considering using protocols: [Circle USDC](https://www.circle.com/) as native gas, [The Graph](https://thegraph.com/) for indexing events, [Uniswap](https://app.uniswap.org/) and similar with an aggregator for token swaps, [AAVE](https://aave.com/), [Compound](https://compound.finance/) and similar options for generating interest on bridged [ERC20](https://ethereum.org/en/developers/docs/standards/tokens/erc-20/), [Chainlink](https://chain.link/) for price oracles, [Push Protocol](https://push.org/) for notifications and messages, [Thirdweb](https://thirdweb.com/) for social login with account abstraction.

๐Ÿ“œ Considering using contracts: [Ownable](https://docs.openzeppelin.com/contracts/2.x/access-control) and [Upgradeable](https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable) from [OpenZeppelin](https://www.openzeppelin.com/) or [Solady](https://github.com/Vectorized/solady) for contract ownership. [EIP712 Signatures](https://eips.ethereum.org/EIPS/eip-712).

๐Ÿ”— To be deployed on [Avalanche L1](https://github.com/ava-labs/avalanche-starter-kit) and Bridge [ERC20](https://ethereum.org/en/developers/docs/standards/tokens/erc-20/) and [ERC721](https://ethereum.org/en/developers/docs/standards/tokens/erc-721/) using [Avalanche Interchain Token Transfer](https://github.com/ava-labs/avalanche-interchain-token-transfer) and [Chainlink CCIP Transfer Tokens](https://docs.chain.link/ccip/tutorials/cross-chain-tokens) with [EVM compatible chains](https://ethereum.org/en/developers/docs/scaling/sidechains/#evm-compatibility).

## ๐Ÿ“š Prerequisites

- [Node (>= v18.17)](https://nodejs.org/en/download/package-manager)
- Yarn ([v1](https://classic.yarnpkg.com/en/docs/install/#windows-stable) or [v2+](https://yarnpkg.com/getting-started/install))
- [Git](https://git-scm.com/downloads)
- [Foundry](https://book.getfoundry.sh/getting-started/installation)

## ๐Ÿ‘จโ€๐Ÿซ Instructions

To get started follow the steps below:

1. Open a terminal and run this commands to clone this repo and install dependencies:

```
git clone https://github.com/luloxi/PunkSociety.git
cd PunkSociety
yarn install
```

2. Duplicate and rename `packages/foundry/.env.example` to `packages/foundry/.env`

> NOTE: `ETHERSCAN_API_KEY` and `ALCHEMY_API_KEY` are not required until you deploy to a live EVM like Avalanche, Base, Ethereum, etc.

3. Rename the `.env.example` to `.env` in the `packages/nextjs` folder. For each variable, follow the instructions above the variable.

4. Start a local Avalanche L1:

It'd be ideal to run it with one command like `yarn subnet` with a config file, but so far, you gotta **[follow this instructions](./AVALANCHE-L1.md)**.

You'll start a local Avalanche L1 using [Ava Labs avalanche-starter-kit](https://github.com/ava-labs/avalanche-starter-kit). The network runs on your local machine and can be used for testing and development.

5. Open a terminal, navigate to `PunkSociety` and run this command to deploy the contracts:

```
yarn deploy
```

This command deploys a PunkSociety contracts to your Avalanche L1.

> NOTE: Contracts are located in `packages/foundry/contracts` and can be modified to suit your needs. The `yarn deploy` command uses the deploy script located in `packages/foundry/script/Deploy.s.sol` to deploy the contract to the network. You can also customize the deploy script.

> NOTE 2: To deploy to a different network, you can run `yarn deploy --network `. For example, to deploy to the Ethereum network, you can run `yarn deploy --network ethereum`.

6. Open a second terminal, navigate to `PunkSociety` and run this command to start your NextJS app:

```
yarn start
```

Visit your app on: `http://localhost:3000`.

> NOTE: You can interact with your smart contract on `http://localhost:3000/debug` and see a local block explorer on `http://localhost:3000/blockexplorer`