{"id":25692345,"url":"https://github.com/tanvermax/micro-task-earning","last_synced_at":"2026-04-12T03:34:18.683Z","repository":{"id":278150124,"uuid":"927576006","full_name":"tanvermax/micro-task-earning","owner":"tanvermax","description":"The Micro-Task and Earning Platform provides an innovative way for users to complete small tasks and earn rewards","archived":false,"fork":false,"pushed_at":"2025-02-18T08:45:48.000Z","size":7144,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-18T09:28:48.689Z","etag":null,"topics":["css","dasyui","firebase","html5","jwt-authentication","mongodb","nodejs","react","reacticons","reactjs","tailwind"],"latest_commit_sha":null,"homepage":"https://earnly-f35f1.web.app/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tanvermax.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-05T07:26:17.000Z","updated_at":"2025-02-18T08:45:51.000Z","dependencies_parsed_at":"2025-02-18T09:39:01.879Z","dependency_job_id":null,"html_url":"https://github.com/tanvermax/micro-task-earning","commit_stats":null,"previous_names":["tanvermax/micro-task-earning"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanvermax%2Fmicro-task-earning","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanvermax%2Fmicro-task-earning/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanvermax%2Fmicro-task-earning/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanvermax%2Fmicro-task-earning/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tanvermax","download_url":"https://codeload.github.com/tanvermax/micro-task-earning/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240570992,"owners_count":19822412,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["css","dasyui","firebase","html5","jwt-authentication","mongodb","nodejs","react","reacticons","reactjs","tailwind"],"created_at":"2025-02-24T23:08:54.203Z","updated_at":"2026-04-12T03:34:18.674Z","avatar_url":"https://github.com/tanvermax.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Micro Tasking and Earning Platform\n\n## 📌 Overview\nThe **Micro Tasking and Earning Platform** enables users to complete small tasks and earn money. Inspired by platforms like **Picoworkers**, **Clickworker**, and **SEOClerks** (without copying designs), the system supports **three user roles** with role-specific dashboards and functionalities:\n\n- **Worker** – Completes tasks, earns coins, withdraws money, and receives notifications.\n- **Buyer** – Creates tasks, reviews submissions, pays Workers, purchases coins, and reports issues.\n- **Admin** – Manages users, handles reports, approves withdrawals, and oversees system integrity.\n\n---\n\n## 📂 Table of Contents\n1. [Features](#-features)\n2. [Role Functionalities](#-role-functionalities)\n3. [Layout Structure](#-layout-structure)\n4. [Authentication System](#-authentication-system)\n5. [Dashboard Functionalities](#-dashboard-functionalities)\n6. [Business Logic](#-business-logic)\n7. [Payment \u0026 Withdrawal](#-payment--withdrawal)\n8. [Notifications](#-notifications)\n9. [Image Upload](#-image-upload)\n10. [API Documentation](#-api-documentation)\n11. [Installation](#-installation)\n12. [Configuration](#-configuration)\n13. [Troubleshooting](#-troubleshooting)\n14. [License](#-license)\n\n---\n\n## ✨ Features\n- **Three distinct roles** (Worker, Buyer, Admin) with role-based access.\n- **Responsive design** with animations and sliders.\n- **Secure authentication** (email/password + Google Sign-In).\n- **Stripe payment integration** for coin purchases.\n- **Withdrawals** with currency conversion logic.\n- **Role-based authorization middleware**.\n- **Notification system** for approvals, rejections, withdrawals, and submissions.\n- **Pagination** for submission lists.\n- **Image uploads via imgBB**.\n\n---\n\n## 👤 Role Functionalities\n\n### Worker\n- View available tasks and submit proof.\n- Track approved submissions and earnings.\n- Withdraw coins for cash.\n- View personalized notifications.\n\n### Buyer\n- Create, update, delete, and manage tasks.\n- Review submissions (approve/reject).\n- Purchase coins via Stripe.\n- View payment history.\n\n### Admin\n- Manage all users (edit roles, remove).\n- Approve or reject withdrawal requests.\n- Manage all tasks.\n- View platform-wide statistics.\n\n---\n\n## 🖥 Layout Structure\n\n### Basic Layout\n- **Navbar**\n  - Not logged in: Logo, Login, Register, Join as Developer (links to GitHub repo).\n  - Logged in: Logo (home), Dashboard, Available Coins, Profile + Logout, Join as Developer.\n- **Footer**\n  - Logo, clickable social icons (LinkedIn, Facebook, GitHub).\n\n### Home Page\n- **Hero Section** – Animated slider or background video (3 banners).\n- **Best Workers** – Top 6 Workers by coins.\n- **Testimonial Section** – Static Swiper slider with user feedback.\n- **Extra Sections** – At least 3 additional creative content areas.\n\n---\n\n## 🔐 Authentication System\n\n### Registration\n- Fields: Name, Email, Profile Picture URL, Password, Role (Worker/Buyer).\n- Default Coins: 10 for Workers, 50 for Buyers.\n- Email format \u0026 password strength validation.\n- Store user info + coins in database.\n\n### Login\n- Email/password or Google Sign-In.\n- Validation for incorrect credentials.\n- Store **JWT token** in browser local storage.\n- Redirect to role-specific dashboard after login.\n\n---\n\n## 📊 Dashboard Functionalities\n\n### Worker Dashboard\n- View stats (total submissions, pending, total earnings).\n- Approved Submissions table.\n- Task List with details \u0026 submission form.\n- My Submissions (with pagination).\n- Withdrawals with coin-to-dollar conversion.\n\n### Buyer Dashboard\n- View stats (task count, pending tasks, total paid).\n- Review submissions (approve/reject with coin updates).\n- Add New Tasks (with image upload, budget validation).\n- My Tasks (update/delete with coin refunds for unfinished tasks).\n- Purchase Coins via Stripe.\n- Payment History.\n\n### Admin Dashboard\n- View stats (total workers, buyers, coins, payments).\n- Manage withdrawal requests.\n- Manage all users (role updates, removal).\n- Manage all tasks (delete if needed).\n\n---\n\n## 💰 Business Logic\n- **Coin Purchase**:  \n  - 10 coins = $1  \n  - 150 coins = $10  \n  - 500 coins = $20  \n  - 1000 coins = $35  \n- **Withdrawal Rate**:  \n  - 20 coins = $1 (minimum withdrawal = 200 coins / $10).  \n- **Platform Earnings**:  \n  - Buyers buy coins at 10 coins = $1, Workers withdraw at 20 coins = $1.\n\n---\n\n## 💳 Payment \u0026 Withdrawal\n- **Stripe Payment Gateway** (or dummy payment if unavailable).\n- Buyer coin top-up after successful payment.\n- Worker withdrawal request with status tracking (pending → approved).\n\n---\n\n## 🔔 Notifications\n- Triggered on:\n  - Submission approval/rejection.\n  - Withdrawal approval.\n  - New submission to Buyer.\n- Stored in database and displayed in popup format.\n- Clickable to navigate to relevant dashboard section.\n\n---\n\n## 🖼 Image Upload\n- **imgBB Integration**:\n  - For profile pictures during registration.\n  - For task images in Add New Task form.\n\n---\n\n## 📡 API Documentation\n\n### **Base URL**\n```\nhttps://your-domain.com/api\n```\n\n### **Authentication \u0026 User Management**\n| Method | Endpoint              | Description |\n|--------|----------------------|-------------|\n| POST   | `/auth/register`     | Register new user (Worker/Buyer). Returns JWT token. |\n| POST   | `/auth/login`        | Login with email/password. Returns JWT token. |\n| POST   | `/auth/google`       | Google OAuth login. Returns JWT token. |\n| GET    | `/auth/me`           | Get current user info (requires token). |\n| PUT    | `/users/:id`         | Update user profile info. |\n| DELETE | `/users/:id`         | Delete user account (Admin only). |\n\n### **Task Management (Buyer)**\n| Method | Endpoint                      | Description |\n|--------|--------------------------------|-------------|\n| POST   | `/tasks`                       | Create new task (validates coin balance). |\n| GET    | `/tasks`                       | Get all tasks (public or filtered). |\n| GET    | `/tasks/my`                    | Get tasks created by logged-in Buyer. |\n| GET    | `/tasks/:id`                   | Get task details by ID. |\n| PUT    | `/tasks/:id`                   | Update Buyer’s own task details. |\n| DELETE | `/tasks/:id`                   | Delete task (refund coins if applicable). |\n\n### **Task Browsing \u0026 Submission (Worker)**\n| Method | Endpoint                         | Description |\n|--------|-----------------------------------|-------------|\n| GET    | `/tasks/available`               | Get tasks where `required_workers \u003e 0`. |\n| POST   | `/submissions`                   | Submit proof for a task. |\n| GET    | `/submissions/my`                | Get submissions by current Worker (with pagination). |\n| GET    | `/submissions/approved`          | Get approved submissions for Worker. |\n\n### **Submission Review (Buyer)**\n| Method | Endpoint                         | Description |\n|--------|-----------------------------------|-------------|\n| GET    | `/submissions/to-review`         | Get submissions pending review for Buyer’s tasks. |\n| PUT    | `/submissions/:id/approve`       | Approve submission (update Worker coins). |\n| PUT    | `/submissions/:id/reject`        | Reject submission (refill Buyer’s `required_workers`). |\n\n### **Coin Purchase \u0026 Payments**\n| Method | Endpoint                 | Description |\n|--------|--------------------------|-------------|\n| POST   | `/payments/create`       | Create Stripe payment session. |\n| POST   | `/payments/webhook`      | Stripe webhook endpoint. |\n| GET    | `/payments/history`      | Get Buyer’s payment history. |\n\n### **Withdrawals (Worker \u0026 Admin)**\n| Method | Endpoint                   | Description |\n|--------|----------------------------|-------------|\n| POST   | `/withdrawals`             | Request withdrawal (Worker). |\n| GET    | `/withdrawals/my`          | Get Worker’s withdrawal requests. |\n| GET    | `/withdrawals/pending`     | Get all pending withdrawal requests (Admin). |\n| PUT    | `/withdrawals/:id/approve` | Approve withdrawal and deduct Worker coins (Admin). |\n\n### **Admin Management**\n| Method | Endpoint            | Description |\n|--------|---------------------|-------------|\n| GET    | `/admin/stats`      | Get platform-wide statistics. |\n| GET    | `/admin/users`      | Get all users. |\n| PUT    | `/admin/users/:id`  | Update user role. |\n| DELETE | `/admin/users/:id`  | Remove a user. |\n| GET    | `/admin/tasks`      | Get all tasks. |\n| DELETE | `/admin/tasks/:id`  | Delete any task. |\n\n### **Notifications**\n| Method | Endpoint                 | Description |\n|--------|--------------------------|-------------|\n| GET    | `/notifications`         | Get notifications for current user (sorted DESC). |\n| POST   | `/notifications`         | Create new notification (system-triggered). |\n| PUT    | `/notifications/:id`     | Mark notification as read. |\n\n---\n\n## ⚙ Installation\n```bash\n# Clone repository\ngit clone \u003crepo-url\u003e\n\n# Install dependencies\nnpm install\n\n# Setup environment variables\ncp .env.example .env\n\n# Run development server\nnpm run dev\n```\n\n---\n\n## 🔧 Configuration\n```\nPORT=5000\nMONGO_URI=\u003cYour MongoDB Connection String\u003e\nJWT_SECRET=\u003cYour JWT Secret\u003e\nSTRIPE_SECRET_KEY=\u003cYour Stripe Secret Key\u003e\nIMGBB_API_KEY=\u003cYour imgBB API Key\u003e\nGOOGLE_CLIENT_ID=\u003cGoogle OAuth Client ID\u003e\nGOOGLE_CLIENT_SECRET=\u003cGoogle OAuth Client Secret\u003e\n```\n\n---\n\n## 🛠 Troubleshooting\n- JWT errors → Check token storage \u0026 middleware logic.\n- Stripe issues → Verify API keys \u0026 test mode setup.\n- Image uploads failing → Check imgBB API key.\n- Notifications missing → Ensure database queries filter by `toEmail`.\n\n---\n\n## 📜 License\nThis project is licensed under the **MIT License**.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftanvermax%2Fmicro-task-earning","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftanvermax%2Fmicro-task-earning","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftanvermax%2Fmicro-task-earning/lists"}