Skip to content

nisargpatel7042lva/SkillSwap-DAO

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

100 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ SkillSwap DAO - Web3 Skill Marketplace

A decentralized skill marketplace built on Ethereum, enabling users to buy and sell services using cryptocurrency with built-in escrow, dispute resolution, and satisfaction guarantees.

✨ Features

🎯 Core Features

  • Skill Marketplace: Browse and list skills with detailed profiles
  • Web3 Payments: Support for ETH and multiple ERC20 tokens (USDC, DAI, LINK, USDT)
  • Escrow System: Secure payment escrow with automatic release
  • Dispute Resolution: Built-in dispute system with arbitration
  • Satisfaction Guarantee: Money-back guarantee for unsatisfied customers
  • Rating System: Comprehensive rating and review system
  • Provider Verification: Reputation-based provider verification

πŸ”§ Technical Features

  • Smart Contracts: Solidity contracts with comprehensive security features
  • Frontend: React + TypeScript + Vite with modern UI
  • Database: Supabase with real-time capabilities
  • Authentication: Web3 wallet integration (MetaMask, WalletConnect)
  • Storage: Decentralized file storage for images
  • Responsive Design: Mobile-first responsive design

πŸ› οΈ Tech Stack

  • Frontend: React 18, TypeScript, Vite, Tailwind CSS, shadcn/ui
  • Blockchain: Ethereum (Sepolia testnet), Hardhat, Viem, Wagmi
  • Database: Supabase (PostgreSQL)
  • Storage: Supabase Storage
  • Authentication: RainbowKit, Web3 wallets
  • Deployment: Vercel/Netlify ready

πŸš€ Quick Start

Prerequisites

  • Node.js 18+
  • npm/yarn/bun
  • MetaMask or other Web3 wallet
  • Supabase account
  • Ethereum testnet (Sepolia) for testing

1. Clone and Install

git clone https://github.com/your-username/skillswap-dao.git
cd skillswap-dao
npm install

2. Environment Setup

Create a .env file in the root directory:

# Blockchain Configuration
SEPOLIA_RPC_URL=https://sepolia.infura.io/v3/YOUR_INFURA_PROJECT_ID
PRIVATE_KEY=your_private_key_here

# Supabase Configuration
VITE_SUPABASE_URL=https://your-project.supabase.co
VITE_SUPABASE_ANON_KEY=your_supabase_anon_key

# Contract Addresses (will be updated after deployment)
VITE_SKILL_EXCHANGE_ADDRESS=0x0000000000000000000000000000000000000000

# App Configuration
VITE_APP_NAME=SkillSwap DAO
VITE_APP_URL=http://localhost:5173

3. Deploy Smart Contracts

# Deploy to Sepolia testnet
npx hardhat run scripts/deploy.cjs --network sepolia

# Or deploy locally for testing
npx hardhat run scripts/deploy.cjs --network localhost

4. Setup Database

# Setup Supabase database and storage
node scripts/setup-database.js

# Optional: Create sample data
CREATE_SAMPLE_DATA=true node scripts/setup-database.js

5. Start Development Server

npm run dev

Visit http://localhost:5173 to see the application.

πŸ“‹ Complete Setup Guide

Smart Contract Deployment

  1. Get Testnet ETH: Use a faucet to get Sepolia ETH
  2. Configure RPC: Set up your Infura/Alchemy RPC URL
  3. Deploy Contracts: Run the deployment script
  4. Verify Contracts: Contracts are automatically verified on Etherscan

Supabase Setup

  1. Create Project: Create a new Supabase project
  2. Get Credentials: Copy your project URL and anon key
  3. Run Setup Script: Execute the database setup script
  4. Configure Storage: Storage buckets are created automatically

Frontend Configuration

  1. Environment Variables: Set all required environment variables
  2. Contract Address: Update with deployed contract address
  3. Build & Deploy: Ready for production deployment

��️ Project Structure

skillswap-dao/
β”œβ”€β”€ contracts/                 # Smart contracts
β”‚   β”œβ”€β”€ SkillExchange.sol     # Main marketplace contract
β”‚   └── Lock.sol              # Example contract
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/           # React components
β”‚   β”‚   β”œβ”€β”€ ui/              # shadcn/ui components
β”‚   β”‚   β”œβ”€β”€ SkillCard.tsx    # Skill display component
β”‚   β”‚   β”œβ”€β”€ PaymentProcessor.tsx # Payment handling
β”‚   β”‚   └── ...
β”‚   β”œβ”€β”€ pages/               # Page components
β”‚   β”‚   β”œβ”€β”€ Marketplace.tsx  # Skill marketplace
β”‚   β”‚   β”œβ”€β”€ Dashboard.tsx    # User dashboard
β”‚   β”‚   └── ...
β”‚   β”œβ”€β”€ lib/                 # Utilities and configurations
β”‚   β”‚   β”œβ”€β”€ SkillExchange.ts # Contract configuration
β”‚   β”‚   └── paymentUtils.ts  # Payment utilities
β”‚   └── integrations/        # External integrations
β”‚       └── supabase/        # Supabase client
β”œβ”€β”€ supabase/                # Database schema and migrations
β”œβ”€β”€ scripts/                 # Deployment and setup scripts
└── public/                  # Static assets

πŸ” Security Features

  • Reentrancy Protection: All contract functions protected
  • Access Control: Role-based access control
  • Input Validation: Comprehensive input validation
  • Escrow System: Secure payment escrow
  • Dispute Resolution: Fair dispute handling
  • Rate Limiting: Protection against spam
  • Gas Optimization: Efficient contract design

πŸ’° Payment System

Supported Tokens

  • ETH: Native Ethereum
  • USDC: USD Coin (6 decimals)
  • DAI: Dai Stablecoin (18 decimals)
  • LINK: Chainlink (18 decimals)
  • USDT: Tether USD (6 decimals)

Payment Flow

  1. User selects a service and payment token
  2. Payment is held in escrow
  3. Provider completes the service
  4. User verifies completion
  5. Payment is automatically released after dispute window
  6. Optional: User can release payment early

🎨 UI/UX Features

  • Modern Design: Clean, professional interface
  • Responsive: Mobile-first responsive design
  • Dark Mode: Built-in dark mode support
  • Animations: Smooth transitions and micro-interactions
  • Accessibility: WCAG compliant design
  • Loading States: Comprehensive loading indicators
  • Error Handling: User-friendly error messages

πŸš€ Deployment

Frontend Deployment

Vercel

npm run build
vercel --prod

Netlify

npm run build
netlify deploy --prod --dir=dist

Smart Contract Deployment

# Deploy to mainnet (after thorough testing)
npx hardhat run scripts/deploy.cjs --network mainnet

πŸ§ͺ Testing

# Run smart contract tests
npm run test

# Run frontend tests
npm run test:frontend

# Run all tests with coverage
npm run test:coverage

πŸ“Š Monitoring

  • Contract Events: All important events are logged
  • Transaction Tracking: Complete transaction history
  • Error Monitoring: Comprehensive error tracking
  • Performance Metrics: Application performance monitoring

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests for new features
  5. Submit a pull request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ†˜ Support

  • Documentation: Check the docs folder
  • Issues: Report bugs on GitHub Issues
  • Discussions: Join our community discussions
  • Email: support@skillswap-dao.com

🎯 Roadmap

Phase 1 (Current)

  • βœ… Core marketplace functionality
  • βœ… Payment system
  • βœ… Dispute resolution
  • βœ… Basic UI/UX

Phase 2 (Next)

  • πŸ”„ Advanced search and filtering
  • πŸ”„ Chat/messaging system
  • πŸ”„ Mobile app
  • πŸ”„ Advanced analytics

Phase 3 (Future)

  • πŸ“‹ AI-powered matching
  • πŸ“‹ Multi-chain support
  • πŸ“‹ DAO governance
  • πŸ“‹ Advanced reputation system

Built with ❀️ by the SkillSwap DAO team

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors