Rishet11/brickbyte

๐Ÿ  Real Estate Investment Prowered by AI & Blockchain

โ˜… 0Forks 0Jupyter NotebookGitHub โ†—Compare

Project website โ†—

README

๐Ÿ  BRICKBYTE - AI/Blockchain Based Micro Real Estate Investment Platform

Landing Page

Deployed on Vercel Demo Video

BRICKBYTE is a decentralized platform that enables fractional ownership of real estate properties through NFTs, powered by AI valuation and automated rental distribution.

๐ŸŒŸ Features

  • Web3 Integration: Connect with MetaMask and other Web3 wallets
  • Fractional Property Ownership: Buy and sell micro real estate shares as NFTs
  • AI-Powered Valuation: Dynamic property price predictions and ROI calculations
  • Automated Rental Distribution: Smart contract-based rental income distribution
  • Real-time Trading: Instant buy/sell of property shares
  • Transparent Ownership: On-chain ownership records and transaction history
  • Portfolio Management: Track your investments and AI-predicted returns
  • Interactive Chatbot: AI-powered assistant for property inquiries and support

๐ŸŽจ UI Screenshots

1. Welcome to Brickbyte

Welcome to Brickbyte

2. Properties Marketplace

Properties Marketplace

3. AI Market Insights

AI Market Insights

4. Market Trends Analysis

Market Trends Analysis

5. Auction & Staking Platform

Auction & Staking Platform

๐Ÿ›  Tech Stack

Frontend

  • Next.js 14 (App Router)
  • TypeScript
  • TailwindCSS
  • Shadcn/ui
  • Web3.js
  • Ethers.js
  • React Query
  • Vercel (Deployment)

Backend

  • Node.js
  • Express.js
  • TypeScript
  • Supabase (PostgreSQL)
  • Render (Deployment)

Smart Contracts

  • Solidity
  • Hardhat
  • OpenZeppelin
  • Chainlink Automation

AI/ML

  • Scikit-learn/TensorFlow (Local ML Model)
  • Render (Deployment)

Blockchain

  • Ethereum (Sepolia Testnet for Development)

๐Ÿ“ Project Structure

brickbyte/
โ”œโ”€โ”€ frontend/                 # Next.js frontend application
โ”‚   โ”œโ”€โ”€ app/                 # App router pages
โ”‚   โ”œโ”€โ”€ components/          # Reusable UI components
โ”‚   โ”œโ”€โ”€ lib/                 # Utility functions and API clients
โ”‚   โ”œโ”€โ”€ hooks/               # Custom React hooks
โ”‚   โ”œโ”€โ”€ contexts/            # React contexts
โ”‚   โ”œโ”€โ”€ public/              # Static assets
โ”‚   โ””โ”€โ”€ styles/              # Global styles
โ”‚
โ”œโ”€โ”€ backend/                 # Node.js backend application
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ controllers/    # Route controllers
โ”‚   โ”‚   โ”œโ”€โ”€ models/         # Data models
โ”‚   โ”‚   โ”œโ”€โ”€ services/       # Business logic
โ”‚   โ”‚   โ”œโ”€โ”€ routes/         # API routes
โ”‚   โ”‚   โ””โ”€โ”€ utils/          # Utility functions
โ”‚   โ””โ”€โ”€ tests/              # Backend tests
โ”‚
โ”œโ”€โ”€ contracts/              # Smart contracts
โ”‚   โ”œโ”€โ”€ contracts/         # Solidity contracts
โ”‚   โ”œโ”€โ”€ scripts/          # Deployment scripts
โ”‚   โ””โ”€โ”€ test/             # Contract tests
โ”‚
โ””โ”€โ”€ ml-model/             # AI/ML model
    โ”œโ”€โ”€ data/            # Training data
    โ”œโ”€โ”€ models/          # Trained models
    โ””โ”€โ”€ scripts/         # Training scripts

๐Ÿš€ Getting Started

Prerequisites

  • Node.js (v18 or higher)
  • npm or yarn
  • MetaMask or other Web3 wallet
  • Git
  • Python 3.8+ (for ML model)
  • Hardhat (for smart contract development)
  • Vercel account (for frontend deployment)
  • Render account (for backend and ML service deployment)

Installation

  1. Clone the repository:
git clone https://github.com/sudhansu-24/brickbyte.git
cd brickbyte
  1. Install dependencies:
# Install frontend dependencies
cd frontend
npm install

# Install backend dependencies
cd ../backend
npm install

# Install smart contract dependencies
cd ../contracts
npm install

# Install ML model dependencies
cd ../ml-model
pip install -r requirements.txt

Environment Setup

  1. Create .env files in each directory:

Frontend (.env.local):

NEXT_PUBLIC_API_URL=https://brickbyte-backend.onrender.com
NEXT_PUBLIC_ML_API_URL=https://brickbyte-ml.onrender.com
NEXT_PUBLIC_SEPOLIA_RPC_URL=YOUR_RPC_URL_PROVIDER
NEXT_PUBLIC_CONTRACT_ADDRESS=0xb39c11D2F62f3fADd1d1f5D3935e1D1b3e6D8FAb
NEXT_PUBLIC_SUPABASE_URL=https://sfcexboguumqecgcjfmj.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key

Backend (.env):

PORT=3001
SUPABASE_URL=your_supabase_url
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key
SUPABASE_ANON_KEY=your_anon_key
JWT_SECRET=your_jwt_secret
FRONTEND_URL=https://brickbyte.vercel.app

ML Service (.env):

PORT=8000

Contracts (.env):

PRIVATE_KEY=your_wallet_private_key
SEPOLIA_RPC_URL=your_sepolia_rpc_url

Deployment

  1. Frontend Deployment (Vercel)

    • Push your code to GitHub
    • Connect your repository to Vercel
    • Set the root directory to frontend
    • Set environment variables in Vercel dashboard
    • Deploy
  2. Backend Deployment (Render)

    • Push your code to GitHub
    • Create a new Web Service on Render
    • Connect your repository
    • Set environment variables
    • Deploy
  3. ML Service Deployment (Render)

    • Push your code to GitHub
    • Create a new Web Service on Render
    • Set Python as the runtime
    • Set environment variables
    • Deploy
  4. Smart Contract Deployment

cd contracts
npx hardhat run scripts/deploy.js --network sepolia

Running Locally

  1. Start the ML model server:
cd ml-model
python scripts/valuation.py
  1. Start the backend server:
cd backend
npm start
  1. Start the frontend development server:
cd frontend
npm run dev

The application will be available locally at:

๐ŸŒ Live Demo

๐Ÿ“ Usage Guide

  1. User Registration

  2. Property Listing

    • Log in to your account
    • Navigate to "Create Property"
    • Fill in property details and upload images
    • Set initial share price and total shares
  3. Trading

    • Browse available properties
    • View AI-predicted ROI and property details
    • Buy/sell shares using MetaMask
  4. Portfolio Management

    • View your owned shares
    • Track rental income
    • Monitor AI-predicted property valuations

๐Ÿ”ง Troubleshooting

Common issues and solutions:

  1. CORS Issues

    • Ensure backend CORS configuration includes your frontend domain
    • Check environment variables are set correctly
    • Verify all services are properly deployed
  2. MetaMask Connection Issues

    • Ensure MetaMask is installed and unlocked
    • Check if you're connected to Sepolia testnet
    • Verify your account has sufficient test ETH
  3. Backend Connection Errors

    • Check if backend server is running
    • Verify environment variables are set correctly
    • Check database connection
    • Ensure CORS is properly configured
  4. ML Service Issues

    • Verify ML service is running
    • Check environment variables
    • Ensure proper CORS configuration
  5. Smart Contract Deployment

    • Ensure you have sufficient test ETH
    • Verify network configuration in hardhat.config.js
    • Check contract compilation for errors

๐Ÿค Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some 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.

๐Ÿ”’ Security

For security concerns, please email at [email protected] or create a security advisory on GitHub.

๐Ÿ™ Acknowledgments

  • OpenZeppelin for smart contract templates
  • Chainlink for oracle services
  • Supabase for database infrastructure
  • Vercel and Render for deployment infrastructure
  • The Ethereum community for development tools and resources

Built with โค๏ธ by My Team

GitHub โ€ข LinkedIn

Contributors

sudhansu-24Pulkit7070Rishet11

Issues