Skip to content

Pedrom2002/dueit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dueit

CI TypeScript Expo SDK Coverage License: MIT

A couple-focused household management app built with React Native and Firebase. Dueit helps partners organize tasks, track responsibilities, detect burnout, and stay in sync — in real-time, with AI-powered insights.

Features

Task Management

  • Smart task CRUD — Create, assign, prioritize (5 levels), and complete tasks with subtasks (mental/physical typed)
  • Recurring tasks — Daily, weekly, monthly, yearly with interval, day-of-week selection, and auto next-instance creation
  • Swipe gestures — Swipe right to complete, left for edit/defer/delete
  • Drag-to-reorder — Custom sort order via drag-and-drop
  • Quick add — Fast task creation from any screen, with natural language parsing
  • Task templates — Pre-built templates for common household tasks
  • Subtasks — Inline creation with mental/physical type tagging for load analysis
  • Task comments & reactions — Threaded comments with emoji reactions (love, star, fire, clap, laugh)
  • Photo proof — Attach completion photos via camera or gallery
  • Soft-delete with undo — Recoverable task deletion with snackbar undo

Couple System

  • Secure pairing — 12-character invite codes (crypto.getRandomValues, 32^12 combinations, 7-day expiry)
  • Real-time sync — Firestore onSnapshot subscriptions (limit: 500 docs) with TanStack Query cache
  • Nudge system — Gentle partner reminders, rate-limited to 1 per task per 24h
  • Fairness scoring — Monthly task distribution analysis per partner and category

Statistics & Analytics

  • KPI dashboard — Completed tasks, completion rate, on-time rate, overdue count
  • Couple balance — Fairness score with per-partner breakdown and visual balance bar
  • Weekly trend — 4-week stacked bar chart by partner
  • Category breakdown — Per-category task distribution (top 6)
  • Mental load card — Mental vs physical load per partner with imbalance alerts
  • Insights — Avg completion time, most productive day, created vs completed ratio
  • Shareable stats — Generate stats cards to share externally

Gamification

  • XP system — Points per task completion with level progression
  • Streaks — Current and longest streak tracking with visual badges
  • Badges — Unlockable achievements (early bird, category master, etc.)
  • Celebrations — Full-screen confetti and emoji animations on milestones
  • Level badges — Visual progression ring with current level display

Burnout Detection

8 behavioral signals analyzed over a rolling 14-day window:

Signal What it detects
Volume overload Completing >65% of couple's tasks
Priority concentration Handling >70% of urgent/high tasks
Mental load imbalance >65% of mental-type subtasks
Velocity drop >40% week-over-week completion decrease
Overdue accumulation 3+ overdue tasks assigned
No rest days Active 12+ of 14 days
Late-night pattern >30% completions after 10 PM
Backlog pressure Tasks created 1.3x faster than completed
  • 4 risk levels: low, moderate, high, critical
  • AI-powered personalized recommendations (Gemini 2.5 Flash)
  • Empathetic UI with GlassCard design, Reanimated animations
  • Conversation starters for couples to discuss workload balance
  • Minimum 10 tasks required to avoid false positives

AI Features (Gemini 2.5 Flash via Firebase AI)

  • Quick add NLP — Natural language parsing for task creation (detects dates, priority, assignee)
  • AI task generation — Generate tasks from templates or free-text prompts with Zod-validated output
  • Auto-classification — Batch task categorization and priority inference
  • AI chat — General household conversation assistant
  • AI meal planning — Weekly menu suggestions with recipes
  • AI shopping — Smart shopping list suggestions based on household patterns
  • AI monthly insights — Monthly analysis of task patterns and trends
  • AI quarterly reports — Comprehensive quarterly performance review
  • Daily tips — Contextual household advice, refreshed daily
  • Weekly summary — AI-generated narrative summary (Sundays)
  • Redistribution suggestions — AI-powered task rebalancing recommendations
  • Recurring pattern detection — Identifies repeated tasks that should be recurring
  • All AI calls cached in MMKV (12h-30d TTLs), PII-sanitized before sending

Monthly Retrospectives

  • Auto-prompted — Shown on the 2nd of each month
  • Structured reflection — Highlights, improvements, gratitude sections
  • Fairness scoring — Weekly fairness breakdown (4-week analysis)
  • AI insights — Gemini-generated insights and action items (3 each, cached 24h)
  • History — Browse last 12 retrospectives

Calendar & Events

  • Monthly calendar view — Events and tasks displayed as colored dots
  • Event CRUD — Create, edit, delete calendar events with time ranges and colors
  • Calendar sync — Export tasks to device calendar (expo-calendar)

Shopping List

  • Categorized items — 10 categories (produce, dairy, meat, bakery, frozen, pantry, beverages, household, personal, other)
  • Check/uncheck — Mark items as purchased
  • Clear completed — Bulk remove purchased items
  • Shopping reminders — Widget on today screen

Shared Notes

  • Note CRUD — Create and edit notes (max 10,000 chars)
  • 9 categories — General, passwords, contacts, insurance, medical, financial, household, travel, other
  • Pin/unpin — Pin important notes to the top
  • Search — Full-text note search
  • Pinned notes widget — Quick access on today screen

Inventory Management

  • Household inventory — Track items with name, category, condition, location, tags
  • Condition tracking — Excellent, good, fair, poor
  • Photo attachments — Document items with photos
  • Search & filter — By category, condition, and tags

Notifications

  • Push notifications — FCM + expo-notifications with 4 channels (reminders, partner activity, achievements, summary)
  • Task reminders — Configurable: at due time, 15min, 30min, 1h, or 1 day before
  • Daily briefing — Morning summary at 8 AM with task counts and streak
  • Weekly summary — Sunday evening wrap-up with partner breakdown
  • Quiet hours — Configurable silent period for notifications
  • Interactive actions — Mark done, snooze 1h, or view directly from notification

Offline Support

  • MMKV mutation queue — Queued create/update/delete operations
  • Multi-collection sync — Tasks, categories, events, notes, shopping, inventory
  • Auto-replay on reconnect — Mutations applied automatically when back online
  • Create-update merge — Optimized queue that merges sequential mutations
  • Delete supersedes — Delete cancels pending updates for same document
  • 7-day purge — Stale mutations auto-cleaned
  • Offline banner — Real-time connectivity indicator

Security & Encryption

  • Client-side encryption — AES-256-GCM for sensitive fields
  • Argon2id KDF (v2) with application pepper + legacy PBKDF2 (v1) migration
  • Firestore rules — 280+ lines, deny-by-default, couple-scoped access
  • Field-level validation — String length, type checks, immutable field protection
  • Rate limiting — Nudges (30s), invite codes (60s), via Firestore rules
  • App Check — ReCaptcha Enterprise in production
  • PII scrubbing — No personal data in logs (Sentry DSN-guarded)
  • Key recovery — Modal for recovering encryption access

Accessibility

  • 86+ accessibility attributes across 21 components
  • accessibilityRole on all interactive elements (buttons, headers, alerts, search, progressbar)
  • accessibilityLiveRegion="assertive" on OfflineBanner, "polite" on GlobalSnackbar
  • prefersReducedMotion disables confetti, FadeIn, and FadeInDown animations
  • Full i18n of accessibility strings (PT + EN)
  • WCAG AA color contrast (4.5:1 minimum)
  • 44px minimum touch targets on all interactive elements

Localization

  • Full Portuguese (PT-PT) and English support
  • 200+ translation keys per language
  • Language persistence in MMKV
  • Localized date/time formatting
  • Pluralization support (i18next)

Tech Stack

Layer Technology Why
Framework React Native 0.83 + Expo SDK 55 Cross-platform, New Architecture, Bridgeless
Navigation Expo Router v4 Typed routes, file-based routing
Backend Firebase 12 (Auth + Firestore + FCM + App Check + Vertex AI) Real-time sync, serverless
Server State TanStack Query v5 + MMKV persistence Optimistic updates, cache management
Client State Zustand 5 (7 stores) Lightweight, no boilerplate
Forms React Hook Form + Zod 4 Type-safe validation, minimal re-renders
UI React Native Paper v5.15 (MD3) Material Design 3 components
Animations Reanimated 4 + Gesture Handler Native-thread animations, swipe gestures
Persistence MMKV v4 Fastest key-value store for React Native
i18n i18next Industry standard, pluralization
AI Firebase AI (Gemini 2.5 Flash / Flash Lite) Template-grounded generation, Zod-validated
Subscriptions RevenueCat IAP with entitlement gating
Monitoring Sentry Crash reporting, DSN-guarded
Testing Jest 30.2 + Testing Library 118 suites, 2257 tests, 95%+ coverage
E2E Maestro 37 flows on Android emulator in CI
CI/CD GitHub Actions + EAS Build Lint, typecheck, test, E2E, preview builds
Security CodeQL + Dependabot Weekly security scanning, dependency updates

Architecture

app/                          # Expo Router screens (file-based routing)
├── (auth)/                   # Auth flow: login, register, onboarding, pairing
├── (tabs)/                   # Main tabs: today, tasks, create, stats/more, account
├── task/                     # Task detail [id] & creation (new)
├── more/                     # Sub-screens: calendar, shopping, notes, inventory, retro
└── ai-*.tsx                  # AI feature screens: chat, menu, shopping, insights, wizard

src/
├── components/               # 70+ reusable UI components
├── hooks/                    # 25 custom hooks
├── services/                 # 26 Firebase service modules
├── stores/                   # 7 Zustand stores (auth, ui, toast, subscription, celebration, createForm, undo)
├── theme/                    # Design system tokens (colors, spacing, elevation, typography)
├── types/                    # TypeScript type definitions
├── utils/                    # 16 utility modules
├── validation/               # Zod schemas (task, AI, inventory)
├── i18n/                     # Translation files (pt, en)
├── data/                     # Static data (templates, defaults)
└── providers/                # React context providers (QueryProvider)

Design System

Token Values
Primary Indigo #6366F1
Secondary Pink #EC4899
Font Inter (Regular / Medium / SemiBold) via @expo-google-fonts
Neutrals Slate scale (50–900)
Dark theme Deep slate (not pure black)
Border radius sm(8) / md(12) / lg(16) / xl(24) / full(9999)
Elevation sm / md / lg / xl shadow system
Components GlassCard (frosted glass), GradientHeader, PressableScale

Data Model

Firestore
├── couples/{coupleId}
│   ├── tasks/{taskId}                # Tasks (CRUD, subtasks, recurrence, reactions)
│   ├── categories/{catId}            # Custom categories per couple
│   │   └── subcategories/{subId}     # Category subcategories
│   ├── shoppingItems/{itemId}        # Shopping list
│   ├── notes/{noteId}                # Shared notes (pinnable)
│   ├── events/{eventId}              # Calendar events
│   ├── inventoryItems/{itemId}       # Household inventory
│   ├── retrospectives/{monthKey}     # Monthly retrospectives
│   ├── streaks/{userId}              # Completion streak data
│   ├── badges/{userId}               # Unlocked badges
│   └── meta/{docId}                  # XP/level metadata
├── users/{userId}                    # User profiles, push tokens
├── nudges/{nudgeId}                  # Rate-limited nudge notifications
├── inviteCodes/{code}                # Invite code lookup (7-day TTL)
├── fcmTokens/{userId}                # FCM push tokens
└── rateLimits/{userId}/buckets/{a}   # Rate-limit tracking

All data is couple-scoped. Firestore security rules (280+ lines) enforce deny-by-default access with field-level validation and immutable field protection.

Getting Started

Prerequisites

  • Node.js 20+
  • Expo CLI (npm install -g expo-cli)
  • Firebase project with Auth + Firestore + FCM enabled

Setup

# Clone and install
git clone https://github.com/Pedrom2002/Dueit.git
cd Dueit
npm install --legacy-peer-deps

# Configure Firebase
cp .env.example .env
# Edit .env with your Firebase credentials

# Deploy Firestore rules
npx firebase-tools login
npx firebase-tools deploy --only firestore:rules

# Start development
npx expo start

Testing

npm test                # Run all tests (118 suites, 2257 tests)
npm run test:coverage   # Run with coverage report
npm run typecheck       # TypeScript type checking
npm run lint            # ESLint
npm run validate        # typecheck + lint + test (all at once)

E2E Tests

npm run e2e             # Run Maestro flows against running app
npm run e2e:emulators   # Run with Firebase emulators (isolated)

Deployment

Preview Build (Android)

npx eas-cli build --profile preview --platform android

Production Build

npx eas-cli build --profile production --platform android
npx eas-cli build --profile production --platform ios

CI/CD Pipeline

Job What it does
Install npm install with dependency cache
Lint + Typecheck ESLint + tsc --noEmit
Tests + Coverage Jest with 70% branch / 80% function thresholds
Expo Export Validates the bundle compiles
E2E Maestro on Android emulator (37 flows)
CodeQL Weekly security scanning
Dependabot Weekly npm + monthly GitHub Actions updates
Preview EAS preview builds on PRs
Release Production builds on semver tags

E2E Test Coverage

37 Maestro flows covering all features:

Category Flows Coverage
Auth 8 Login, register, logout, validation, onboarding, pairing
Tasks 11 CRUD, subtasks, comments, recurrence, search/sort, gestures
Navigation 1 More tab with all sub-screens
Calendar 1 Calendar view + event creation
Notes 2 Create + detail (edit/pin/delete)
Shopping 1 Add item + mark purchased
Stats 1 Extended stats with period/badges/streaks
Settings 4 Theme, language, GDPR export, dark mode
AI 1 AI wizard chat + task generation
Offline 1 Offline banner + queued task sync

Environment Variables

Required in .env (see .env.example):

Variable Description
FIREBASE_API_KEY Firebase Web API key
FIREBASE_AUTH_DOMAIN Auth domain (e.g. project.firebaseapp.com)
FIREBASE_PROJECT_ID Firebase project ID
FIREBASE_STORAGE_BUCKET Storage bucket (e.g. project.appspot.com)
FIREBASE_MESSAGING_SENDER_ID FCM sender ID
FIREBASE_APP_ID Firebase app ID

License

MIT

About

DueIt - Smart household task management app for couples. Built with React Native, Expo, Firebase & Gemini AI.

Resources

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors