Skip to content

derek2403/fyp

Repository files navigation

FoodChain - Blockchain-Powered Food Review Platform

A modern, decentralized food review platform built with Next.js, ThirdWeb, and blockchain technology. Users can connect their wallets, share authentic reviews, earn NFT badges, and discover amazing restaurants.

πŸš€ Features

For Users

  • Wallet Connection: Secure authentication using ThirdWeb and WalletConnect
  • Food Preferences: Set cuisine preferences, dietary restrictions, and spice levels
  • Review System: Write and read authentic reviews with confidence scoring
  • NFT Rewards: Earn badges for consistent and reliable reviews
  • Smart Recommendations: AI-powered food suggestions based on preferences
  • Voting System: Upvote/downvote reviews to maintain quality

For Merchants

  • Restaurant Registration: Complete setup with shop details and menu management
  • Review Management: View and respond to customer feedback
  • Analytics Dashboard: Track performance metrics and customer insights
  • Crypto Payments: Accept blockchain-based payments
  • Menu Management: Add, edit, and organize menu items

System Features

  • World ID Integration: Bot-free platform with human verification
  • Confidence Scoring: AI-powered review reliability assessment
  • Dynamic Voting Algorithm: Fair and unbiased review scoring
  • Blockchain Storage: Immutable review data on the blockchain

πŸ› οΈ Tech Stack

  • Frontend: Next.js 15, React 19, Tailwind CSS 4
  • Blockchain: ThirdWeb SDK, Ethereum/Polygon/Mumbai networks
  • UI Components: Lucide React icons, Framer Motion animations
  • Forms: React Hook Form with validation
  • Notifications: React Hot Toast
  • State Management: Zustand
  • Styling: Tailwind CSS with custom components

πŸ“‹ Prerequisites

  • Node.js 18+
  • npm or yarn
  • MetaMask or any Web3 wallet
  • ThirdWeb account (for client ID)

πŸš€ Quick Start

1. Clone the Repository

git clone <your-repo-url>
cd fyp

2. Install Dependencies

npm install
# or
yarn install

3. Environment Setup

Create a .env.local file in the root directory:

NEXT_PUBLIC_THIRDWEB_CLIENT_ID=your_thirdweb_client_id
NEXT_PUBLIC_THIRDWEB_SECRET_KEY=your_thirdweb_secret_key

4. Get ThirdWeb Credentials

  1. Go to ThirdWeb Dashboard
  2. Create a new project
  3. Copy your Client ID and Secret Key
  4. Add them to your .env.local file

5. Run the Development Server

npm run dev
# or
yarn dev

Open http://localhost:3000 to view the application.

πŸ“ Project Structure

fyp/
β”œβ”€β”€ pages/
β”‚   β”œβ”€β”€ index.js              # Landing page
β”‚   β”œβ”€β”€ _app.js               # App wrapper with ThirdWeb provider
β”‚   β”œβ”€β”€ dashboard.js          # User/Merchant dashboard
β”‚   └── register/
β”‚       β”œβ”€β”€ user.js           # User registration
β”‚       └── merchant.js       # Merchant registration
β”œβ”€β”€ styles/
β”‚   └── globals.css           # Global styles and Tailwind config
β”œβ”€β”€ public/                   # Static assets
β”œβ”€β”€ package.json              # Dependencies and scripts
└── README.md                 # This file

πŸ”§ Configuration

ThirdWeb Setup

  1. Client ID: Required for wallet connection
  2. Supported Chains: Currently configured for Ethereum, Polygon, and Mumbai testnet
  3. Active Chain: Set to Mumbai testnet for development

Tailwind CSS

The project uses Tailwind CSS v4 with custom components:

  • .btn-primary: Primary button styling
  • .btn-secondary: Secondary button styling
  • .card: Card component styling
  • .input-field: Form input styling

🎯 Usage Guide

For Users

  1. Connect Wallet: Click "Connect Wallet" on the homepage
  2. Register: Choose "For Food Lovers" and complete the registration process
  3. Set Preferences: Select your favorite cuisines, dietary restrictions, and preferences
  4. Start Reviewing: Browse restaurants and write reviews
  5. Earn Badges: Gain NFT badges for consistent reviews

For Merchants

  1. Connect Wallet: Click "Connect Wallet" on the homepage
  2. Register: Choose "For Restaurants" and complete the merchant registration
  3. Add Details: Enter restaurant information, cuisines, and pricing
  4. Manage Menu: Add menu items with descriptions and prices
  5. Monitor Reviews: View customer feedback and analytics

πŸ”’ Security Features

  • Wallet Authentication: Secure blockchain-based identity verification
  • World ID Integration: Human verification to prevent bot attacks
  • Confidence Scoring: AI-powered review reliability assessment
  • Immutable Data: Blockchain storage for review integrity

🚧 Development Roadmap

Phase 1 (Current)

  • βœ… User and Merchant Registration
  • βœ… Dashboard Implementation
  • βœ… Basic Review System
  • βœ… Wallet Integration

Phase 2 (Next)

  • Smart Contract Development
  • NFT Badge System
  • Review Voting Algorithm
  • World ID Integration

Phase 3 (Future)

  • AI Recommendation Engine
  • Crypto Payment System
  • Advanced Analytics
  • Mobile App

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“ License

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

πŸ†˜ Support

If you encounter any issues:

  1. Check the Issues page
  2. Create a new issue with detailed information
  3. Contact the development team

πŸ™ Acknowledgments


Built with ❀️ for the future of food reviews

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors