← Back to Projects
MicroTask Platform

MicroTask Platform

Three-sided task marketplace with server-enforced lifecycle and Stripe disbursement.

Live Code

Overview

Worker, Buyer, and Admin each operate in a role-scoped dashboard with context-appropriate data fetching and navigation. Task status transitions — draft → published → submitted → approved/rejected → paid — are validated server-side on every mutation; the client cannot skip states by crafting direct API calls. Stripe payment credits are triggered by webhook confirmation, not client callback, preventing double-credit on network retries. JWT payloads carry the user role; all API routes validate the claim before processing.

Key Features

  • Full task lifecycle enforced at the API layer — status transitions validated server-side, not client-driven
  • Stripe webhook-based payment confirmation — worker balances credited only after event verification
  • Separate dashboard UX per role: Worker, Buyer, Admin — each with role-scoped data fetching
  • Submission approval workflow with optional rejection reason returned to the worker
  • Admin dispute resolution panel with override capability on approved/rejected outcomes
  • Idempotency key check on webhook handler — already-processed events are logged and skipped

Tech Stack

Frontend: React

Backend: Node.js, Express

Database: MongoDB

Auth: JWT

Challenges

  • Preventing double payment on network retry when Stripe webhooks arrive out of order
  • Keeping three separate frontend experiences maintainable without significant code duplication
  • Role changes needing to reflect immediately without forcing re-login

Solutions

  • Stripe webhook handler checks an idempotency key before processing; already-handled events are logged and exited early
  • Dashboard layouts share a common shell component; only the data-fetching hooks and route guards differ per role
  • On role change, a silent token refresh endpoint issues a new JWT with the updated role claim; the frontend swaps the stored token without redirecting

Future Improvements

  • Escrow model — Buyer funds locked on task post, released on worker approval
  • Worker reputation scoring based on approval rate and dispute history
  • Task category browsing with skill-tag and budget-range filtering