Kết nối người giao việc và người nhận việc, thanh toán tức thì bằng USDC trên Solana blockchain.
PayTask là nền tảng marketplace phi tập trung giúp:
- 👔 Clients đăng công việc và tìm worker có kỹ năng
- 👷 Workers tìm việc phù hợp và kiếm USDC
- 💰 Thanh toán tự động sau khi hoàn thành công việc
- 🔐 Bảo mật với blockchain và smart escrow
| Tính năng | PayTask | Freelance truyền thống |
|---|---|---|
| Thanh toán | ⚡ Tức thì (USDC) | 🐌 3-14 ngày |
| Phí giao dịch | 🎯 Thấp (~1-2%) | 💸 Cao (20-30%) |
| Bảo mật | 🔐 Blockchain | |
| Tranh chấp | 🤖 Tự động | 📧 Email support |
| QA kiểm tra | ✅ Tự động | 👀 Thủ công |
git clone https://github.com/PayTaskdz/PayTask.git
cd PayTask
npm install# Copy environment
cp .env.example .env
# Run migrations
npx prisma migrate dev
# Seed test data
npx prisma db seedBackend (Terminal 1):
npm run dev✅ API: http://localhost:3000
Frontend (Terminal 2):
cd frontend/frontendpaytask
npm install
npm run dev✅ Web: http://localhost:3001
- 🌐 Mở web: http://localhost:3001
- 📚 API docs: http://localhost:3000/api-docs
- 🔑 Login:
client1@paytask.com/password123
- QUICK_START.md ⭐ Bắt đầu ngay!
- Hướng dẫn cho Client (người giao việc)
- Hướng dẫn cho Worker (người nhận việc)
- Setup & troubleshooting
- COMPLETE_GUIDE.md - Tài liệu kỹ thuật đầy đủ
- TASK_FLOW_INTEGRATION.md - Task flow architecture
- NOTIFICATION_API.md - Notification system
- POSTMAN_GUIDE.md - API testing guide
┌─────────────────────────────────────────────────────────────┐
│ PAYTASK ARCHITECTURE │
└─────────────────────────────────────────────────────────────┘
┌─────────────┐ ┌──────────────┐ ┌─────────────┐
│ Frontend │──────│ Backend │──────│ Blockchain │
│ (Next.js) │ HTTP │ (Fastify) │ RPC │ (Solana) │
└─────────────┘ └──────────────┘ └─────────────┘
│ │ │
│ ├──────┐ │
│ │ │ │
│ ┌─────▼───┐ │ ┌────▼────┐
│ │ Cache │ │ │ USDC │
│ │ (Redis) │ │ │ Wallet │
│ └─────────┘ │ └─────────┘
│ │ │
│ ┌─────▼───┐ │
└──────────────│Database │◄─┘
│(Postgres)│
└──────────┘
Backend:
- ⚡ Fastify - Fast web framework
- 🗃️ Prisma - Type-safe ORM
- 🐘 PostgreSQL - Main database
- 🔴 Redis - Caching & sessions
- 🟣 Solana Web3.js - Blockchain integration
- 📦 Bull - Job queue
Frontend:
- ⚛️ Next.js 14 - React framework
- 🎨 TailwindCSS - Styling
- 🧩 shadcn/ui - UI components
- 🔄 React Query - Data fetching
- 📡 Axios - HTTP client
Blockchain:
- 💰 Solana - Layer 1 blockchain
- 🪙 USDC - Stablecoin payment
- 🔐 Solana wallet adapter
1. Đăng nhập → client1@paytask.com
2. Tạo task: "Nhập liệu 100 sản phẩm" - Reward: 50 USDC
3. Publish task → Hiển thị trên marketplace
4. Đợi worker submit
5. Review & Accept
6. 💰 Tự động chuyển 50 USDC cho worker
1. Đăng nhập → worker1@paytask.com
2. Browse tasks → Filter theo category, reward
3. Accept task → Bắt đầu làm việc
4. Upload file kết quả
5. Submit → Chờ review
6. 🎉 Nhận 50 USDC vào wallet
- Task discovery với advanced filters
- Assignment system với optimistic locking
- File upload & validation
- QA checks tự động
- Review & rating system
- USDC payment integration
- Real-time notifications
- Wallet management
- Multi-language support
- Mobile app
- Escrow smart contracts
- Dispute resolution system
- Advanced analytics dashboard
- Reputation-based rewards
POST /api/auth/register- Đăng kýPOST /api/auth/login- Đăng nhậpPOST /api/auth/logout- Đăng xuất
GET /api/tasks/discover- Tìm tasksPOST /api/tasks- Tạo task (Client)POST /api/tasks/publish/:id- Publish taskGET /api/tasks/:id- Chi tiết task
POST /api/assignments/accept- Accept task (Worker)GET /api/assignments/user/:userId- My assignments
POST /api/uploads/files- Upload filePOST /api/submissions- Submit workGET /api/submissions/:id- Submission details
POST /api/reviews/accept- Accept & pay (Client)POST /api/reviews/reject- Reject submission
GET /api/users/me- Profile & wallet balanceGET /api/wallet/transactions- Transaction history
📚 Full API docs: http://localhost:3000/api-docs
Import 2 files:
PayTask-API-Fixed.postman_collection.jsonPayTask-Development.postman_environment.json
Clients:
| Password | Role | |
|---|---|---|
client1@paytask.com |
password123 |
Client |
client2@paytask.com |
password123 |
Client |
Workers:
| Password | Reputation | |
|---|---|---|
worker1@paytask.com |
password123 |
⭐⭐⭐⭐ |
worker2@paytask.com |
password123 |
⭐⭐⭐ |
# Backend tests
npm test
# E2E tests
npm run test:e2e
# API tests (Postman)
./run-api-tests.sh # Unix/Mac
run-api-tests.bat # Windows- ✅ JWT tokens với refresh mechanism
- ✅ Password hashing (bcrypt)
- ✅ Session management (Redis)
- ✅ Rate limiting
- ✅ Solana wallet encryption
- ✅ Transaction timeout protection
- ✅ Payment verification
- ✅ Signature validation
- ✅ SQL injection prevention (Prisma)
- ✅ XSS protection
- ✅ CORS configuration
- ✅ File upload validation
- Node.js 18+
- PostgreSQL 14+
- Redis 7+
- Solana CLI (optional)
# Database
DATABASE_URL="postgresql://user:pass@localhost:5432/paytask"
# Redis
REDIS_HOST="localhost"
REDIS_PORT=6379
# JWT
JWT_SECRET="your-secret-key"
JWT_EXPIRES_IN="7d"
# Solana
SOLANA_NETWORK="devnet"
SETTLEMENT_WALLET_PRIVATE_KEY="your-private-key"
# Frontend
NEXT_PUBLIC_API_URL="http://localhost:3000"# Development
npm run dev # Start backend
npm run dev:frontend # Start frontend
# Database
npm run db:migrate # Run migrations
npm run db:seed # Seed data
npm run db:studio # Open Prisma Studio
# Build
npm run build # Build backend
npm run build:frontend # Build frontend
# Production
npm start # Start backend
npm run start:frontend # Start frontendcurl http://localhost:3000/healthResponse:
{
"status": "ok",
"uptime": 123.45,
"checks": {
"database": "connected",
"redis": "connected",
"blockchain": "connected"
}
}# Backend logs
tail -f logs/app.log
# Error logs
tail -f logs/error.log
# Payment logs
tail -f logs/payment.logChúng tôi hoan nghênh mọi đóng góp!
- Fork repo
- Create feature branch (
git checkout -b feature/AmazingFeature) - Commit changes (
git commit -m 'Add AmazingFeature') - Push to branch (
git push origin feature/AmazingFeature) - Open Pull Request
# Format code
npm run format
# Lint
npm run lint
# Type check
npm run type-checkMIT License - see LICENSE
- 📧 Email: support@paytask.com
- 💬 Discord: Join server
- 🐦 Twitter: @PayTaskHQ
- 📺 YouTube: PayTask Channel
Found a bug? Open an issue
Built with ❤️ using:
- MVP Launch
- Basic task flow
- USDC payments
- Mobile app beta
- Escrow smart contracts
- Multi-chain support
- Advanced analytics
- DAO governance
- Enterprise features
- API marketplace
- White-label solution
⭐ Nếu thấy hữu ích, hãy cho repo một star!
Last Updated: October 31, 2025