Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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 ๐ฐ
- Host: GitHub
- URL: https://github.com/luloxi/punksociety
- Owner: luloxi
- License: mit
- Created: 2024-09-16T04:11:43.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-10-28T03:47:32.000Z (2 months ago)
- Last Synced: 2024-10-28T07:13:32.002Z (2 months ago)
- Topics: foundry, nextjs, react, scaffold-eth-2, social-media, solidity, typescript
- Language: Solidity
- Homepage: https://punksociety.xyz
- Size: 6.13 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
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`