TaskMaster is an intelligent platform for building good habits, structuring multi-task routines and breaking bad patterns. Powered by AI (Anthropic Claude / Google Gemini) and a gamification system with points redeemable for real rewards. Built with Zoneless Angular 19, Tailwind v4 with oklch tokens and ready to ship as a native mobile app via Capacitor.
Habit-tracking software has a default failure mode: it confuses motivation (an external trick) with agency (an internal capacity). The result is a treadmill of badges, streaks, push notifications and dopaminergic reinforcement loops that train the user to depend on the app rather than on themselves. The app becomes the addiction it claimed to cure.
TaskMaster refuses that frame. The thesis: the only honest job of a routine engine is to audit the environment of the person using it, then reflect — with mathematical conviction — the relationship between their actions and the outcomes they say they want. No applause for waking up. No streak-shame for missing a day. Just an implacable mirror.
In thermodynamic terms: a person without routines drifts toward entropy. A routine is directed energy applied to maintain structural order. The UI's job is not to celebrate the energy spent, but to reflect the reduction of noise — the quieter the interface gets, the more the user has won. The reward is not the next notification; it is the disappearance of the system from the user's day.
This stance forces a specific architecture. A motivational app can be sloppy because it's compensating in the dopamine layer. An audit engine cannot — every imprecision is a lie the user will eventually catch. Hence the four mandates below.
Four non-negotiable mandates drive every technical decision:
- Zoneless reactivity. No
zone.jshypervigilance. The framework only reacts to what was explicitly emitted through the signal graph. Result: 30 kB lighter initial bundle, 40–60 % faster boot, deterministic change detection. - Fine-grained signals.
signal/computed/linkedSignaleverywhere;effectreserved for infrastructure bridges (DOM, storage).BehaviorSubjectandasyncpipes erased from the codebase. - Atomic, deferred loading.
@deferwith dimensioned placeholders for the heaviest views — CLS = 0, intentionality required to consume a single extra byte. - Quiet UI on an oklch palette. Tailwind v4 CSS-first with
@theme, perceptually uniformoklch()colors, dual control state (action/calm) that flips theme-wide when the day's mandates are satisfied. Zero glassmorphism. Solid, brutalist contrast over translucent decoration.
The visible artefact of this doctrine is the conviction-button: tasks complete via sustained press-and-hold, not a single click. Friction is a feature, not a bug — high-impact actions must feel materially different from dismissing a notification.
- Design philosophy
- Project status
- Highlights — Phase 6 Iter 1 (Elevated Design System)
- Highlights — Iter 1 elevation
- Features
- Tech stack
- Architecture
- Install and scripts
- Capacitor (Android/iOS)
- Roadmap
- Contributing
- Support the project
| Phase | Description | Status |
|---|---|---|
| Phase 1 | Foundation (architecture, routing, models) | Completed |
| Phase 2 | Habit system (CRUD, streaks, calendar) | Completed |
| Phase 3 | Gamification (XP, levels, achievements, challenges) | Completed |
| Phase 4 | AI integration (Anthropic Claude + Google Gemini) | Completed |
| Phase 4.1 | Pre-backend elevation — Iter 1 (AI foundation) | Completed |
| Phase 4.2 | Pre-backend elevation — Iter 2–7 | In progress |
| Phase 5a | Routine domain models + localStorage repositories | Completed |
| Phase 5b | Routine services + habit-to-routine adapter | Completed |
| Phase 5c | Feature routines/ UI (index, today, detail, form) |
Completed |
| Phase 5d | Behavior tracking + scheduled reminders pipeline | Completed |
| Phase 5e | Adaptive engine + AI tools for routines + UI/UX elevation | Completed |
| Phase 5f | NestJS backend scaffolding | Pending |
| Phase 5g | HTTP repositories + Capacitor push real | Pending |
| Phase 5h | Rebrand: TaskMaster → ControlMaster | Pending |
| Phase 6 — Iter 1 | Elevated Design System (Zoneless + Signals + @defer + Quiet UI) | Completed |
| Phase 7 — MVP | Offline-first MVP (PIN auth, onboarding, PWA, backup) | Completed |
| Phase 6 — Iter 2 | Virtual scrolling, push notifications, advanced PWA cache | Pending |
The app now runs as a self-contained product while the backend is being built — no network required for any core flow, no third-party service required for any feature except optional AI calls.
- PIN setup (6 digits, configurable 4–8) created during onboarding via
AuthService.setupPin(). The PIN is never persisted; onlysalt+SHA-256(PBKDF2-derived key)are stored inlocalStorage['auth.user']. - PBKDF2 (250k iters, SHA-256) → AES-GCM-256 wrapper in
CryptoService. The derived key lives only in a private signal after unlock; it is wiped onlock()and onvisibilitychange → hidden. - Cooldown ladder on failed attempts: 3 → 30 s, 6 → 5 min, 9 → 30 min, 10 → reset required. Implemented in
AuthService.registerFailure. BiometricServicestub: web returnsweb-no-op, native bridge pending on the Capacitor build target. The lock page hides the biometric button when unavailable; no per-callsite branching.authGuardgates every authenticated route./lockand/onboarding/*opt out. Lock-on-background wired inAppComponent—visibilitychange → hiddeninvokesauth.lock().
- 6-step flow at
/onboarding/*: Welcome (name) → Goals (multi-select chips) → Templates (0–3 seed routines) → AI optional → PIN setup (two-pass confirmation) → Done. - Reusable
OnboardingShellComponentrenders the progress bar + navigation footer; each step page injects content. OnboardingServiceholds the draft as a signal;complete()invokesAuthService.setupPin+RoutineService.createfor each selected template.
- 10 pre-built routines in
TemplateCatalogService: morning routine, evening wind-down, workout, deep work, hydration, gratitude, weekly review, reading, cold + breath, post-workout stack. Each is a completeRoutineCreateRequest(name, icon, schedule, ordered tasks).
@angular/service-workerregistered viaprovideServiceWorkerwithregisterWhenStable:30000.ngsw-config.jsonprefetches app shell, lazy-caches assets, performance-caches Google Fonts for 30 days.public/manifest.webmanifestwith SVG icons (any + maskable purpose), standalone display, oklch-derived theme color.PwaInstallServicecapturesbeforeinstallprompt, exposes acanInstallsignal and aprompt()method; dismissal persists for 7 days before re-prompting.
BackupService.exportToBundle()walkslocalStorage, captures all app-owned keys (habits, routines, gamification, etc.), explicitly skipsauth.*to preserve at-rest security after import.downloadAsJson()builds a Blob and triggers a download (taskmaster-backup-YYYY-MM-DD.json).importFromFile(File)validatesapp === 'TaskMaster'andschemaVersionbefore wiping exportable keys and restoring; rejects future schemas or foreign bundles.clearAll()is the destructive nuclear option used by the Reset app action; the auth record is also wiped, the user is redirected to onboarding, and the app force-reloads.- All three are wired into
profile-pageunder a new Datos y cuenta card.
npm run build:prod→ green. Initial bundle 107 kB transfer (413 kB raw) including service worker registration. Service worker emits atdist/todo-app/browser/ngsw-worker.js.npm test→ 102/103 passing (1 pre-existing date-sensitive habit-insight spec, unrelated to this work).- 12 new specs introduced: 4 for
CryptoService, 8 forAuthService, 3 forTemplateCatalogService, 5 forBackupService. - Manual smoke: cold launch with empty
localStorage→ onboarding → name + 1 template + PIN → dashboard. Background → return → /lock. Wrong PIN ×3 → 30 s cooldown.
- Multi-user profiles on the same device.
- PIN recovery (loss of PIN = reset; documented in onboarding copy).
- Sync between devices and the NestJS backend (Phase 5f–g).
- Native biometric bridge wiring (
@aparajita/capacitor-biometric-authinstall + storage of biometric-protected derived key). - Self-hosted brutalist typography and full hero-gradient refactor (deferred from Phase 6 Iter 1).
npm run build:prod- Serve
dist/todo-app/browser/over HTTPS (orlocalhost). - Open in Chrome / Edge / Safari → install prompt appears (or use the browser menu → Install TaskMaster).
- App opens standalone; works offline after the first visit.
# One-time setup (requires Android Studio installed)
npm i @capacitor/android@latest
npx cap add android
# Each release
npm run build:prod
npx cap sync android
npm run cap:android # opens Android Studio → Run / build APKSame flow as Android, swap android for ios, requires Xcode.
The application was rewritten end-to-end across three layers — engineering (the change-detection substrate), aesthetics (the visual material) and attention (what the user is asked to consume) — so that each one expresses the same underlying stance: the framework reacts only to what was explicitly asked of it, the palette stays perceptually honest, and not a single byte of JavaScript is loaded before the user's intent requires it.
provideExperimentalZonelessChangeDetection()in src/app/app.config.ts.zone.jsremoved frompackage.jsonandangular.jsonpolyfills (test-only retention to preserve TestBed compatibility with the 80+ existing specs).ChangeDetectionStrategy.OnPushon 100 % of components (55/55), including the legacytodo/folder.BehaviorSubjectcount = 0.UiPreferencesServiceandTodoServicerewritten withsignal/computed/effect; an Observable façade is preserved viatoObservablefor backward compatibility.- State-exposing services (
HabitService,RoutineService,RoutineInstanceService,AdaptiveRecommendationsService,GamificationService) audited — all already signal-based; HTTP-boundary methods retainObservable<T>per the doctrine's HTTP-boundary exception. linkedSignalintroduced in the newControlStateService— derivesaction | calmfromHabitService.todayProgress()+RoutineInstanceService.todayInstances(), accepts manual override that auto-resets when the source re-emits.
- src/styles.css refactored to CSS-first
@themewith a completeoklch()token palette:surface-bg/fg/muted/border/subtle,conviction-core/strong/soft/fg,control-pass/fail,entropy-warn,audit-info. All hardcoded hex values removed. - Dual control state.
:root[data-control-state="calm"]flips the entire palette — the calm theme activates when the day's mandates are satisfied, driven by aneffect()inControlStateServicethat bridges todocument.documentElement.dataset.controlState. - Brand alias trick:
--color-indigo-{50,100,500,600,700,800}and--color-purple-{500,600,700}redirect tovar(--color-conviction-*). The 118 existingbg-indigo-600/text-indigo-700/ etc. utilities across 38 files inherit the dual theme without a single template touch. - Glassmorphism erased in the live tree.
backdrop-blurcount in non-legacy code = 0. Modal and level-up overlays usecolor-mix(in oklch, var(--color-surface-fg) 65 %, transparent)for opaque-feel backdrops. - Heavy shadows reduced.
shadow-xl/shadow-2xl→shadow-sm/shadow-mdacross achievement-toast, ai-coach-chat, level-up-modal. Borders 1–2 px replace elevation tricks.
@defer (on idle; prefetch on idle)wraps<app-ai-coach-chat />inAppComponent. The 50 kB chat module leaves the initial bundle and prefetches when the main thread goes idle.NgOptimizedImage— non-applicable (the repo uses zero<img>tags; all icons are emoji or inline SVG).ConvictionButtonComponentat src/app/shared/components/ui/conviction-button/. Press-and-hold 600 ms with aconic-gradientring that fills viaperformance.now()+requestAnimationFrame. Keyboard support (Space/Enterhold-to-trigger). Replaces the checkbox inTaskRowComponent. ElementInternals API was investigated but requirescustomElements.define()— out of scope for Angular components; the friction UX (the actual mandate) is preserved via signals + pointer events.
npm run build:prod→ green. Initial bundle 103 kB transfer (400 kB raw); lazy chunks split by route + AI coach.npm test→ 83 / 83 passing.- Contrast (oklch): action state ~17:1, calm state ~13:1, conviction-core on surface ~4.5:1 (WCAG AA).
- ElementInternals API: the original mandate called for native form-association via
attachInternals(). That API requires the component to be registered throughcustomElements.define(...), which Angular components are not by default. Wrapping the project in Angular Elements just for this one control would force a framework-wide concession to gain a single validation hook. The friction UX — the actual point — is preserved via signals + pointer events; the API integration is deferred until there is a second use case to justify it. - Test polyfill:
zone.js/testingis retained only in the Karma config (not in the runtime bundle) to keep the existing 80+ specs running without per-spec rewrites. The runtime is fully Zoneless; the test harness is a controlled, time-bounded exception. equal: byIdon entity arrays: tempting as a memoization shortcut but semantically wrong — when an entity mutates in place keeping the same id, the signal would suppress the change. Default reference equality is the correct primitive for arrays of mutable entities.
The AI layer graduated from text-only responses to a real execution layer. Highlights:
- Native tool-use from both providers. The coach chat now calls
create_habit,adjust_habitandarchive_habitthrough the Claude Tools API and Gemini Function Calling with a single provider-agnostic catalog. HabitInsightEngineService: deterministic signals (best day of week, best hour, anchor habit, habits at risk, perfect weeks/months, category stats) feed every AI prompt with real data — no more hallucinated numbers.- Prompts extracted to
src/app/core/prompts/(system, coach, insight, recommendation) with an insight block that injects patterns into the model context. - Action chips in the chat: when the AI executes a tool, a tappable chip appears under the reply summarizing the change (success/error status + link to the created resource).
- Tool loop with token budget (max 5 tool turns,
maxTokensbumped to 2048 when tools are active). - Dispatcher (
AIActionDispatcherService) validates tool args, calls the Observable-returningHabitServicevariants (createHabitReturning,updateHabitReturning,archiveHabitReturning) and correlates results bytoolCallId. AICoachRepositoryinterface + injection token ready for multi-session persistence (implementation landing in Iter 4).- Debt removed: dashboard
perfectWeeks/perfectMonthshardcode replaced by engine signals;gamification.serviceno longer writeslocalStoragedirectly (goes through repo via newsaveChallenges); rootapp.component.htmlboilerplate deleted. - Unit tests: Jasmine/Karma specs for
xp.utils,streak.utilsandHabitInsightEngineService.
The domain model evolved from flat Habit + HabitCompletion to a structured Routine → Task → RoutineInstance → TaskCompletion pipeline, absorbing the best ideas from the "Control" reference plan while keeping Angular 19 + Capacitor.
- Routine domain model (
src/app/models/routine.model.ts): discriminated unionScheduleConfig(daily/weekly/monthly/custom cron),RoutineInstancewith status lifecycle (Pending → InProgress → Completed | Skipped | Missed), per-task completion tracking withcompletion_score. - Behavior tracking pipeline (
BehaviorTrackerService): debounced queue (1.5s), batch flush to repository,visibilitychange→navigator.sendBeaconready for HTTP swap.BehaviorEventTypeenum covers 11 event types (routine_opened, task_checked, streak_continued, time_window_adjusted, etc.). - Scheduled reminders (
ScheduledReminderService): materializesScheduledReminder[]fromReminderPreferenceper routine, integrates CapacitorLocalNotificationsas local channel. Reminder channels: push, in_app, local. - 6 new repositories behind InjectionTokens:
RoutineRepository,RoutineInstanceRepository,TaskCompletionRepository,BehaviorRepository,ReminderRepository,RoutineStreakRepository— all with localStorage implementations and full specs. Swap to HTTP implementations in Phase 5g. - RoutineAdapterService:
Habitlegacy coexists as virtualRoutine(1 implicit task, no instances). Dashboard, achievements and AI tools continue working during transition. - Feature
routines/with lazy-loaded routes: index (grid cards), today (aggregated checklist), detail (instance + task rows), create/edit (multi-step form with Basics / Schedule / Tasks tabs). - UI components:
RoutineCard,TaskRow,StreakBadge,CompletionRing(SVG progress),BottomNavmobile-first,EmptyStatereusable.
The routine domain went from passive tracker to adaptive coach:
AdaptiveRecommendationsService: detects time-window drift (mode hour from completions vs scheduledtimeWindowStart), missed routines (3+ scheduled days without completion), and pending streak celebrations.runAll()is single-flight, exposesproposedSuggestionssignal.AdaptiveSuggestion+ repository: discriminated union payloads (time_window_adjust|streak_celebration|missed_routine|task_reorder), localStorage repo with deduplication viahasOpenForRoutineAndType, snapshot of previous schedule for revert.- 5 new AI tools (8 total in catalog):
create_routine,complete_task,accept_time_window_adjustment,dismiss_adaptive_suggestion,celebrate_streak. The dispatcher validates args, calls the right service, and surfaces resourceRoute/routines/:idon action chips. - App-open + interval trigger:
app.componentrunsAdaptiveRecommendationsService.runAll()on init, onvisibilitychange → visible, and every 30 min while foreground. - UI/UX elevation of
routines/:- Hero gradients per page (slate→violet for index, indigo→fuchsia for today, routine color for detail).
routines-todaygroups routines by time bucket (Morning/Afternoon/Evening/Flexible) with stats card row and contextual greeting.- Skeleton loader on first paint, animated suggestion cards with paletted variants (amber/emerald/indigo).
routine-detailintegratesAdaptiveSuggestionCardComponent, replaces nativeconfirm()withapp-modal, sticky action footer, firesBehaviorTrackerServiceevents (routine_opened, task_checked, suggestion_accepted/dismissed).
- Specs:
adaptive-recommendations.service.spec.tscovers streak celebration creation, time-window proposal with sample threshold,runAllaggregation, and time-window apply with snapshot.
- Create, edit, archive and delete habits
- Types: build good habits or break bad ones
- Frequencies: daily, weekdays, weekends, weekly, custom
- 7 categories: health, fitness, productivity, mindfulness, social, learning, custom
- Completion tracking with full history
- Streaks with smart calculation per frequency (non-scheduled days don't break the chain)
- GitHub-style heatmap calendar
- Completion rate and statistics
- Create, edit and delete multi-task routines (not just single habits)
- Tasks per routine with order, duration estimates, and adaptive suggested times
- Routine instances per day: status lifecycle (Pending → InProgress → Completed | Skipped | Missed)
- Per-task completion tracking with completion score (0-100)
- Streaks per routine: current, longest, celebration pending
- Schedule types: daily, weekly (pick days), monthly (day of month), custom cron
- Behavior tracking pipeline: 11 event types (routine_opened, task_checked, streak_broken, time_window_adjusted...) with debounced batch flush
- Scheduled reminders materialized per routine from preferences, with Capacitor LocalNotifications integration
- Habit legacy coexistence: old habits work as virtual 1-task routines via adapter during transition
- XP system: gain experience on every habit completion
- Levels: from Novice (1) to Legend (10) with exponential progression
- 16 predefined achievements across 6 categories (streak, consistency, variety, milestone, explorer, level)
- Weekly challenges auto-generated
- Redeemable points earned on level-up
- Visual feedback: floating XP popups, level-up modal with particles, achievement toasts
- Multi-provider: Anthropic Claude and Google Gemini with runtime switching
- Native tool-use (Iter 1): the AI can create, adjust and archive habits directly from the chat
- Action chips: every AI action is surfaced as a tappable chip linking to the created resource
- Daily insight: personalized analysis of your habits backed by real signals from the insight engine
- AI suggestions: new habit recommendations based on your profile and detected patterns
- AI coach: conversational chat for motivation, advice and analysis (now with tool execution)
- Offline fallback: pre-built motivational messages and contextual insights when no API key is configured
- Flexible config: pick provider, model and API key from the profile screen
- Supported models: Claude Sonnet 4, Claude Haiku 4.5, Gemini 2.0 Flash, Gemini 2.5 Pro/Flash
- Personalized greeting by time of day
- XP bar with current level
- Quick stats (habits today, completions, points, best streak)
- Daily progress bar
- Active challenges
- Today's habits with quick toggle
- Best streaks view
- Sidebar (desktop) and bottom nav (mobile)
- Lazy-loaded routing per feature
- Fluid animations (fade-in, slide-up, bounce, shimmer)
- Toast notification system
- Reusable modals
- Accessibility support (
prefers-reduced-motion) - Responsive components
| Technology | Use |
|---|---|
| Zoneless Angular 19.2 | Frontend framework — 100 % standalone components, OnPush everywhere, no zone.js in the runtime bundle |
| TypeScript 5.7 | End-to-end static typing |
Tailwind CSS v4 with @theme |
Utility-first styling, CSS-first config, oklch() perceptually uniform palette |
Angular Signals + linkedSignal + effect |
Fine-grained reactive state; the only effect() instances bridge to DOM (data-control-state) and storage |
| RxJS 7 | HTTP-boundary repositories only (Observable shape is Angular HTTP's API surface) |
@angular/core/rxjs-interop |
toSignal / toObservable to bridge legacy consumers |
| Jasmine + Karma | Unit testing (83 specs, all green) |
| localStorage | Temporary persistence (until Phase 5g swap) |
| Capacitor | Native Android/iOS apps |
@capacitor/local-notifications |
Scheduled reminder materialization (Phase 5d) |
src/app/
core/
interfaces/ # Repository contracts (InjectionToken)
repositories/ # localStorage implementations
services/ # Business logic (signals-based)
habit-insight-engine.service.ts # deterministic pattern engine
ai-action-dispatcher.service.ts # tool-call executor
ai.service.ts # tool loop + snapshot
routine.service.ts # Phase 5b — routine CRUD + signals
routine-instance.service.ts # Phase 5b — instances + task completion
behavior-tracker.service.ts # Phase 5d — debounced batch events
scheduled-reminder.service.ts # Phase 5d — reminder materialization
control-state.service.ts # Phase 6 — linkedSignal `action | calm` + DOM bridge effect
utils/ # Helpers (dates, streaks, XP)
providers/
ai/
anthropic.provider.ts # rewritten — tool-use blocks
gemini.provider.ts # rewritten — functionCall/functionResponse
tools/ # NEW — tool catalog + translators
prompts/ # NEW — extracted prompt builders
models/ # Domain types (ai.model extended with tool types)
shared/
components/
layout/ # App shell, sidebar, bottom nav
ui/ # Reusable (toast, modal, progress-bar, ai-coach-chat...)
# conviction-button/ — Phase 6 — press-and-hold completion (friction = feature)
pipes/
features/
dashboard/
habits/ # Legacy — coexists during transition
routines/ # Phase 5c — index, today, detail, form, analytics
achievements/
rewards/
profile/
src/app/models/routine.model.ts—Routine,Task,RoutineInstance,TaskCompletion,RoutineStreak,ScheduleConfigdiscriminated unionsrc/app/models/behavior.model.ts—BehaviorEventTypeenum,UserBehaviorEventsrc/app/models/reminder.model.ts—ReminderPreference,ScheduledReminder,ReminderChannel,ReminderStatus
- Repository pattern: data layer decoupled behind injection tokens, localStorage today — backend swap tomorrow
- Zoneless + Signals + OnPush: fine-grained reactivity, no
zone.jstree-traversal linkedSignalfor derived-writable state:ControlStateServiceis the canonical example —action | calmderived from compliance, with manual override that auto-resets on source changeeffect()is reserved for infrastructure bridges: DOM (data-control-state),localStorage,Capacitor.Preferences. Never used to propagate state between components.- CSS-first design tokens: a single
:root[data-control-state]flip drives the whole theme; no runtime JS for color switching @defergranularity: heavy modules (AI coach) leave the initial bundle and prefetch when the browser is idle- Lazy loading: every feature loads on demand
- Standalone components: no NgModules, explicit imports
- Provider-agnostic AI tools: single catalog, per-provider translators (
toAnthropicTools,toGeminiTools) - Friction as a feature:
ConvictionButtonComponentrequires sustained press-and-hold to complete high-impact actions
# Install dependencies
npm install
# Development
npm start
# Production build
npm run build:prod
# Other scripts
npm run build # standard build
npm run watch # watch build
npm test # unit tests (Karma)Capacitor is integrated. File: capacitor.config.ts with webDir: dist/todo-app/browser.
# One-time platform install
npm i @capacitor/android @capacitor/ios
npx cap add android
npx cap add ios
# Update flow
npm run build:prod
npx cap sync
# Open native projects
npm run cap:android # Android Studio
npm run cap:ios # Xcode (macOS)
# Diagnostics
npx cap doctor- Run Capacitor commands from PowerShell or CMD (avoid Git Bash)
spawn EINVALusually means Git Bash — switch shellwebDir=dist/todo-app/browserincapacitor.config.ts
- AI foundation with native tool-use
HabitInsightEngineServicefeeding all prompts- Prompts extracted, action chips in chat, debt removed
- Unit tests for insight engine + xp/streak utils
- Iter 2: Live dashboard (hero card, focus-today, SVG sparklines, weekday bars)
- Iter 3: Deep habits (wizard, templates, detail tabs, AI-powered creation)
- Iter 4: Real coach (multi-session persistence, weekly review, streaming chat)
- Iter 5: Gamification with soul (reward catalog with themes/avatars/titles, tiered achievements, streak milestone modals)
- Iter 6: Profile + journeys + onboarding (dark mode, onboarding flow, 21/30/66-day journeys)
- Iter 7: Mobile polish (local notifications, haptics, custom modals over native confirms)
Routine,Task,RoutineInstance,TaskCompletion,RoutineStreak,ScheduleConfigdiscriminated unionBehaviorEventType,UserBehaviorEventmodelReminderPreference,ScheduledReminder,ReminderChannel,ReminderStatusmodel- 6 new repository interfaces + localStorage implementations with InjectionTokens
RoutineServicewith signals: activeRoutines, todayRoutines, filteredRoutinesRoutineInstanceServicewith getOrCreateForDate, toggleTaskCompletion, completionScore recalculationRoutineAdapterService: legacyHabitcoexists as virtual 1-taskRoutineMigrationServicev1→v2: initialize new localStorage keys
routines.routes.ts: index, today, new, :id/edit, :id- Pages:
RoutinesIndexPageComponent,RoutinesTodayPageComponent,RoutineDetailPageComponent,RoutineFormPageComponent - Components:
RoutineCard,TaskRow,StreakBadge,CompletionRing(SVG),BottomNav - Multi-step form: Basics / Schedule / Tasks tabs
BehaviorTrackerService: debounced queue (1.5s), batch flush toBehaviorRepository,visibilitychangehandlerScheduledReminderService: materialize reminders from preferences, CapacitorLocalNotificationsintegration- 11 event types tracked: routine_opened, task_checked, task_unchecked, routine_completed, streak_continued, streak_broken, reminder_dismissed, reminder_acted, time_window_adjusted, suggestion_accepted, suggestion_dismissed
AdaptiveRecommendationsService:updateSuggestedTimes,flagMissedRoutines,flagStreakCelebrations,adjustTimeWindows,runAll()with single-flight guardAdaptiveSuggestionmodel +IAdaptiveSuggestionRepository+ localStorage impl with dedup- 5 new AI tools wired to dispatcher:
create_routine,complete_task,accept_time_window_adjustment,dismiss_adaptive_suggestion,celebrate_streak AdaptiveSuggestionCardComponent(Accept/Revert/Dismiss) embedded in routine detail- Trigger: on
app-open, onvisibilitychange → visible, and every 30 min interval (backend job will replace it in Phase 5f) - UI/UX elevation of
routines/: gradient heroes, skeleton loaders, time-bucket grouping in Today, sticky action footer + modal-based delete in detail,BehaviorTrackerServiceintegrated
- NestJS + TypeORM + PostgreSQL + JWT +
@nestjs/schedule+@nestjs/throttler - Endpoints: routines CRUD, instances, completions, behavior batch, reminders, adaptive
- Jobs:
GenerateInstancesForDate(23:55),DispatchTodayReminders(every 5m),RunAdaptiveAnalysis(03:00)
*-http.repository.tsmirror of*-local.repository.ts- Swap binding in
app.providers.ts @capacitor/push-notifications: backend dispatches via FCM/APNs
- Rename package.json, capacitor.config.ts, angular.json, dist/
com.centur.controlmasterbundle idroutinesV2Enabledflag, deprecation warning in /habits- Migration v2→v3: cleanup legacy Habit keys
- ✅ Zoneless change detection (
provideExperimentalZonelessChangeDetection) - ✅
OnPushstrict on 100 % of components - ✅
BehaviorSubjectcount = 0;signal/computed/linkedSignal/effectthroughout - ✅
@defer (on idle; prefetch on idle)for<app-ai-coach-chat /> - ✅ Tailwind v4
@themewith fulloklch()token palette + dualdata-control-stateflip - ✅ Glassmorphism erased (
backdrop-blur= 0 in the live tree) - ✅
ConvictionButtonComponentwith press-and-hold UX - ✅ Brand-alias indirection so 118
indigo-*/purple-*references retokenize with zero template churn
- Self-hosted brutalist typography (monospace display + Inter body)
- Hero gradient refactor toward fully solid Quiet UI surfaces
- Additional
@deferblocks onprofile-page,habit-detail-page,routine-form-page - PWA with Service Worker (cache-first + network-first)
- Push notifications for reminders (Capacitor)
- Virtual scrolling for long lists
- Fork the repo
- Create a branch (
git checkout -b feature/new-feature) - Commit your changes (
git commit -m 'Add new feature') - Push the branch (
git push origin feature/new-feature) - Open a Pull Request
TaskMaster — Transform your habits, transform your life
TaskMaster is and will remain an open-source project. However, keeping the infrastructure running, covering AI API costs (Claude and Gemini) and dedicating time to new features like the Real Rewards Shop takes resources.
If you find value in this tool and want to help it keep growing, any donation is hugely appreciated.
| Platform | Link |
|---|---|
| PayPal | Donate here |
Note: Your support directly funds AI credits so more users can enjoy personalized insights and the AI Coach.
TaskMaster es una plataforma inteligente para construir buenos habitos, estructurar rutinas multi-tarea y romper patrones nocivos. Potenciada por IA (Anthropic Claude / Google Gemini) y un sistema de gamificacion con puntos canjeables por premios reales. Construida con Angular 19 Zoneless, Tailwind v4 con tokens oklch y lista para ejecutarse como app movil nativa via Capacitor.
El software de tracking de habitos tiene un modo de fallo por defecto: confunde motivacion (un truco externo) con agencia (una capacidad interna). El resultado es una caminadora de insignias, rachas, notificaciones push y bucles de refuerzo dopaminergico que entrenan al usuario a depender de la app en lugar de si mismo. La app se convierte en la adiccion que prometia curar.
TaskMaster es una plataforma inteligente para adoptar buenos habitos y dejar malos habitos, potenciada con IA (Anthropic Claude / Google Gemini) y un sistema de gamificacion con puntos canjeables por premios reales. Construida con Angular 19 y preparada para ejecutarse como app movil nativa con Capacitor.
En terminos termodinamicos: una persona sin rutinas deriva hacia la entropia. Una rutina es energia direccional aplicada para mantener orden estructural. El trabajo de la interfaz no es celebrar la energia gastada, sino reflejar la reduccion del ruido — mientras mas silenciosa se vuelve la interfaz, mas ha ganado el usuario. La recompensa no es la proxima notificacion; es la desaparicion del sistema del dia del usuario.
Esta postura fuerza una arquitectura especifica. Una app motivacional puede permitirse ser descuidada porque compensa en la capa de dopamina. Un motor de auditoria no puede — cada imprecision es una mentira que el usuario terminara cazando. De ahi los cuatro mandatos siguientes.
Cuatro mandatos innegociables guian cada decision tecnica:
- Reactividad Zoneless. Sin la hipervigilancia de
zone.js. El framework solo reacciona a lo que se emitio explicitamente por el grafo de signals. Resultado: bundle inicial 30 kB mas ligero, arranque 40–60 % mas rapido, deteccion de cambios determinista. - Signals de grano fino.
signal/computed/linkedSignalen todas partes;effectreservado para puentes de infraestructura (DOM, storage).BehaviorSubjecty pipesasyncerradicados del codebase. - Carga atomica diferida.
@defercon placeholders dimensionados para las vistas pesadas — CLS = 0, intencionalidad obligatoria para consumir un byte extra. - Quiet UI sobre paleta oklch. Tailwind v4 CSS-first con
@theme, coloresoklch()perceptualmente uniformes, estado dual (action/calm) que voltea la paleta entera cuando se cumplen los mandatos del dia. Cero glassmorphism. Contraste solido y brutalista sobre decoracion translucida.
El artefacto visible de esta doctrina es el conviction-button: las tareas se completan con press-and-hold sostenido, no con un click. La friccion es una feature, no un bug — las acciones de alto impacto deben sentirse materialmente distintas a descartar una notificacion.
- Filosofia de diseno
- Estado del proyecto
- Novedades — Fase 6 Iter 1 (Elevated Design System)
- Novedades — Iter 1 de elevacion
- Caracteristicas
- Stack tecnologico
- Arquitectura
- Instalacion y scripts
- Capacitor (Android/iOS)
- Roadmap
- Contribuir
- Apoya el proyecto
| Fase | Descripcion | Estado |
|---|---|---|
| Fase 1 | Fundacion (arquitectura, routing, modelos) | Completada |
| Fase 2 | Sistema de habitos (CRUD, rachas, calendario) | Completada |
| Fase 3 | Gamificacion (XP, niveles, logros, desafios) | Completada |
| Fase 4 | Integracion IA (Anthropic Claude + Google Gemini) | Completada |
| Fase 4.1 | Elevacion pre-backend — Iter 1 (fundacion IA) | Completada |
| Fase 4.2 | Elevacion pre-backend — Iter 2–7 | En progreso |
| Fase 5a | Modelos de dominio Routine + repositorios localStorage | Completada |
| Fase 5b | Servicios de rutinas + adaptador Habit→Routine | Completada |
| Fase 5c | UI feature routines/ (index, hoy, detalle, form) |
Completada |
| Fase 5d | Behavior tracking + reminders programados | Completada |
| Fase 5e | Motor adaptativo + tools IA para rutinas + elevacion UI/UX | Completada |
| Fase 5f | Backend NestJS scaffolding | Pendiente |
| Fase 5g | Repositorios HTTP + push real Capacitor | Pendiente |
| Fase 5h | Rebrand: TaskMaster → ControlMaster | Pendiente |
| Fase 6 — Iter 1 | Elevated Design System (Zoneless + Signals + @defer + Quiet UI) | Completada |
| Fase 7 — MVP | MVP offline-first (PIN auth, onboarding, PWA, backup) | Completada |
| Fase 6 — Iter 2 | Virtual scrolling, push notifications, PWA cache avanzado | Pendiente |
La aplicación corre como producto autocontenido mientras se construye el backend — sin red para ningún flujo core, sin terceros para nada salvo llamadas opcionales a IA.
- PIN de 6 dígitos (configurable 4–8) creado durante el onboarding via
AuthService.setupPin(). El PIN nunca se persiste; solo se almacenasalt+SHA-256(clave-derivada-PBKDF2)enlocalStorage['auth.user']. - PBKDF2 (250k iter, SHA-256) → AES-GCM-256 en
CryptoService. La clave derivada vive solo en una signal privada tras el unlock; se borra enlock()y envisibilitychange → hidden. - Escalera de cooldowns ante intentos fallidos: 3 → 30 s, 6 → 5 min, 9 → 30 min, 10 → reset obligado.
BiometricServicestub: web devuelveweb-no-op, bridge nativo queda pendiente para el build de Capacitor. El lock page oculta el botón biométrico cuando no está disponible.authGuardprotege todas las rutas autenticadas./locky/onboarding/*lo evitan. Lock-on-background cableado enAppComponent—visibilitychange → hiddeninvocaauth.lock().
- Flujo de 6 pasos en
/onboarding/*: Bienvenida (nombre) → Objetivos (chips multi-select) → Plantillas (0–3 rutinas seed) → IA opcional → Configurar PIN (doble confirmación) → Listo. OnboardingShellComponentreutilizable provee la barra de progreso + navegación.OnboardingServicemantiene el draft como signal;complete()invocaAuthService.setupPin+RoutineService.createpor cada plantilla seleccionada.
- 10 rutinas pre-construidas en
TemplateCatalogService: matinal, bajada nocturna, entrenamiento, deep work, hidratación, gratitud, revisión semanal, lectura, frío + respiración, stack post-entreno.
@angular/service-workerregistrado viaprovideServiceWorkerconregisterWhenStable:30000.ngsw-config.jsonprecachea el app shell, lazy-cachea assets, performance-cachea Google Fonts por 30 días.public/manifest.webmanifestcon iconos SVG (any + maskable), display standalone, theme color derivado de oklch.PwaInstallServicecapturabeforeinstallprompt, expone signalcanInstally métodoprompt(); el dismiss persiste 7 días.
BackupService.exportToBundle()recorrelocalStorage, captura todas las claves de la app (habits, routines, gamification, etc.), excluye explícitamenteauth.*para preservar la seguridad at-rest tras importar.downloadAsJson()arma un Blob y dispara descarga (taskmaster-backup-YYYY-MM-DD.json).importFromFile(File)validaapp === 'TaskMaster'yschemaVersionantes de limpiar las claves exportables y restaurar; rechaza schemas futuros o bundles de otras apps.clearAll()es la opción nuclear destructiva usada por Reiniciar aplicación; el record de auth también se borra, redirige al onboarding y fuerza recarga.- Los tres están cableados en
profile-pagebajo la card Datos y cuenta.
npm run build:prod→ verde. Bundle inicial 107 kB transfer (413 kB raw) con service worker. SW emite endist/todo-app/browser/ngsw-worker.js.npm test→ 102/103 verde (1 spec pre-existente date-sensitive del habit-insight, no relacionado).- 12 specs nuevos: 4 para
CryptoService, 8 paraAuthService, 3 paraTemplateCatalogService, 5 paraBackupService.
- Perfiles múltiples en el mismo dispositivo.
- Recuperación de PIN (pérdida = reset; documentado en el copy del onboarding).
- Sync entre dispositivos y backend NestJS (Fase 5f–g).
- Bridge nativo biométrico (
@aparajita/capacitor-biometric-auth). - Tipografía brutalista self-hosted y refactor pleno de hero-gradients (diferido de Fase 6 Iter 1).
npm run build:prod- Servir
dist/todo-app/browser/por HTTPS (olocalhost). - Abrir en Chrome / Edge / Safari → aparece el prompt de instalación (o menú del navegador → Instalar TaskMaster).
- La app abre standalone; funciona offline tras la primera visita.
# Setup único (requiere Android Studio instalado)
npm i @capacitor/android@latest
npx cap add android
# Cada release
npm run build:prod
npx cap sync android
npm run cap:android # abre Android Studio → Run / build APKMismo flujo que Android, cambia android por ios, requiere Xcode.
La aplicacion fue reescrita de extremo a extremo en tres capas — ingenieria (el sustrato de deteccion de cambios), estetica (el material visual) y atencion (lo que se le pide al usuario que consuma) — para que cada una exprese la misma postura subyacente: el framework reacciona solo a lo que se le pidio explicitamente, la paleta se mantiene perceptualmente honesta, y no se carga un solo byte de JavaScript antes de que la intencion del usuario lo exija.
provideExperimentalZonelessChangeDetection()en src/app/app.config.ts.zone.jsremovido depackage.jsony de los polyfills deangular.json(retencion solo en test para preservar compatibilidad de TestBed con los 80+ specs existentes).ChangeDetectionStrategy.OnPushen el 100 % de los componentes (55/55), incluyendo el folder legacytodo/.- Conteo de
BehaviorSubject= 0.UiPreferencesServiceyTodoServicereescritos consignal/computed/effect; se preserva una fachada Observable viatoObservablepara compatibilidad hacia atras. - Servicios que exponen estado (
HabitService,RoutineService,RoutineInstanceService,AdaptiveRecommendationsService,GamificationService) auditados — todos ya signal-based; los metodos en la frontera HTTP conservanObservable<T>por la excepcion explicita de la doctrina. linkedSignalintroducido en el nuevoControlStateService— derivaaction | calmdesdeHabitService.todayProgress()+RoutineInstanceService.todayInstances(), acepta override manual que se auto-resetea cuando la fuente vuelve a emitir.
- src/styles.css refactorizado a
@themeCSS-first con paleta completa de tokensoklch():surface-bg/fg/muted/border/subtle,conviction-core/strong/soft/fg,control-pass/fail,entropy-warn,audit-info. Todos los hex hardcodeados removidos. - Estado dual.
:root[data-control-state="calm"]voltea la paleta entera — el tema calma se activa cuando los mandatos del dia estan satisfechos, impulsado por uneffect()enControlStateServiceque puentea adocument.documentElement.dataset.controlState. - Truco de alias de marca:
--color-indigo-{50,100,500,600,700,800}y--color-purple-{500,600,700}redirigen avar(--color-conviction-*). Las 118 utilidades existentesbg-indigo-600/text-indigo-700/ etc. en 38 archivos heredan el tema dual sin tocar una sola plantilla. - Glassmorphism erradicado en el arbol vivo. Conteo de
backdrop-bluren codigo no-legacy = 0. Los overlays de modal y level-up usancolor-mix(in oklch, var(--color-surface-fg) 65 %, transparent)para fondos opacos al ojo. - Sombras pesadas reducidas.
shadow-xl/shadow-2xl→shadow-sm/shadow-mden achievement-toast, ai-coach-chat, level-up-modal. Bordes de 1–2 px reemplazan los trucos de elevacion.
@defer (on idle; prefetch on idle)envuelve<app-ai-coach-chat />enAppComponent. El modulo de 50 kB del chat sale del bundle inicial y se precarga cuando el hilo principal queda idle.NgOptimizedImage— no aplicable (el repo usa cero etiquetas<img>; todos los iconos son emoji o SVG inline).ConvictionButtonComponenten src/app/shared/components/ui/conviction-button/. Press-and-hold de 600 ms con un anilloconic-gradientque se llena viaperformance.now()+requestAnimationFrame. Soporte de teclado (Space/Enterpara mantener). Reemplaza el checkbox enTaskRowComponent. El API ElementInternals fue investigado pero requierecustomElements.define()— fuera de scope para componentes Angular; la UX de friccion (el verdadero mandato) se preserva via signals + pointer events.
npm run build:prod→ verde. Bundle inicial 103 kB transfer (400 kB raw); lazy chunks separados por ruta + AI coach.npm test→ 83 / 83 verde.- Contraste (oklch): estado action ~17:1, estado calm ~13:1, conviction-core sobre surface ~4.5:1 (WCAG AA).
- API ElementInternals: el mandato original pedia asociacion nativa con formularios via
attachInternals(). Ese API requiere registrar el componente concustomElements.define(...), cosa que los componentes Angular no son por defecto. Envolver el proyecto en Angular Elements solo para este control forzaria una concesion framework-wide a cambio de un solo hook de validacion. La UX de friccion — el punto real — se preserva con signals + pointer events; la integracion del API queda diferida hasta que aparezca un segundo caso de uso que la justifique. - Polyfill de tests:
zone.js/testingse conserva solo en la config de Karma (no en el bundle de runtime) para mantener corriendo los 80+ specs existentes sin reescribirlos. El runtime es totalmente Zoneless; el harness de tests es una excepcion controlada y acotada. equal: byIden arrays de entidades: tentador como atajo de memoizacion pero semanticamente erroneo — cuando una entidad muta in-place conservando el mismo id, el signal suprimiria el cambio. La igualdad por referencia (default) es el primitivo correcto para arrays de entidades mutables.
La capa de IA paso de respuestas solo-texto a una capa real de ejecucion. Resumen:
- Tool-use nativo en ambos proveedores. El chat del coach ya llama a
create_habit,adjust_habityarchive_habitvia Claude Tools API y Gemini Function Calling con un catalogo unico agnostico. HabitInsightEngineService: signals deterministicos (mejor dia de la semana, mejor hora, habito ancla, habitos en riesgo, semanas/meses perfectos, categoria fuerte/debil) alimentan cada prompt con datos reales — se acabaron los numeros inventados.- Prompts extraidos a
src/app/core/prompts/(system, coach, insight, recommendation) con un bloque de patrones que inyecta los insights al contexto del modelo. - Action chips en el chat: cuando la IA ejecuta una tool, aparece un chip clickeable debajo de la respuesta con el resumen del cambio (estado exito/error + link al recurso creado).
- Loop de tools con budget (max 5 turnos de tool-call,
maxTokenssubido a 2048 cuando hay tools activas). - Dispatcher (
AIActionDispatcherService) que valida argumentos, llama a las variantes Observable deHabitService(createHabitReturning,updateHabitReturning,archiveHabitReturning) y correlaciona resultados portoolCallId. - Interface + injection token
AICoachRepositorylistos para persistencia multi-sesion (implementacion en Iter 4). - Deuda removida: hardcode de
perfectWeeks/perfectMonthsen dashboard reemplazado por signals del engine;gamification.serviceya no escribelocalStoragedirecto (va por repo via nuevosaveChallenges); boilerplate deapp.component.htmlborrado. - Tests unitarios: specs Jasmine/Karma para
xp.utils,streak.utilsyHabitInsightEngineService.
El modelo de dominio evoluciono de Habit plano + HabitCompletion a un pipeline estructurado Routine → Task → RoutineInstance → TaskCompletion, absorbiendo las mejores ideas del plan "Control" sin reescribir el frontend.
- Modelo de dominio Routine (
src/app/models/routine.model.ts): union discriminadaScheduleConfig(daily/weekly/monthly/custom cron),RoutineInstancecon ciclo de estados (Pending → InProgress → Completed | Skipped | Missed), tracking de completado por tarea concompletion_score. - Pipeline de behavior tracking (
BehaviorTrackerService): cola debounce (1.5s), flush batch al repositorio, handlervisibilitychange→navigator.sendBeaconpreparado para swap a HTTP. EnumBehaviorEventTypecubre 11 tipos de eventos. - Reminders programados (
ScheduledReminderService): materializaScheduledReminder[]desdeReminderPreferencepor rutina, integra CapacitorLocalNotificationscomo canal local. - 6 nuevos repositorios detras de InjectionTokens:
RoutineRepository,RoutineInstanceRepository,TaskCompletionRepository,BehaviorRepository,ReminderRepository,RoutineStreakRepository— todos con implementaciones localStorage y specs completos. - RoutineAdapterService:
Habitlegado coexiste comoRoutinevirtual de 1 tarea. Dashboard, achievements e IA tools siguen funcionando durante la transicion. - Feature
routines/con rutas lazy-loaded: index (grid de cards), hoy (checklist agregada), detalle (instancia + task rows), crear/editar (formulario multi-step con tabs Basics / Schedule / Tasks). - Componentes UI:
RoutineCard,TaskRow,StreakBadge,CompletionRing(SVG),BottomNavmobile-first,EmptyStatereutilizable.
El dominio de rutinas paso de tracker pasivo a coach adaptativo:
AdaptiveRecommendationsService: detecta drift de horario (hora dominante de los completions vstimeWindowStartprogramado), rutinas perdidas (3+ dias programados sin completar) y celebraciones de racha pendientes.runAll()es single-flight, expone signalproposedSuggestions.AdaptiveSuggestion+ repositorio: payloads de union discriminada (time_window_adjust|streak_celebration|missed_routine|task_reorder), repo localStorage con dedup viahasOpenForRoutineAndType, snapshot del schedule previo para revert.- 5 nuevas tools IA (8 totales en el catalogo):
create_routine,complete_task,accept_time_window_adjustment,dismiss_adaptive_suggestion,celebrate_streak. El dispatcher valida args, llama al servicio correcto y expone resourceRoute/routines/:iden los action chips. - Trigger app-open + intervalo:
app.componentcorrerunAll()en init, envisibilitychange → visible, y cada 30 min mientras la app este foreground. - Elevacion UI/UX de
routines/:- Heros con gradiente por pagina (slate→violet en index, indigo→fuchsia en hoy, color de rutina en detalle).
routines-todayagrupa por franja horaria (Manana/Tarde/Noche/Flexible) con stats card y saludo contextual.- Skeleton loader en primer paint, suggestion cards con paletas (amber/emerald/indigo) y slide-up animation.
routine-detailintegraAdaptiveSuggestionCardComponent, reemplazaconfirm()nativo porapp-modal, footer sticky de acciones, dispara eventosBehaviorTrackerService(routine_opened, task_checked, suggestion_accepted/dismissed).
- Specs:
adaptive-recommendations.service.spec.tscubre creacion de celebracion de racha, propuesta de time-window con threshold de muestras, agregacion derunAll, y aplicacion de time-window con snapshot.
- Crear, editar, archivar y eliminar habitos
- Tipos: construir buenos habitos o dejar malos habitos
- Frecuencias: diario, entre semana, fines de semana, semanal, custom
- 7 categorias: salud, ejercicio, productividad, mindfulness, social, aprendizaje, custom
- Tracking de completados con historial
- Rachas con calculo inteligente por frecuencia (dias no programados no rompen la cadena)
- Calendario heatmap estilo GitHub
- Tasa de completado y estadisticas
- Crear, editar y eliminar rutinas multi-tarea (no solo habitos individuales)
- Tareas por rutina con orden, estimacion de duracion, y horas sugeridas adaptativas
- Instancias de rutina por dia: ciclo de estado (Pendiente → En progreso → Completada | Saltada | Perdida)
- Tracking de completado por tarea con puntaje de finalizacion (0-100)
- Rachas por rutina: actual, maxima, celebracion pendiente
- Tipos de horario: diario, semanal (elegir dias), mensual (dia del mes), cron personalizado
- Pipeline de tracking de comportamiento: 11 tipos de eventos con flush por lotes
- Reminders programados materializados por rutina desde preferencias, con integracion Capacitor LocalNotifications
- Coexistencia legado: habitos antiguos funcionan como rutinas virtuales de 1 tarea via adaptador
- Sistema de XP: gana experiencia al completar habitos
- Niveles: del Novato (1) al Leyenda (10) con progresion exponencial
- 16 logros predefinidos en 6 categorias (rachas, consistencia, variedad, hitos, explorador, nivel)
- Desafios semanales generados automaticamente
- Puntos canjeables que se ganan al subir de nivel
- Feedback visual: popups de XP flotantes, modal de level-up con particulas, toasts de logros desbloqueados
- Multi-proveedor: Anthropic Claude y Google Gemini con cambio dinamico
- Tool-use nativo (Iter 1): la IA puede crear, ajustar y archivar habitos directamente desde el chat
- Action chips: cada accion de la IA aparece como chip clickeable con enlace al recurso
- Insight diario: analisis personalizado respaldado por signals reales del motor de insights
- Sugerencias IA: recomendaciones de nuevos habitos basadas en tu perfil y patrones detectados
- Coach IA: chat conversacional para motivacion, consejos y analisis (ahora con ejecucion de acciones)
- Fallback offline: mensajes motivacionales e insights contextuales cuando no hay API key configurada
- Configuracion flexible: elige proveedor, modelo y API key desde el perfil
- Modelos soportados: Claude Sonnet 4, Claude Haiku 4.5, Gemini 2.0 Flash, Gemini 2.5 Pro/Flash
- Saludo personalizado con hora del dia
- Barra de XP con nivel actual
- Estadisticas rapidas (habitos hoy, completados, puntos, mejor racha)
- Barra de progreso diario
- Desafios activos
- Lista de habitos de hoy con toggle rapido
- Vista de mejores rachas
- Navegacion con sidebar (desktop) y bottom nav (mobile)
- Routing lazy-loaded para cada seccion
- Animaciones fluidas (fade-in, slide-up, bounce, shimmer)
- Sistema de notificaciones toast
- Modales reutilizables
- Soporte para accesibilidad (
prefers-reduced-motion) - Componentes responsivos
| Tecnologia | Uso |
|---|---|
| Angular 19.2 Zoneless | Framework frontend — 100 % standalone components, OnPush universal, sin zone.js en el bundle de runtime |
| TypeScript 5.7 | Tipado estatico end-to-end |
Tailwind CSS v4 con @theme |
Utility-first, config CSS-first, paleta oklch() perceptualmente uniforme |
Angular Signals + linkedSignal + effect |
Estado reactivo fine-grained; las unicas instancias de effect() puentean a DOM (data-control-state) y storage |
| RxJS 7 | Solo en repositorios HTTP-boundary (forma Observable es el API de Angular HTTP) |
@angular/core/rxjs-interop |
toSignal / toObservable para puentear consumidores legacy |
| Jasmine + Karma | Testing unitario (83 specs, todos verdes) |
| localStorage | Persistencia temporal (hasta Fase 5g) |
| Capacitor | Apps nativas Android/iOS |
@capacitor/local-notifications |
Materializacion de reminders programados (Fase 5d) |
src/app/
core/
interfaces/ # Contratos de repositorios (InjectionToken)
repositories/ # Implementaciones localStorage
services/ # Logica de negocio (Signals-based)
habit-insight-engine.service.ts # motor de patrones deterministico
ai-action-dispatcher.service.ts # ejecutor de tool-calls
ai.service.ts # tool loop + snapshot
routine.service.ts # Phase 5b — CRUD rutinas + signals
routine-instance.service.ts # Phase 5b — instancias + completado de tareas
behavior-tracker.service.ts # Phase 5d — eventos batch debounce
scheduled-reminder.service.ts # Phase 5d — materializacion de reminders
control-state.service.ts # Fase 6 — linkedSignal `action | calm` + effect puente DOM
utils/ # Utilidades (fechas, rachas, XP)
providers/
ai/
anthropic.provider.ts # reescrito — bloques tool-use
gemini.provider.ts # reescrito — functionCall/functionResponse
tools/ # NUEVO — catalogo + translators
prompts/ # NUEVO — builders de prompts extraidos
models/ # Tipos del dominio (ai.model extendido con tool types)
shared/
components/
layout/ # App shell, sidebar, bottom nav
ui/ # Reusables (toast, modal, progress-bar, ai-coach-chat...)
# conviction-button/ — Fase 6 — press-and-hold (friccion = feature)
pipes/
features/
dashboard/
habits/ # Legado — coexiste durante transicion
routines/ # Phase 5c — index, hoy, detalle, form, analytics
achievements/
rewards/
profile/
src/app/models/routine.model.ts—Routine,Task,RoutineInstance,TaskCompletion,RoutineStreak,ScheduleConfigunion discriminadasrc/app/models/behavior.model.ts—BehaviorEventTypeenum,UserBehaviorEventsrc/app/models/reminder.model.ts—ReminderPreference,ScheduledReminder,ReminderChannel,ReminderStatus
- Repository Pattern: capa de datos desacoplada detras de injection tokens, localStorage hoy — swap a backend manana
- Zoneless + Signals + OnPush: reactividad fine-grained, sin tree-traversal de
zone.js linkedSignalpara estado derivado-escribible:ControlStateServicees el ejemplo canonico —action | calmderivado del cumplimiento, con override manual que se auto-resetea al cambiar la fuenteeffect()reservado para puentes de infraestructura: DOM (data-control-state),localStorage,Capacitor.Preferences. Nunca para propagar estado entre componentes.- Tokens de diseno CSS-first: un solo flip de
:root[data-control-state]arrastra el tema entero; cero JS en runtime para cambiar colores - Granularidad
@defer: modulos pesados (AI coach) salen del bundle inicial y se precargan cuando el navegador queda idle - Lazy loading: cada feature carga bajo demanda
- Standalone components: sin NgModules, imports explicitos
- Tools IA agnosticas del proveedor: un catalogo, translators por proveedor (
toAnthropicTools,toGeminiTools) - Friccion como feature:
ConvictionButtonComponentrequiere press-and-hold sostenido para completar acciones de alto impacto
# Instalar dependencias
npm install
# Desarrollo
npm start
# Build produccion
npm run build:prod
# Otros scripts
npm run build # build estandar
npm run watch # build en watch
npm test # tests unitarios (Karma)Capacitor esta integrado. Archivo: capacitor.config.ts con webDir: dist/todo-app/browser.
# Instalacion inicial de plataformas (una sola vez)
npm i @capacitor/android @capacitor/ios
npx cap add android
npx cap add ios
# Flujo de actualizacion
npm run build:prod
npx cap sync
# Abrir proyectos nativos
npm run cap:android # Android Studio
npm run cap:ios # Xcode (macOS)
# Diagnostico
npx cap doctor- Ejecutar comandos de Capacitor en PowerShell o CMD (evitar Git Bash)
- Si aparece
spawn EINVAL, asegurarse de no usar Git Bash webDir=dist/todo-app/browserencapacitor.config.ts
- Fundacion IA con tool-use nativo
HabitInsightEngineServicealimentando todos los prompts- Prompts extraidos, action chips en el chat, deuda removida
- Tests unitarios para insight engine + xp/streak utils
- Iter 2: Dashboard vivo (hero card, focus-today, sparklines SVG, barras por dia)
- Iter 3: Habitos profundos (wizard, templates, tabs de detalle, creacion via IA)
- Iter 4: Coach de verdad (persistencia multi-sesion, weekly review, chat streaming)
- Iter 5: Gamificacion con alma (catalogo de recompensas con temas/avatares/titulos, logros con tiers, modales de milestone de racha)
- Iter 6: Perfil + journeys + onboarding (dark mode, onboarding, journeys 21/30/66 dias)
- Iter 7: Mobile polish (notificaciones locales, haptics, modales custom sobre confirms nativos)
Routine,Task,RoutineInstance,TaskCompletion,RoutineStreak,ScheduleConfigunion discriminadaBehaviorEventType,UserBehaviorEventReminderPreference,ScheduledReminder,ReminderChannel,ReminderStatus- 6 nuevas interfaces de repositorio + implementaciones localStorage con InjectionTokens
RoutineServicecon signals: activeRoutines, todayRoutines, filteredRoutinesRoutineInstanceServicecon getOrCreateForDate, toggleTaskCompletion, recalculo completionScoreRoutineAdapterService:Habitlegado coexiste comoRoutinevirtual de 1 tareaMigrationServicev1→v2: inicializa nuevas claves localStorage
routines.routes.ts: index, hoy, nueva, :id/edit, :id- Paginas:
RoutinesIndexPageComponent,RoutinesTodayPageComponent,RoutineDetailPageComponent,RoutineFormPageComponent - Componentes:
RoutineCard,TaskRow,StreakBadge,CompletionRing(SVG),BottomNav - Formulario multi-step: Basics / Schedule / Tasks tabs
BehaviorTrackerService: cola debounce (1.5s), flush batch aBehaviorRepository, handlervisibilitychangeScheduledReminderService: materializa reminders desde preferencias, integracion CapacitorLocalNotifications- 11 tipos de eventos trackeados
AdaptiveRecommendationsService:updateSuggestedTimes,flagMissedRoutines,flagStreakCelebrations,adjustTimeWindows,runAll()con guard single-flight- Modelo
AdaptiveSuggestion+IAdaptiveSuggestionRepository+ impl localStorage con dedup - 5 nuevas tools IA conectadas al dispatcher:
create_routine,complete_task,accept_time_window_adjustment,dismiss_adaptive_suggestion,celebrate_streak AdaptiveSuggestionCardComponent(Aceptar/Revertir/Descartar) integrado en detalle de rutina- Trigger: en
app-open, envisibilitychange → visible, e intervalo cada 30 min (un job backend lo reemplazara en Fase 5f) - Elevacion UI/UX de
routines/: heros con gradiente, skeleton loaders, agrupacion por franja horaria en Hoy, footer de acciones sticky + modal personalizado en detalle, integracionBehaviorTrackerService
- NestJS + TypeORM + PostgreSQL + JWT +
@nestjs/schedule+@nestjs/throttler - Endpoints: routines CRUD, instancias, completions, behavior batch, reminders, adaptativo
- Jobs:
GenerateInstancesForDate(23:55),DispatchTodayReminders(cada 5m),RunAdaptiveAnalysis(03:00)
*-http.repository.tsespejo de*-local.repository.ts- Cambio de binding en
app.providers.ts @capacitor/push-notifications: backend dispatches via FCM/APNs
- Renombrar package.json, capacitor.config.ts, angular.json, dist/
- Bundle id
com.centur.controlmaster - Flag
routinesV2Enabled, warning de deprecacion en /habits - Migracion v2→v3: limpieza de claves legado Habit
- ✅ Zoneless change detection (
provideExperimentalZonelessChangeDetection) - ✅
OnPushestricto en el 100 % de los componentes - ✅ Conteo de
BehaviorSubject= 0;signal/computed/linkedSignal/effecten toda la app - ✅
@defer (on idle; prefetch on idle)para<app-ai-coach-chat /> - ✅ Tailwind v4
@themecon paleta completa de tokensoklch()+ flip dualdata-control-state - ✅ Glassmorphism erradicado (
backdrop-blur= 0 en el arbol vivo) - ✅
ConvictionButtonComponentcon UX press-and-hold - ✅ Indireccion por alias de marca: 118 referencias
indigo-*/purple-*re-tokenizan sin tocar plantillas
- Tipografia brutalista self-hosted (display monoespaciada + Inter en body)
- Refactor de los hero gradients hacia superficies Quiet UI totalmente solidas
- Bloques
@deferadicionales enprofile-page,habit-detail-page,routine-form-page - PWA con Service Worker (cache-first + network-first)
- Push notifications para recordatorios (Capacitor)
- Virtual scrolling para listas largas
- Fork el repositorio
- Crea una branch (
git checkout -b feature/nueva-feature) - Commit tus cambios (
git commit -m 'Add nueva feature') - Push a la branch (
git push origin feature/nueva-feature) - Abre un Pull Request
TaskMaster — Transforma tus habitos, transforma tu vida
TaskMaster es y seguira siendo un proyecto de codigo abierto. Sin embargo, mantener la infraestructura, cubrir los costos de las APIs de Inteligencia Artificial (Claude y Gemini) y dedicar tiempo a desarrollar nuevas funciones como la Tienda de Premios Reales requiere recursos.
Si encuentras valor en esta herramienta y quieres ayudar a que siga creciendo, cualquier donacion es enormemente agradecida.
| Plataforma | Enlace |
|---|---|
| PayPal | Haz una donacion aqui |
Nota: Tu apoyo ayuda directamente a financiar los creditos de IA para que mas usuarios puedan disfrutar de los insights personalizados y el Coach IA.