Dominic's Tasks - Implementation Plan v3
Version: 3.1 Architecture: Multi-Child Family with Parent Approval Workflow Last Updated: January 19, 2026 Author: MiniMax Agent
---
Overview
This document outlines the implementation plan for v3 of Dominic's Tasks, which introduces a multi-child family structure with a comprehensive parent approval workflow for task completion.
Architecture Summary
Data Structure (v2)
families/{familyId}
├── settings: FamilySettings
├── children:
│ ├── {childId}: ChildProfile
│ │ ├── stats: { totalEP, level, currentStreak, tasksCompleted, totalTasks }
│ │ └── settings: { defaultApprovalLevel, ... }
│ └── {childId2}: ChildProfile
└── approvals:
├── {approvalId}: TaskApproval
└── (query: where status == 'pending')families/{familyId}/children/{childId}/tasks/{taskId}
├── Task document (with approvalStatus, approvalId fields)
└── comments:
└── {commentId}: Comment
Approval Levels
---
Implementation Status - January 19, 2026
✅ Completed Features (Today's Updates)
#### Critical Fixes
updateFamilySettings function that prevented new family registrationsrc/components/FamilySetupScreen.tsx
- Change: Imported updateParentSettings from FamilyContext and integrated directly into handleCreateProfilesrc/components/ParentDashboard.tsx
- Changes:
- Imported useTasks hook with pendingApprovals, approveTaskCompletion, rejectTaskCompletion
- Created displayApprovals memoized transform to convert TaskApproval records to display format
- Replaced mock data with real-time approval data
- Implemented working approve/reject handlers connected to TasksContext
- Added human-readable approval level labels using APPROVAL_LEVELS configuration
- Enhanced approval cards with child avatar, theme color, and evidence indicatorssrc/components/TaskCard.tsx
- Changes:
- Added getStatusStyles() function for conditional card styling
- Implemented yellow border/background for pending_approval state
- Implemented green border/background for done state
- Added "Waiting for Parent" badge with clock icon for pending tasks
- Disabled completion checkbox for pending approval tasks
- Added appropriate hover states and transitionssrc/components/Layout.tsx
- Changes:
- Imported useFamily hook
- Added conditional rendering for child mode vs parent mode
- Child mode now shows selected child's avatar, name, level, EP, and streak
- Parent mode shows simplified "Parent Mode" indicatorsrc/pages/Tasks.tsx
- Changes:
- Added useFamily hook for currentProfileId
- Updated restoreTasks to use families/{uid}/children/{profileId}/tasks path
- Added v2-specific fields (approvalStatus, approvalId) to restored tasks
- Added validation to ensure user and profile are selected before restoration#### Infrastructure
firestore.rules
- Features:
- Family isolation (only owner can access their family's data)
- Child profile management permissions
- Task CRUD with validation
- Approval workflow permissions (parents only can approve/reject)
- Chat and resource permissionssrc/services/migrateV1ToV2.ts
- Features:
- Authenticates user and validates authorization
- Creates family structure with child profile
- Migrates legacy v1 tasks to v2 structure
- Preserves all task data and timestamps
- Deletes legacy user documents
- Provides preview mode to check migration scope#### Documentation
dev/docs/03-audits-analysis/V2_CODEBASE_AUDIT.md
- Contents:
- Executive summary of codebase state
- Critical issues with severity ratings
- Context and data architecture review
- UI component analysis
- Parent dashboard deep dive
- Priority action items with status tracking
- Firestore data structure documentation
- Testing checklist
- Implementation roadmapdev/docs/README.md
- Added links to new audit report and migration utility---
File Structure (Updated)
dominicstasks/
├── src/
│ ├── App.tsx # Main app with routing
│ ├── main.tsx # Entry point
│ ├── context/
│ │ ├── AuthContext.tsx # Authentication
│ │ ├── FamilyContext.tsx # Family/child profiles
│ │ └── TasksContext.tsx # Task management + approvals
│ ├── components/
│ │ ├── Layout.tsx # Main layout (UPDATED: child stats)
│ │ ├── TaskCard.tsx # Task display (UPDATED: approval states)
│ │ ├── TaskModal.tsx # Add/edit task
│ │ ├── TaskColumn.tsx # Task column wrapper
│ │ ├── ProfileSelectionScreen.tsx # Child profile picker
│ │ ├── FamilySetupScreen.tsx # First-time setup (FIXED)
│ │ ├── ParentDashboard.tsx # Parent admin panel (UPDATED)
│ │ ├── PinPad.tsx # PIN entry component
│ │ ├── CommentsModal.tsx # Task comments
│ │ ├── CommentsPanel.tsx # Inline comments
│ │ └── ...
│ ├── pages/
│ │ ├── Tasks.tsx # Main tasks page (UPDATED: v2 paths)
│ │ ├── Calendar.tsx # Calendar view
│ │ ├── FamilyChat.tsx # Family messaging
│ │ ├── ParentChat.tsx # Parent-only chat
│ │ ├── History.tsx # Completed tasks history
│ │ ├── Achievements.tsx # Achievement badges
│ │ ├── Resources.tsx # Learning resources
│ │ └── Login.tsx # Login page
│ ├── services/
│ │ ├── firebase.ts # Firebase configuration
│ │ ├── devMode.ts # Development utilities
│ │ ├── googleDrive.ts # Google Drive integration
│ │ └── migrateV1ToV2.ts # v1 data migration (NEW)
│ ├── types/
│ │ └── index.ts # TypeScript types
│ ├── utils/
│ │ └── index.ts # Utility functions
│ └── index.css # Global styles
├── firestore.rules # Firestore security rules (NEW)
├── package.json
└── tailwind.config.js
---
Context Dependencies
AuthContext
user, firebaseUser, signIn, signOut, isParent, isAuthorizedFamilyContext
family, currentProfile, profiles, selectProfile, enterParentMode, etc.TasksContext
tasks, completeTask, approveTaskCompletion, rejectTaskCompletion, pendingApprovals---
Setup Instructions
First-Time Setup
Adding New Child (Parent Mode)
Configuring Approval Levels
Approving Tasks
---
Rollout Plan - Updated
Phase 1: Core Infrastructure ✅ COMPLETE
Phase 2: Integration & Security ✅ COMPLETE
Phase 3: Testing & Polish 🚧 IN PROGRESS
Phase 4: Launch 📋 PENDING
---
Known Issues & Workarounds
---
Testing Checklist
Unit Tests (Pending)
Integration Tests (Pending)
E2E Tests (Pending)
---
Next Steps
Immediate (This Session)
This Week
Before Launch
---
Related Documentation
---
Summary of Changes (January 19, 2026)
Files Modified
src/components/FamilySetupScreen.tsx - Fixed setup wizardsrc/components/ParentDashboard.tsx - Real approval data integrationsrc/components/TaskCard.tsx - Approval state visualssrc/components/Layout.tsx - Child profile statisticssrc/pages/Tasks.tsx - v2 Firestore pathsFiles Created
firestore.rules - Firestore security rulessrc/services/migrateV1ToV2.ts - v1 to v2 data migrationdev/docs/03-audits-analysis/V2_CODEBASE_AUDIT.md - Comprehensive audit reportFiles Updated
dev/docs/README.md - Documentation indexdev/IMPLEMENTATION_PLAN_v3.md - This document---
Document Owner: Development Team Next Review: After Phase 3 completion Version: 3.1.0