Dominic's Tasks & Family Hub - Complete Implementation Plan

Version: 3.1 (with Task Comments & Admin Features) Project Name: dominicstasks Deployment URL: https://dominicstasks.pages.dev Firebase Project: dominics-tasks Last Updated: January 18, 2026

---

1. Executive Summary

This document outlines the comprehensive implementation plan for Dominic's Tasks & Family Hub, a gamified task management application enhanced with real-time family messaging, private parent communications, Google Drive document sharing, task comments with chat integration, and advanced task organization with types, deadlines, tags, and calendar views.

The application serves three users: Dominic (the primary student user) and his two parents, all of whom require equal access to view, edit, and manage the application's data. Version 3.1 introduces significant new features including a complete task comment system and admin delete capabilities.

---

2. Version 3.1 New Features

2.1 Task Comment System

The Task Comment System allows family members to add discussions directly to tasks. Comments appear both on the task detail view and automatically post to the Family Chat, creating a seamless communication flow.

Comment Badge on Task Cards:

  • Each task card displays a comment count badge (💬 icon with number)
  • Visible on the front of the card, near the EP value
  • Only appears when tasks have comments
  • Provides quick visibility into task activity
  • Comments Section in Task Modal:

  • When viewing or editing an existing task, a comments section appears
  • Shows all comments in a scrollable list
  • Displays author name, timestamp, and comment text
  • Allows adding new comments directly in the modal
  • Comments auto-post to Family Chat for visibility
  • Auto-Post to Family Chat:

  • When a comment is added to a task, it automatically posts to Family Chat
  • Format: "💬 Comment on "Task Title": Comment text"
  • System message format for easy identification
  • Includes task reference for context
  • Data Structure:

    // Task comments subcollection: tasks/{taskId}/comments
    {
      id: "comment_id",
      text: "Don't forget to...",
      authorId: "user_uid",
      authorName: "Parent Name",
      authorEmail: "parent@example.com",
      timestamp: serverTimestamp(),
    }

    // Task document update { commentCount: 5, // Denormalized count for quick display }

    2.2 Admin Delete Capability

    Admin Users:

  • derrickmg.admin@gmail.com (Primary Admin)
  • brendamgiles@gmail.com (Secondary Admin)
  • Capabilities:

  • Delete ANY message in Family Chat (not just own messages)
  • Confirmation prompt when deleting others' messages
  • Visual indicator shows "Admin Delete" option
  • Maintains family chat cleanliness for testing
  • Implementation:

  • Admin check: ADMIN_EMAILS.includes(user.email)
  • Menu appears on all messages for admin users
  • Delete option shows "Admin Delete" when deleting others' messages
  • Confirmation dialog: "Delete message from [Sender Name]?"
  • ---

    3. Recent Changes (January 18, 2026)

    Culture Rebrand - Gaming Terms to Productivity Terms

    The application has been updated to remove gaming terminology and replace it with more productive, positive language:

    Old TermNew TermDescription

    XPEPExperience Points → Energy Points First BloodFirst StepFirst task completion achievement TerrorMomentum BuilderHigh-level achievement (Level 10) Computer WizardComputer ChampionCS subject achievement 8 AM Early Bird10 AM Early BirdChanged achievement time threshold

    Files Updated:

  • src/types/index.ts - All type definitions updated
  • src/utils/index.ts - All utility constants updated
  • src/pages/Achievements.tsx - Achievement names and logic updated
  • src/pages/History.tsx - Statistics display updated
  • All related components and pages
  • ---

    4. Application Overview

    Pages (8 Total)

  • Login - Google Sign-In with access control
  • Tasks - Main task management interface with drag-and-drop and comment badges
  • Calendar - Monthly view with deadlines and task visualization
  • Family Chat - WhatsApp-style messaging for all family members
  • Parent Chat - Private parent messaging (hidden from Dominic)
  • Task Comments - Dedicated discussion threads for specific tasks (integrated in modal)
  • Resources - Google Drive document sharing
  • History - Statistics, EP (Energy Points), and achievements
  • Key Features

  • ✅ Task types (Regular, Assignment, Exam, Project, Personal)
  • ✅ Tags (Subject-based: Math, Science, English, etc.)
  • ✅ Priority levels (Low, Medium, High, Urgent)
  • ✅ Deadline management with countdown
  • ✅ Gamification (EP, streaks, levels)
  • ✅ Family chat (WhatsApp-style)
  • ✅ Private parent chat (hidden from Dominic)
  • ✅ Google Drive integration with file picker
  • Task Comments with badge on card front
  • Comments auto-post to Family Chat
  • Admin delete any message
  • ✅ Real-time synchronization
  • ✅ Mobile-responsive design
  • ---

    5. User Interface Design

    5.1 Task Card Design

    The task card displays key information with comment count visible on the front:

    ┌─────────────────────────────────────────────────┐
    │ ☑  📋 [Assignment] [High]                       │
    │                                                 │
    │  Math Homework                                  │
    │  Pages 45-47                                    │
    │  #math #homework                                │
    │                                                 │
    │  📅 Due today          ⭐ 50 EP    💬 3        │
    └─────────────────────────────────────────────────┘
    

    Comment Badge Features:

  • Position: Right side of footer, before actions menu
  • Icon: 💬 (MessageCircle)
  • Color: Gray background (#F3F4F6)
  • Only visible when commentCount > 0
  • 5.2 Task Modal Comments Section

    When viewing or editing an existing task, the modal includes a comments section:

    ┌─────────────────────────────────────────────────┐
    │  Edit Task                          [X]        │
    ├─────────────────────────────────────────────────┤
    │  Task Title                                    │
    │  [Description...]                              │
    │  [Task Type][Section][Priority]                │
    │  [Dates][EP Value][Tags]                       │
    ├─────────────────────────────────────────────────┤
    │  💬 Comments (3)                               │
    │  ┌─────────────────────────────────────────┐   │
    │  │ 👤 Parent Name - Jan 18, 10:30 AM       │   │
    │  │ Don't forget to check your work!        │   │
    │  └─────────────────────────────────────────┘   │
    │  ┌─────────────────────────────────────────┐   │
    │  │ 👤 Parent Name - Jan 18, 9:15 AM        │   │
    │  │ Good luck on this one!                  │   │
    │  └─────────────────────────────────────────┘   │
    │  ┌─────────────────────────────────────────┐   │
    │  │ 👤 Parent Name - Jan 17, 4:00 PM        │   │
    │  │ Let me know if you need help            │   │
    │  └─────────────────────────────────────────┘   │
    │  [Add a comment...                        ➤]   │
    │  Comments will also appear in Family Chat       │
    ├─────────────────────────────────────────────────┤
    │  [Cancel]                          [Update]    │
    └─────────────────────────────────────────────────┘
    

    5.3 Family Chat Integration

    When a comment is added, it appears in Family Chat as:

    ┌─────────────────────────────────────────────────┐
    │  💬 Comment on "Math Homework": Don't forget    │
    │  to check your work!                             │
    │  10:30 AM                                       │
    └─────────────────────────────────────────────────┘
    

    ---

    6. Data Structure

    6.1 Tasks Collection (tasks)

    {
      id: "auto_generated_id",
      title: "Math Homework",
      description: "Pages 45-47",
      dueDate: timestamp,
      deadlineDate: timestamp,
      status: "todo" "today" "done",
      section: "morning" "afternoon""assignments""leftovers""experiments" "support",
      taskType: "regular" "assignment""exam""project" "personal",
      priority: "low" "medium""high" "urgent",
      tags: ["math", "homework", "weekly"],
      createdBy: "user_email",
      createdAt: timestamp,
      pointsValue: 50,
      completedAt: null | timestamp,
      order: 1,
      commentCount: 3, // NEW: Denormalized comment count
    }
    

    6.2 Task Comments Subcollection (tasks/{taskId}/comments)

    {
      id: "comment_id",
      text: "Don't forget to check your work!",
      authorId: "user_uid",
      authorName: "Parent Name",
      authorEmail: "parent@example.com",
      timestamp: serverTimestamp(),
    }
    

    6.3 Family Messages Collection (family_messages)

    {
      id: "message_id",
      text: "💬 Comment on \"Math Homework\": Don't forget to check your work!",
      senderId: "user_uid",
      senderName: "Parent Name",
      senderEmail: "parent@example.com",
      timestamp: serverTimestamp(),
      type: "system",
      systemEvent: "task_comment",
      relatedTaskId: "task_id",
      attachments: [],
      reactions: {},
    }
    

    ---

    7. Technical Implementation

    7.1 TasksContext Changes

    New Functions:

    // Add a comment to a task and auto-post to Family Chat
    addTaskComment: (taskId: string, taskTitle: string, text: string) => Promise<void>

    // Get all comments for a task getTaskComments: (taskId: string) => Promise<any[]>

    Implementation Details:

  • Add comment to tasks/{taskId}/comments subcollection
  • Increment commentCount on parent task document
  • Auto-post formatted message to family_messages collection
  • Handle errors gracefully (chat post failure doesn't fail comment)
  • 7.2 TaskCard Changes

    Comment Badge Display:

    {(task.commentCount || 0) > 0 && (
      <div className="flex items-center space-x-1 text-gray-500 bg-gray-100 px-2 py-1 rounded-full">
        <MessageCircle size={14} />
        <span className="font-medium">{task.commentCount}</span>
      </div>
    )}
    

    7.3 TaskModal Changes

    Comments Section:

  • Only visible when editing existing task (taskToEdit?.id exists)
  • Fetches comments on mount via getTaskComments()
  • Displays comments in scrollable list
  • Input form with Send button
  • Auto-post notice for users
  • 7.4 FamilyChat Admin Features

    Admin Detection:

    const ADMIN_EMAILS = ['derrickmg.admin@gmail.com', 'brendamgiles@gmail.com'];
    const isAdmin = user?.email && ADMIN_EMAILS.includes(user.email);
    

    Admin Delete UI:

  • Three-dot menu visible on ALL messages for admin users
  • Delete option shows "Admin Delete" for others' messages
  • Confirmation dialog with sender name
  • Normal delete for own messages
  • ---

    8. Gamification System

    8.1 Experience Points (EP)

  • Base EP: 50 points per task completion
  • Parent-adjustable: Point values can be set per task (1-1000)
  • 20% bonus: For completing all tasks in a section
  • 10% punctuality bonus: For completing before due date
  • Streak bonus: 25 EP base + 5 EP per consecutive day
  • 8.2 Level Progression

  • Formula: Level = floor(TotalEP / 1000)
  • Level-up celebrations: Animations and notifications
  • Milestone messages: System messages in Family Chat
  • 8.3 Updated Achievements (v3.1)

    Daily Achievements:

  • First Step (was First Blood) - Complete first task
  • Week Warrior - Complete 7 tasks in a week
  • Month Master - Complete 30 tasks in a month
  • Subject Achievements:

  • Math Master - Complete 20 math tasks
  • Science Scholar - Complete 20 science tasks
  • Computer Champion (was Computer Wizard) - Complete 20 CS tasks
  • Time Achievements:

  • Early Bird - Complete task before 10 AM (updated from 8 AM)
  • Night Owl - Complete task after 8 PM
  • 7-Day Streak - Maintain 7-day streak
  • 30-Day Streak - Maintain 30-day streak
  • Special Achievements:

  • Century Club - Complete 100 tasks
  • Momentum Builder (was Terror) - Reach Level 10
  • Jack of All Trades - Complete one of each task type
  • ---

    9. User Roles and Permissions

    RoleEmailAccess

    Studentdominicgiles691@gmail.comTasks, Calendar, Chat, Resources, History Parent 1 (Admin)derrickmg.admin@gmail.comAll features + Parent Chat + Admin Delete Parent 2 (Admin)brendamgiles@gmail.comAll features + Parent Chat + Admin Delete

    ---

    10. Deployment

    Production Deployment

    Build the project

    cd /workspace/dominicstasks npm run build

    Deploy to Cloudflare Pages (Production)

    npx wrangler pages deploy ./dist --project-name=dominicstasks --branch=production

    Important: Always use --branch=production to update the main URL.

    Deployment URLs

  • Main URL: https://dominicstasks.pages.dev
  • Production Alias: https://production.dominicstasks.pages.dev
  • Preview URLs: Hash-based URLs for each deployment
  • ---

    11. Testing Checklist

    Task Comment Features

  • [ ] Comment badge appears on task cards with comments
  • [ ] Comment count is accurate (matches number of comments)
  • [ ] Comments section appears when editing existing task
  • [ ] Comments display with author, time, and text
  • [ ] Adding a comment works correctly
  • [ ] Comment auto-posts to Family Chat
  • [ ] Comment count increments after adding comment
  • [ ] Reloading page preserves comments and count
  • Admin Delete Features

  • [ ] Admin can delete own messages
  • [ ] Admin can delete others' messages
  • [ ] Confirmation prompt appears for others' messages
  • [ ] "Admin Delete" label shows for others' messages
  • [ ] Regular users can only delete own messages
  • Culture Rebrand

  • [ ] "Computer Champion" appears instead of "Computer Wizard"
  • [ ] "First Step" appears instead of "First Blood"
  • [ ] "Momentum Builder" appears instead of "Terror"
  • [ ] EP terminology used throughout
  • [ ] Early Bird shows "before 10 AM"
  • ---

    12. Version History

    VersionDateMilestone

    1.0InitialPlanning and requirements 2.0Jan 2026Messaging and Drive features 2.1Jan 2026Task types, tags, calendar 2.2Jan 15, 2026Full application build & deployment 2.4Jan 16, 2026Enhanced chat (editing, reactions, attachments) 3.0Jan 18, 2026Culture Rebrand & Task Comments 3.1Jan 18, 2026Admin Delete & Comment Refinement

    ---

    13. Summary

    Version 3.1 of Dominic's Tasks introduces powerful new communication features:

    Task Comments System:

  • Comments visible on task cards (front-facing badge)
  • Dedicated comments section in task modal
  • Automatic posting to Family Chat
  • Real-time synchronization across devices
  • Admin Capabilities:

  • Parents can delete any message in Family Chat
  • Confirmation prompts prevent accidental deletion
  • Maintains chat cleanliness for testing
  • Culture Refinements:

  • Replaced gaming terminology with productive language
  • Updated achievement names and thresholds
  • Maintains motivation while improving tone
  • The application is live at https://dominicstasks.pages.dev with all new features deployed and functional.

    ---

    Document Version: 3.1 Last Updated: January 18, 2026 Maintained by: MiniMax Agent