Skip to content

dhirajCodes543/TaskFlow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

βš™οΈ TaskFlow

TaskFlow is a real-time, event-driven collaborative task orchestration system that combines group-based coordination, priority scheduling, and parallel worker execution β€” all while persisting chat and job data in MongoDB.

Live demo: https://1taskflow.netlify.app/


🧠 Overview

TaskFlow lets users create or join groups, assign jobs, chat, and coordinate workflows β€” all in real time.
It’s powered by Redis (Upstash), BullMQ, and Socket.io, and built using React, Zustand, and Firebase Auth on the frontend.

When a new job or message is created, it’s broadcast instantly to every group member.
All data (groups, members, jobs, and chat messages) is stored in MongoDB β€” so even if users disconnect, they can return and see the full history.


🧩 Key Features

πŸ‘₯ Group Collaboration

  • Create a new group or join via a unique invite code.
  • All members receive instant notifications when someone joins.
  • Real-time group chat using Socket.io.
  • Chats and messages are stored in MongoDB for persistence.

⚑ Job Scheduling & Execution

  • Each group defines a number of workers (different from group members).
  • Any member can assign jobs to the queue.
  • Jobs are processed by workers based on priority scheduling (like an OS scheduler).
  • Multiple workers run in parallel, ensuring efficient job throughput.
  • Jobs are simulated executions (for demo purposes), with retry logic if a job fails.
  • Job results and statuses are stored in MongoDB.

πŸ”„ Event-Driven Architecture

  • Uses Pub/Sub model with Redis (Upstash) to broadcast events across the system.
  • BullMQ manages job queues and worker execution.
  • Every key event (job added, job completed, member joined, message sent) is published and delivered in real time.

πŸ’Ύ Data Persistence

  • MongoDB stores:
    • Groups & members
    • Jobs & their statuses
    • Chat messages
  • When users reload or revisit the page, all past data (messages + jobs) is restored automatically.

πŸ” Authentication

  • Secure login and group access via Firebase Authentication.
  • Users are identified and authorized before accessing any group or task data.

🧰 Tech Stack

Frontend

  • React (Vite)
  • Tailwind CSS
  • Zustand (global state)
  • Firebase Auth
  • Socket.io-client (real-time updates)

Backend

  • Node.js (Express)
  • Redis (Upstash, message broker)
  • BullMQ (job queue management)
  • MongoDB (persistent storage)
  • Socket.io (real-time events)
  • Event-driven system design

Deployment

  • Frontend β†’ Netlify
  • Backend β†’ Render (Node.js + Redis + MongoDB)

🧠 Architecture Overview

  1. User logs in via Firebase Auth.
  2. User can create or join a group using a unique code.
  3. Each group has:
    • A set of members (real people).
    • A defined number of workers (parallel job executors).
  4. Any member can add jobs to the group queue.
  5. BullMQ + Redis (Upstash) manages the queue β€” highest priority job executes first.
  6. Socket.io broadcasts updates (new jobs, completions, messages) to all connected clients.
  7. MongoDB stores all messages and job history for persistence.
  8. Jobs are simulated; failures can retry a limited number of times.

Deployment - Frontend β†’ Netlify - Backend β†’ Node.js + Redis + MongoDB (local/cloud)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages