Skip to content

E-commerce dApp to sell products without intermediaries πŸ›οΈ

License

Notifications You must be signed in to change notification settings

luloxi/BasedShop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

38 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

E-commerce dApp to sell products without intermediaries πŸ’°

πŸ›οΈ Features

  • πŸ’° Multiple payment methods: Pay with native gas (ETH) or with USDC.
  • πŸ“ˆ Revenue dashboard: Track and analyze your revenue and spending
  • πŸ€Ήβ€β™‚οΈ Articles media: Articles can have text, image, audio, video and links
  • πŸ”” Notifications: Receive alerts on activity
  • πŸ’Œ Messaging: Private messaging to communicate between seller and buyer
  • 🎨 Profile customization: Users can customize their profile
  • πŸ“± Web 2.5 login: Social login options with Web2 platforms (Google, Twitter, etc.)
  • 🎧 Accessibility support: ARIA compliant for screen readers and other assistive technologies

πŸ›οΈ Roadmap

🐣 Phase 1 (MVP)

  • βœ… Integrate OnchainKit for Basenames and FundButton (Reference: OnchainKit | OnchainKit extension for Scaffold-ETH 2)
  • βœ… BasedArticles contract: To register articles info
  • βœ… BasedProfile contract: To register users bio and email
  • βœ… BasedShop contract: To manage products and sales
  • βœ… Article creation tool
  • βœ… User profile page
  • βœ… Enable options for sharing on other platforms
  • βœ… Enable bookmarking articles
  • βœ… Search: By address, ENS or basename

πŸ’° Phase 2 (Shop features)

  • Individual article viewer
  • Escrow system: Hold funds until the buyer confirms the purchase
  • Dashboard Insights: Track and analyze revenue
  • Stablecoin payment methods: Pay with native gas or with $USDC. (Reference: Easy2Pay)
  • Categories: Categorize articles, filter by category and search by category

πŸ“ˆ Phase 3 (Indexing and notifications)

πŸ’¬ Phase 4 (Social enhancement)

  • Enable audio, video and links on articles
  • Enable following users and commenting on products (rating with stars)
  • Customization: Allow users to customize their profile appearance

πŸ’Œ Phase 5 (Communication)

  • Direct messages: Allow users to send private messages to each other

✍️ Phase 6 (Gasless activity)

  • Signatures: Interact with the platform without paying gas fees
  • Database: To store and retrieve EIP 712 signatures (Reference: SE-2 firebase-auth-extension)

πŸ‘¨β€πŸ¦½ Phase 7 (Ease of use)

  • Web 2.5 social login: Sign up and log in with Google, Twitter, Instagram, etc
  • Account abstraction: Interact with the platform without having to sign every interaction.
  • Accesibility support: For the hearing and visually impaired, the app should be ARIA compliant to support screen readers and other assistive technologies (Reference: ARIA)
  • Multi-language support: Switch between languages
  • Educational Content: Include step-by-step guides and tutorials

πŸ›οΈ Development

πŸ› οΈ Technical details

βš™οΈ Currently built using Scaffold-ETH 2, Foundry, OnchainKit, Pinata, Vercel, NextJS, RainbowKit, Wagmi, Viem, and Typescript.

🏦 Considering using protocols: Circle USDC as preferredd ERC20 payment method, The Graph for indexing events, Chainlink for price oracles, Push Protocol for notifications and messages.

πŸ“œ Considering using contracts: ERC20 and ERC721, Ownable and Upgradeable from OpenZeppelin or Solady for contract ownership. EIP712 Signatures for gasless stuff.

πŸ”— To be deployed on Base

πŸ“₯ To see current development tasks, see here

πŸ“š Prerequisites

πŸ‘¨β€πŸ« 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/BasedShop.git
cd BasedShop
yarn install
  1. After everything is installed, run this command to start a local blockchain network:
yarn chain

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

  1. 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)

  2. Open a second terminal, navigate to BasedShop and run this command to deploy the test contract:

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.

  1. Go to packages/nextjs/scaffold.config.ts and comment out targetNetworks: [chains.sepolia] and uncomment targetNetworks: [chains.foundry]

  2. Rename the .env.example to .env in the packages/nextjs folder.

  1. Open a third terminal, navigate to BasedShop 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.