Skip to content

OmanshiRaj/FREELANCIA

Repository files navigation

Freelancia 🚀

Smart Contract Frontend Agents Network

A decentralized freelancing platform that bridges the gap between clients and freelancers through blockchain-based escrow and AI-driven task verification.


🌟 Overview

Freelancia reimagines the gig economy by eliminating trust issues. By leveraging Ethereum smart contracts, we ensure that payments are securely locked in escrow and only released when work is verified and approved. Our unique AI Agent system (powered by Fetch.ai) automates the verification of applications and submissions, making the process seamless and objective.

✨ Key Features

  • 🔒 Smart Contract Escrow: Secure fund management using Solidity contracts on Sepolia.
  • 🤖 AI Verification Agents: Automated vetting of freelancer applications and task submissions using Fetch.ai UAgents.
  • 💸 PYUSD Integration: Payments handled through PayPal's USD stablecoin for global accessibility.
  • 🎫 Web3 Identity: Wallet-based authentication (MetaMask) for secure, passwordless access.
  • 📊 Real-time Tracking: Monitor task progress from posting to payment release.
  • 🌈 Modern UI/UX: A premium dashboard built with React 19, Tailwind CSS 4, and Framer Motion.

🏗 System Architecture

graph TD
    subgraph "Frontend Layer (React 19)"
        UI[User Dashboard]
        WA[Wallet Auth]
        SCI[Ethers.js Contract Interactions]
    end

    subgraph "Backend & AI Layer"
        AG[Fetch.ai uAgents]
        API[Flask API Server]
        DB[(Supabase PostgreSQL)]
        ASI[ASI SDK / Veracity]
    end

    subgraph "Blockchain Layer (Sepolia)"
        ESC[TaskEscrow Contract]
        PYUSD[PYUSD Token Contract]
    end

    UI -->|Auth/Data| API
    API -->|Store/Fetch| DB
    SCI -->|Deposit/Release| ESC
    ESC -->|Lock/Transfer| PYUSD
    AG -->|Verify Work| DB
    AG -->|Intelligent Analysis| ASI
    API -->|Listen| AG
Loading

🛠 Tech Stack

Frontend

  • Framework: React 19 + Vite
  • Styling: Tailwind CSS 4 + shadcn/ui
  • State/Routing: React Router 7 + Context API
  • Web3: Ethers.js 6
  • Animations: Framer Motion

Smart Contracts

  • Language: Solidity 0.8.28
  • Tooling: Hardhat + Ignition
  • Interface: TypeChain
  • Security: OpenZeppelin Contracts

Backend & AI

  • Database: Supabase (PostgreSQL)
  • Agent Framework: Fetch.ai uagents
  • Server: Python 3 + Flask
  • Intelligence: ASI SDK for Veracity checks

🚀 Getting Started

Prerequisites

  • Node.js (v18.0.0 or higher)
  • Python (v3.8 or higher)
  • MetaMask browser extension
  • Sepolia ETH (Get some from a faucet)
  • Sepolia PYUSD (Available at 0xCaC524BcA292aaade2DF8A05cC58F0a65B1B3bB9)

Installation

  1. Clone the repository

    git clone https://github.com/yourusername/freelancia.git
    cd freelancia
  2. Frontend Setup

    npm install
  3. AI Agent Setup

    cd agent
    pip install -r requirements.txt
    cd ..

Configuration

Create a .env file in the root directory:

# Supabase Configuration
VITE_SUPABASE_URL=your_supabase_url
VITE_SUPABASE_ANON_KEY=your_supabase_anon_key

# Blockchain Configuration
VITE_TASK_ESCROW_ADDRESS=your_deployed_contract_address
VITE_PYUSD_TOKEN_ADDRESS=0xCaC524BcA292aaade2DF8A05cC58F0a65B1B3bB9
SEPOLIA_RPC_URL=your_infura_or_alchemy_url
SEPOLIA_PRIVATE_KEY=your_wallet_private_key

Create a .env file in the agent/ directory:

VITE_SUPABASE_URL=your_supabase_url
VITE_SUPABASE_ANON_KEY=your_supabase_anon_key
ASI_API_KEY=your_asi_key

📖 How It Works

  1. Post a Task: A Client posts a task and deposits PYUSD tokens into the Escrow Smart Contract.
  2. Apply: Freelancers apply for the task. The Client Agent automatically screens applications for relevance.
  3. Escrow: Once a freelancer is hired, the funds are held securely in the contract.
  4. Submit Work: The Freelancer submits their work.
  5. Verify: The Freelancer Agent analyzes the submission against the task requirements.
  6. Payment: Upon approval (manual or AI-assisted), the Smart Contract releases the PYUSD to the freelancer automatically.

📁 Project Structure

Freelancia/
├── src/                # React components, pages, and services
├── contracts/          # Solidity smart contracts (Hardhat)
├── agent/              # Python-based Fetch.ai uAgents & API
├── ignition/           # Deployment modules for Hardhat Ignition
├── sql/                # Supabase database schema migrations
├── public/             # Static assets
└── types/              # Global TypeScript definitions

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📄 License

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


Built with ❤️ for the decentralized future.

About

A decentralized freelancing platform that bridges the gap between clients and freelancers through blockchain-based escrow

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors