The Freelance DApp is a decentralized application built on the Ethereum blockchain that connects freelancers with clients. It allows clients to post projects, freelancers to place bids, and clients to manage their projects and payments securely. The application leverages smart contracts to ensure transparency and trust in the bidding and payment processes.
- Create Projects: Clients can create new projects by providing a title, description, and budget.
- View Bids: Clients can view bids from freelancers for their projects.
- Manage Projects: Clients can mark projects as completed and make payments to freelancers.
- Chat with freelancers: Clients can chat with Freelancers.
- Browse Jobs: Freelancers can browse available jobs and view project details.
- Place Bids: Freelancers can place bids on projects they are interested in.
- Manage Bids: Freelancers can view their accepted bids and the status of their projects.
- Chat with clients: Freelancers can chat with clients.
- Smart Contracts: Solidity
- Frontend: React.js
- Backend: Bun.js with Express && Socket.io
- Blockchain: Ethereum
- Web3 Integration: Ethers.js and Web3.js
- Bun
- npm (Node Package Manager)
- Hardhat (for smart contract development)
- MetaMask (for interacting with the Ethereum blockchain)
git clone https://github.com/MohakGupta2004/ChainWork.git
cd ChainWork Navigate to the project directory and install the required dependencies:
cd client
npm install- Navigate to the
scriptsdirectory and deploy the smart contracts:
npx hardhat run scripts/deploy.js --network localhost- Make sure to start a local Ethereum node:
npx hardhat node- Start the Backend Server:
npm i
cd api
npm run dev - Start the Frontend Application:
npm i
cd client
npm run dev - Open your browser and navigate to
http://localhost:3000to access the application.
- Create a New Project: Navigate to the "Create Project" page and fill out the project form.
- View Bids: Go to "My Projects" to view bids from freelancers and accept them.
- Mark Projects as Completed: Once a project is finished, mark it as completed and make payments.
- Browse Available Jobs: Navigate to the "Job Listings" page to view available projects.
- Place Bids: Click on a project to view details and place a bid.
- Manage Accepted Bids: Go to "My Bids" to see your accepted bids and their statuses.
/contracts
├── FreelanceDapp.sol # Smart contract for managing projects and bids
├── PaymentContract.sol # For handling Payments
/client
├── /pages # React components for different pages
│ ├── MyJobs.jsx # Page for freelancers to manage their jobs
│ ├── MyBids.jsx # Page for freelancers to view their bids
│ ├── CreateProject.jsx # Page for clients to create new projects
│ ├── Messages.jsx # Handling Messages
│ ├── JobListings.jsx # Page for freelancers to browse jobs
│ ├── ClientProjectDetails.jsx # Page for clients to view project details
│ ├── Wallet.jsx # Page for managing wallet connections
│ ├── App.jsx # Main application component
├── /context # Context for managing authentication
│ ├── AuthContext.jsx
├── SocketContext.jsx
/api
├── index.ts # Main entry point for the API
├── /controllers # Controllers for handling API requests
│ ├── clientController.ts # Controller for client-related API endpoints
│ ├── freelancerController.ts # Controller for freelancer-related API endpoints
Contributions are welcome! If you have suggestions for improvements or new features, please open an issue or submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
- Thanks to the Ethereum community for their resources and support.
- Special thanks to the developers of Hardhat, Ethers.js, and React.js for their amazing tools.