SmartPay revolutionizes the freelance marketplace by leveraging blockchain technology for secure, transparent, and decentralized task management and payments.
- π Blockchain-Powered: Ethereum smart contracts ensure secure and transparent transactions
- πΌ Task Management: Create, assign, and complete tasks with automated payment escrow
- π¨ Multiple Categories: Design (Logo, UI/UX, Web) and Development (Full-stack, Web)
- β Review System: Rate and review completed work
- π€ User Profiles: Manage your profile, credits, and task history
- π± Responsive Design: Works seamlessly on desktop and mobile
SmartPay/
βββ frontend/ # Next.js 14 application
βββ backend/ # Express.js API with MongoDB
βββ contracts/ # Solidity smart contracts (Hardhat)
βββ SmartPay-demo/ # Demo version (no crypto required!)
- Full blockchain integration
- Requires MetaMask wallet
- Real cryptocurrency transactions (3 ETH per task)
- Permanent blockchain storage
- No wallet required!
- No crypto needed!
- FREE task creation
- Perfect for testing and demonstrations
- See Demo Documentation
Frontend:
- Next.js 14 (App Router)
- React 18
- ethers.js for blockchain interaction
- MetaMask integration
Backend:
- Express.js 4
- MongoDB with Mongoose
- RESTful API
- File upload support
Blockchain:
- Solidity 0.8.8
- Hardhat development environment
- Ethereum smart contracts
- Node.js 16+
- MongoDB
- MetaMask browser extension
- Clone the repository
git clone https://github.com/Path3010/SmartPay.git
cd SmartPay- Create environment files
cp backend/.env.example backend/.env
cp frontend/.env.local.example frontend/.env.local
cp contracts/.env.example contracts/.env- Install dependencies
# Backend
cd backend && npm install
# Frontend
cd ../frontend && npm install
# Contracts
cd ../contracts && npm install- Start MongoDB (if not running)
# Using Docker
docker run -d --name smartpay-mongo -p 27017:27017 mongo:6
# Or use local MongoDB installation- Run the services
# Terminal 1 - Backend
cd backend && npm start # http://localhost:8080
# Terminal 2 - Frontend
cd frontend && npm run dev # http://localhost:3000- Open the app
- Navigate to http://localhost:3000
- Connect your MetaMask wallet
- Start creating tasks!
Want to test without cryptocurrency? Check out the demo version:
cd SmartPay-demo
# See SmartPay-demo/QUICKSTART.md for setupDemo Features:
- β FREE task creation
- β No wallet needed
- β All UI/UX features
- β Perfect for presentations
MONGODB_URL=mongodb://127.0.0.1:27017/smartpay
PORT=8080
ALLOWED_ORIGINS=http://localhost:3000,http://127.0.0.1:3000
JWT_SECRET=your-secret-key
NODE_ENV=developmentNEXT_PUBLIC_BACKEND_URL=http://localhost:8080PRIVATE_KEY=your-private-key
INFURA_PROJECT_ID=your-infura-id- Create Task: Post a task with reward (costs 3 ETH)
- Browse Tasks: Freelancers browse available tasks
- Request Task: Solvers request to work on tasks
- Assign Task: Creator assigns task to a solver
- Complete Task: Solver completes and submits work
- Release Payment: Creator approves and releases payment
- Review: Both parties can leave reviews
- Create tasks with detailed descriptions
- Set rewards in ETH
- Specify time to complete
- Choose from multiple categories
- Track task status (Created, Assigned, Completed, Accepted)
- Escrow-based payments
- Automated fund transfers via smart contracts
- Secure blockchain transactions
- Credit system for task creation
- Profile management
- Task history
- Review and rating system
- Credit balance tracking
cd contracts
npx hardhat compile
npx hardhat test
npx hardhat run scripts/deploy.js --network localhost# Backend tests (if available)
cd backend && npm test
# Contract tests
cd contracts && npx hardhat testfrontend/src/app- Next.js app router pagesfrontend/src/components- Reusable React componentsfrontend/src/hooks- Custom React hooks for blockchainfrontend/src/utils- Utility functions and contract interactionsbackend/src/models- MongoDB schemasbackend/src/controllers- Express route handlersbackend/src/routes- API route definitionscontracts/contracts- Solidity smart contracts
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License.
- Demo Version: SmartPay-demo
- GitHub: https://github.com/Path3010/SmartPay
- This is a demo/educational project
- Use testnet for testing (never mainnet with real funds during development)
- Always audit smart contracts before production deployment
- Demo version in
SmartPay-demo/doesn't require crypto - perfect for testing!
Made with β€οΈ using Next.js, Express, and Solidity
- frontend/.env.local
- NEXT_PUBLIC_BACKEND_URL: Base URL for the Express API (e.g. http://localhost:8080)
- contracts/.env
- SEPOLIA_RPC_URL, MUMBAI_RPC_URL: RPC URLs for deployments
- PRIVATE_KEY: Wallet private key for deployments
- ETHERSCAN_API_KEY, COINMARKETCAP_API_KEY: Optional verification and gas price APIs
- GET /user/:walletAddress β fetch user profile
- POST /user/insertProfile β create profile
- POST /user/update β update profile fields
- POST /user/updatecredits β adjust credit balance
- POST /user/reviews/:projectAddress/:userid β add a review
- GET /reviews/:projectAddress β list reviews for a project
- GET /submission/:projectAddress β list submissions for a project
- POST /user/insertSubmission β create or update a submission link
- PUT /submission/:id/:type/:current β upvote/downvote a submission
- Current deployed addresses
- Mumbai: 0x84322cC07D2014D958A19bA1b6E93788FC9F9608
- Sepolia: 0x4ed96a857fc902e79b7d9551034c3efa0a369b60
- ABI and contract address used by the frontend live in frontend/config/config.json
- Compile/export artifacts
npm run compile-export --prefix contracts- Default ports: API 8080, frontend 3000. Update the env files to change them.
- Ensure MetaMask is connected to the network that matches the contract address in frontend/config/config.json.
- Static assets and mock data live under frontend/public and frontend/public/data.