Skip to content

Commit

Permalink
Updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
luloxi committed Oct 19, 2024
1 parent 7a5aa01 commit 1af9c5c
Showing 1 changed file with 44 additions and 31 deletions.
75 changes: 44 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,28 @@
A social dapp where interactions are monetized 💰, allowing users to earn through engaging with their community 🫂.
Social dapp where interactions are monetized 💰 allowing users to earn through engaging with their community 🫂.

# 🤘 Features

- 🤹‍♂️ **Post types**: Posts can have text, image, audio, video, links and polls
> NOTE: This is a work in progress and most features are not yet implemented.
- ⛓️ **Avalanche L1 with USDC as native gas**
- 💸 **When bridged to PunkSociety, USDC earns interest on AAVE**
- 💰 **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 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**
Expand All @@ -23,27 +32,28 @@ A social dapp where interactions are monetized 💰, allowing users to earn thro
-**User profile page**
-**Search**: By address or username
- ✅ Enable options for sharing on other platforms
- **Incentive model**: Social interactions send $ to the user that posted
- **Revenue Model**: PunkSociety collects fees from interactions
-**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 following users, liking, commenting and sharing posts on frontend
- **USDC payment method:** Bridge USDC from Avalanche to PunkSociety L1 and use it as native gas and payment method for social interactions (Reference: [Create an Avalanche L1](https://docs.avax.network/tooling/create-deploy-avalanche-l1s/create-avalanche-l1))
- **Multi-chain support**: Allow users to bridge their posts as NFTs to other chains (Reference: [Interchain Token Transfer](https://academy.avax.network/course/interchain-token-transfer/02-avalanche-starter-kit/01-avalanche-starter-kit) | [Chainlink CCIP Cross Chain Tokens](https://docs.chain.link/ccip/tutorials/cross-chain-tokens))
- **Individual post viewer**

## 👥 Phase 2 (Indexing and Bridging)
## 📈 Phase 2 (Business model)

- **Built-in bridge manager**: Built-in simple tool for bridging USDC and NFTs to Avalanche L0 and other EVM chains
- **Easy onramp tool**: Easy USDC buying and bridging 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))
- **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/))
- **Dashboard Insights**: Track and analyze revenue
- **Notification system**
- **Incentive model**: Social interactions send $ to the user on the other end
- **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))
- **Staking**: Bridged USDC goes to lending on AAVE so users can earn interest on their USDC while using the platform
- **Dashboard Insights**: Track and analyze your 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))
- **Business Model**: PunkSociety collects 1% fees from social interactions and from USDC lending revenue

## 💌 Phase 3 (Direct messages)
## 🌐 Phase 3 (Indexing)

- **Direct messages:** Allow users to send private messages to each other (Reference [Push Protocol](https://push.org/))
- **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
Expand All @@ -53,22 +63,21 @@ A social dapp where interactions are monetized 💰, allowing users to earn thro

## 👨‍🦽 Phase 5 (Ease of use)

- **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))
- **Web 2.5 social login:** Sign up and log in with Google, Twitter, Instagram, etc
- **Account abstraction**: Interact with the platform without flooding your NFT collections with social posts or having to sign for every interaction.
- **Multi-language support**: Switch between languages
- **Educational Content**: Include onboarding tutorials and step-by-step guides to help users understand NFTs and Web3 concepts
- **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))
- **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

⚙️ Built using Foundry, NextJS, RainbowKit, Wagmi, Viem, and Typescript,

🔗 To be deployed on EVM compatible chains

📥 To see current development tasks, [see here](https://lulox.notion.site/PunkSociety-3458ad216e8c40a9b4489fe026146552?pvs=74)

## 📚 Prerequisites

- [Node (>= v18.17)](https://nodejs.org/en/download/package-manager)
Expand All @@ -88,32 +97,36 @@ cd PunkSociety
yarn install
```

2. After everything is installed, run this command to start a local blockchain network:
2. Duplicate and rename `packages/foundry/.env.example` to `packages/foundry/.env`

```
yarn chain
```
> 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.

This command starts a local Ethereum network using Foundry. The network runs on your local machine and can be used for testing and development.
4. Start a local Avalanche L1:

3. Duplicate and rename `packages/foundry/.env.example` to `packages/foundry/.env` (you don't need to fill it out until deploying to a live network)
It'd be ideal to run it with one command like `yarn avalanche`, but so far, you gotta [follow this instructions](./AVALANCHE-L1.md).

4. Open a second terminal, navigate to `PunkSociety` and run this command to deploy the test contract:
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 test smart contract to the local network. The contract is 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.
This command deploys a PunkSociety contracts to your Avalanche L1.

5. Go to `packages/nextjs/scaffold.config.ts` and comment out `targetNetworks: [chains.sepolia]` and uncomment `targetNetworks: [chains.foundry]`
> 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.
6. Rename the `.env.example` to `.env` in the `packages/nextjs` folder. [Log in or Create an account on Pinata](https://app.pinata.cloud/signin), then create a new project, and copy the **API Key** and the **Secret API Key** into the `.env` file's `NEXT_PUBLIC_PINATA_API_KEY` and `NEXT_PUBLIC_PINATA_SECRET_API_KEY` variables and save the file.
> NOTE 2: To deploy to a different network, you can run `yarn deploy --network <network-name>`. For example, to deploy to the Ethereum network, you can run `yarn deploy --network ethereum`.
7. Open a third terminal, navigate to `PunkSociety` and run this command to start your NextJS app:
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`. You can interact with your smart contract using the `Debug Contracts` page.
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`

0 comments on commit 1af9c5c

Please sign in to comment.