Skip to content

sonalidudhia/taskmaster

Repository files navigation

TaskMaster 🏗️

Task management for construction projects with WhatsApp integration.

Features

  • Create projects and assign tasks to workers
  • Send tasks to workers via WhatsApp
  • Workers reply with photo proof
  • Real-time status tracking
  • Employee monitoring dashboard

Tech Stack

  • Frontend: Vanilla JS + CSS (hosted on Vercel/Netlify)
  • Backend: Supabase (Database, Auth, Storage)
  • WhatsApp: Clawdbot integration

Setup

1. Supabase Setup

  1. Create a free account at supabase.com
  2. Create a new project
  3. Run the SQL in supabase/schema.sql in the SQL Editor
  4. Create a storage bucket called task-proofs
  5. Copy your project URL and anon key

2. Environment

Create .env with:

VITE_SUPABASE_URL=your-project-url
VITE_SUPABASE_ANON_KEY=your-anon-key

3. Run Locally

npm install
npm run dev

4. Deploy

Push to GitHub and connect to Vercel/Netlify for auto-deploy.

Clawdbot Integration

The app uses Clawdbot's WhatsApp gateway to:

  • Send task assignments to workers
  • Receive photo proofs from workers
  • Update task status automatically

See CLAWDBOT.md for integration details.

WhatsApp Reply Handling

We have added WhatsApp reply handling to the TaskMaster system. This feature allows the system to process WhatsApp messages for completing tasks, validate task codes, handle task image uploads, and update task statuses in the Supabase database.

Key Features

  • Listens for WhatsApp messages starting with TASK#.
  • Validates the task code included in the message.
  • Expects an image attachment with the message for processing.
  • Updates the task's status in Supabase to completed when validation succeeds.
  • Sends confirmation or error messages back to the sender.

How It Works

  1. Setup
    • Install required dependencies: npm install (Ensure @adiwajshing/baileys is installed.)
    • Add your Supabase credentials to supabase.js or directly in src/whatsappReplyHandler.js.
  2. Run
    • Start the bot: node src/whatsappReplyHandler.js.
  3. Process
    • The bot listens for WhatsApp messages and processes them using the above logic.

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published