An open API service indexing awesome lists of open source software.

https://github.com/md-zeon/micro-earn-client

Frontend for MicroEarn, a micro-task and earning platform where users can earn rewards by completing tasks. Built with React, Tailwind CSS, and Firebase. Features role-based dashboards for Workers, Buyers, and Admins, real-time notifications, secure authentication, task submissions, and payment processing with Stripe.
https://github.com/md-zeon/micro-earn-client

aos daisyui firebase-auth javascript jwt mongodb motion react reactjs tailwindcss

Last synced: 3 months ago
JSON representation

Frontend for MicroEarn, a micro-task and earning platform where users can earn rewards by completing tasks. Built with React, Tailwind CSS, and Firebase. Features role-based dashboards for Workers, Buyers, and Admins, real-time notifications, secure authentication, task submissions, and payment processing with Stripe.

Awesome Lists containing this project

README

          

# MicroEarn - Client Side

## Overview

The client side of MicroEarn is a responsive micro-tasking platform interface built with React.js and Tailwind CSS. It serves three primary user rolesβ€”Workers, Buyers, and Adminsβ€”allowing them to interact with tasks, submissions, and earnings through a user-friendly dashboard experience. The app integrates Firebase for authentication, uses React Router for seamless navigation, and communicates securely with the backend via Axios.

## 🌐 Live Site

**URL:** [https://micro-earn-7be08.web.app/](https://micro-earn-7be08.web.app/)

## πŸ‘€ Admin Credentials

**Email:** [admin@microearn.com](mailto:admin@microearn.com)
**Password:** Admin@1234

---

## ✨ Key Features

- πŸ” **Role-Based Authentication** – Firebase authentication with Buyer, Worker, and Admin roles
- πŸ“‹ **Task Creation** – Buyers can post tasks with descriptions, instructions, and required workers
- 🨠 **Task Discovery** – Workers can browse tasks with filters by category, coins, deadline, etc.
- πŸ“ **Task Submission** – Workers can submit proof with file upload and message
- βœ… **Buyer Review System** – Buyers approve/reject submissions; coins awarded upon approval
- πŸ“€ **ImgBB Upload** – Workers upload task proof/images via ImgBB API
- πŸ’° **Coin-Based Economy** – Buyers buy coins with Stripe, Workers earn coins from tasks
- πŸ’Έ **Withdrawals** – Workers can withdraw coins (20 coins = $1, min 200 coins); status = pending until admin approval
- πŸ“Š **Dashboards** – Role-specific dashboards showing tasks, payments, coins, and submissions
- πŸ“₯ **Notifications** – Real-time alerts for submission approvals, rejections, new tasks, and withdrawals
- πŸ§‘β€πŸ’Ό **Admin Panel** – Manage users, tasks, and approve withdrawals
- πŸ“„ **Payment History** – Buyers see purchase history; Workers see withdrawals
- πŸ›‘οΈ **Secure Routes** – Route protection and role-based redirection
- πŸ–ΌοΈ **Profile Management** – Edit name, profile photo, and track performance
- πŸ“± **Responsive UI** – Fully responsive layout with TailwindCSS + DaisyUI
- πŸ“ˆ **Performance Analytics** – Track total coins earned, tasks completed, and payment history
- πŸͺͺ **Form Validation** – Clean forms using React Hook Form + custom validation
- βš™οΈ **Custom Hooks** – All role and auth logic separated into reusable hooks

---

## πŸ“‹ Feature Overview Table

| Feature | Description |
| ------------------------- | ------------------------------------------------------------------- |
| Role-Based Authentication | Separate login access for Workers, Buyers, and Admins |
| Task Creation | Buyers can post detailed tasks with instructions and deadlines |
| Task Submission | Workers can submit task proofs with image upload |
| Buyer Review System | Buyers approve or reject submissions; status updates in real-time |
| Worker Earnings | Earn coins per approved task; track coin balance |
| Coin-Based Economy | Internal system where 20 coins = $1 for withdrawal |
| Stripe Payments | Buyers purchase coins securely using Stripe |
| Withdrawals | Workers can request to withdraw money after earning minimum coins |
| Admin Panel | Manage users, tasks, and withdrawal requests |
| Notifications | Bell-based alert system for submissions, approvals, and withdrawals |

---

## πŸ› οΈ Tech Stack

### Frontend

[![React](https://img.shields.io/badge/React-20232A?style=for-the-badge&logo=react&logoColor=61DAFB)](https://reactjs.org/)
[![Vite](https://img.shields.io/badge/Vite-646CFF?style=for-the-badge&logo=vite&logoColor=white)](https://vitejs.dev/)
[![TailwindCSS](https://img.shields.io/badge/TailwindCSS-06B6D4?style=for-the-badge&logo=tailwind-css&logoColor=white)](https://tailwindcss.com/)
[![DaisyUI](https://img.shields.io/badge/DaisyUI-5A0FC8?style=for-the-badge&logo=tailwindcss&logoColor=white)](https://daisyui.com/)
[![Firebase](https://img.shields.io/badge/Firebase-FFCA28?style=for-the-badge&logo=firebase&logoColor=black)](https://firebase.google.com/)
[![Stripe](https://img.shields.io/badge/Stripe-008CDD?style=for-the-badge&logo=stripe&logoColor=white)](https://stripe.com/)
[![TanStack Query](https://img.shields.io/badge/TanStack%20Query-FF4154?style=for-the-badge&logo=react-query&logoColor=white)](https://tanstack.com/query)
[![React Router](https://img.shields.io/badge/React%20Router-CA4245?style=for-the-badge&logo=react-router&logoColor=white)](https://reactrouter.com/)
[![Framer Motion](https://img.shields.io/badge/Framer_Motion-EF00FF?style=for-the-badge&logo=framer&logoColor=white)](https://www.framer.com/motion/)
[![React Hook Form](https://img.shields.io/badge/React_Hook_Form-EC5990?style=for-the-badge&logo=reacthookform&logoColor=white)](https://react-hook-form.com/)

### Backend

[![Express.js](https://img.shields.io/badge/Express.js-000000?style=for-the-badge&logo=express&logoColor=white)](https://expressjs.com/)
[![MongoDB](https://img.shields.io/badge/MongoDB-47A248?style=for-the-badge&logo=mongodb&logoColor=white)](https://www.mongodb.com/)
[![Firebase Admin](https://img.shields.io/badge/Firebase_Admin-FFA611?style=for-the-badge&logo=firebase&logoColor=white)](https://firebase.google.com/docs/admin)
[![Stripe API](https://img.shields.io/badge/Stripe_API-008CDD?style=for-the-badge&logo=stripe&logoColor=white)](https://stripe.com/docs/api)
[![dotenv](https://img.shields.io/badge/dotenv-8DD6F9?style=for-the-badge&logo=dotenv&logoColor=black)](https://www.npmjs.com/package/dotenv)

---

## πŸ§ͺ Pages and Routes

| Route | Description |
| ------------------------------ | ----------------------------------------------- |
| `/` | Homepage with banner, features, and top workers |
| `/login` | User login page |
| `/register` | User registration page |
| `/dashboard` | Redirects based on user role |
| `/dashboard/my-tasks` | Buyer: Manage own tasks |
| `/dashboard/create-task` | Buyer: Post a task |
| `/dashboard/payments` | Buyer: View payments |
| `/dashboard/take-task` | Worker: Browse available tasks |
| `/dashboard/my-submissions` | Worker: See submitted tasks |
| `/dashboard/request-withdraw` | Worker: Submit a withdrawal request |
| `/dashboard/withdrawals` | Worker: View withdrawal history |
| `/dashboard/all-users` | Admin: View/manage users |
| `/dashboard/all-tasks` | Admin: View/delete tasks |
| `/dashboard/stats` | Admin: View platform stats |
| `/dashboard/withdraw-requests` | Admin: Approve withdrawals |

## πŸ”‘ Environment Variables

Create a `.env.local` file in the root:

```env
VITE_apiKey=your_firebase_api_key
VITE_authDomain=your_firebase_auth_domain
VITE_projectId=your_project_id
VITE_storageBucket=your_storage_bucket
VITE_messagingSenderId=your_messaging_id
VITE_appId=your_app_id
VITE_IMGBB_API_KEY=your_imgbb_api_key
VITE_API_URL=https://micro-earn-server.vercel.app
VITE_STRIPE_PUBLISHABLE_KEY=your_stripe_publishable_key
```

## πŸ› οΈ Installation

```bash
git clone https://github.com/Programming-Hero-Web-Course4/b11a12-client-side-md-zeon
cd b11a12-client-side-md-zeon
npm install
```

Run the development server:

```bash
npm run dev
```

## 🧾 Notes

- Uses JWT from Firebase for secure API communication.
- Fully responsive and mobile-friendly.
- Includes loading states, error boundaries, and fallback UIs.
- Integrated with backend server hosted at: [https://micro-earn-server.vercel.app](https://micro-earn-server.vercel.app)

## πŸ§ͺ Testing

- Tested manually across major routes and dashboard flows.
- Protected routes tested for all roles.

---

## πŸ‘₯ User Roles

### πŸ‘· Workers

- Browse and complete available tasks
- Earn coins and withdraw real money
- View task history and performance stats

### πŸ’Ό Buyers

- Create and manage tasks
- Review and approve/reject submissions
- Monitor task performance and payments

### πŸ›‘οΈ Admins

- Oversee the entire platform
- Manage users, tasks, and withdrawal requests
- Monitor overall platform statistics and earnings

---

## πŸ“„ License

This project is for educational purpose only.

## πŸ—‚οΈ Project Structure

```
micro-earn-client/
β”œβ”€β”€ public/ # Static assets (SVGs, video, favicon)
β”œβ”€β”€ src/
β”‚ β”œβ”€β”€ api/ # API utilities
β”‚ β”œβ”€β”€ assets/ # SVGs and images
β”‚ β”œβ”€β”€ components/ # Reusable UI components
β”‚ β”œβ”€β”€ contexts/ # React context providers
β”‚ β”œβ”€β”€ firebase/ # Firebase config
β”‚ β”œβ”€β”€ hooks/ # Custom React hooks
β”‚ β”œβ”€β”€ layouts/ # Page layouts
β”‚ β”œβ”€β”€ pages/ # Route pages (Home, About, Auth, Dashboard, etc.)
β”‚ β”œβ”€β”€ providers/ # App-level providers
β”‚ β”œβ”€β”€ Routes/ # Route protection and role-based routes
β”‚ └── index.css, main.jsx, App.jsx
β”œβ”€β”€ package.json # Project metadata and dependencies
β”œβ”€β”€ vite.config.js # Vite configuration
β”œβ”€β”€ firebase.json # Firebase hosting config
β”œβ”€β”€ eslint.config.js # ESLint configuration
└── README.md
```

### Home Page Sections

The Home page (`src/pages/Home/Home.jsx`) features these main sections:
- **Hero** – Landing banner and introduction
- **HowItWorks** – Steps to get started
- **BestWorkers** – Showcase of top workers
- **TestimonialSlider** – User testimonials
- **WhyChooseUs** – Platform benefits
- **FAQ** – Frequently asked questions

## 🀝 Contributing

Contributions are welcome! Feel free to fork the repo and submit pull requests. Whether it's fixing bugs, improving documentation, or adding new features β€” all efforts are appreciated.

## πŸ“¬ Contact

If you have any questions or feedback, feel free to reach out:

**Developer:** Zeanur Rahaman Zeon
**Email:** [zeon.cse@gmail.com](mailto:zeon.cse@gmail.com)
**LinkedIn:** [https://www.linkedin.com/in/zeanur-rahaman-zeon](https://www.linkedin.com/in/zeanur-rahaman-zeon)