A lightweight desktop application combining AI-driven scheduling, deterministic task packing, and a persistent virtual pet to help you plan your day, maintain focus, and gamify productivity.
Status: MVP Phase (Phases 1β5 feature-complete)
β οΈ Note: Tauri runtime not yet tested locally. Frontend builds successfully; Rust toolchain integration pending.
# Clone and install
git clone https://github.com/neha23jk/Milo.git
cd Milo && npm install
# Run desktop app (requires Rust + Tauri)
npm run tauri dev
# Frontend-only preview (browser, no Tauri APIs)
npm run dev
npm run build # Production bundleSetup Help: See Installation for platform-specific details.
Milo is a two-window Tauri desktop application merging intelligent scheduling, event-driven state sync, and an always-on virtual pet:
- Hybrid Scheduler: AI (Gemini) handles subjective task decomposition; pure TypeScript deterministic packer handles exact time-slot layout
- Always-On Pet: Floating, transparent window reacts to productivity events with emotion states
- Local-First: SQLite embedded database; offline-ready; optional future cloud sync via PostgreSQL
- Gamification: XP, coins, levels, streaks, 8 achievements, pet growth
- Analytics: Focus tracking, daily AI-generated reports, Recharts weekly/monthly trends
Core Innovation: Separates fuzzy (AI) logic from exact (deterministic) logic for reproducible, testable scheduling.
- AI Task Breakdown: Gemini parses free-form input β structured tasks with milestones and time estimates
- Smart Scheduling: Deterministic packer respects fixed-time events, priorities, deadlines, task splittability
- Task Management: Full CRUD with real-time multi-window sync via Tauri events
- Focus Timer: Track work sessions with live stopwatch; persists to database
- Rescheduling: Auto-reflow incomplete work when tasks slip
- Persistent Floating Avatar: 240Γ240 frameless, always-on-top, draggable, skip-taskbar window
- Emotion States: 8 states (Idle, Working, Thinking, Happy, Celebrating, Sad, Sleeping)
- Pet Interactions: Click to open task-entry dialog; responds to productivity events
- System Tray: Show/hide dashboard, sleep pet, quit (app stays alive in background)
- Auto-Start: Launches on login via
tauri-plugin-autostart - Rive Animations π‘: Scaffolded; emoji placeholder active (Rive canvas integration pending)
- XP & Coins: Awarded for task completion (+25 XP / +5 coins per task) and milestones (variable XP)
- Levels: Dynamic curve (100 + (level-1)Γ50 XP per level); level-up triggers celebration + bonus coins
- Streaks: Daily streak tracking (current/longest); milestone notifications at 3/7/30 day streaks
- Achievements: 8 seeded achievements (First Steps, Getting Going, Centurion, On a Roll, Unstoppable, Dedicated, Rising Star, Pro)
- Profile: Live profile panel with level ring, XP bar, streak counter, coin balance
- Inventory β¬: Tables seeded; shop UI not yet implemented
- Daily Reports: AI-generated summaries; deterministic fallback when offline
- Focus Analytics: Focus time by hour-of-day, 7-day focus trends, completion rate
- Charting: Recharts area + bar charts (Insights tab)
- Activity Log: Track XP awards, task completions, level-ups, streaks
- Desktop Notifications: Via
tauri-plugin-notificationfor task reminders - Reminder Loop: 30-second poller in pet window (stays active even if dashboard minimized)
- Per-Block Reminders: One notification per scheduled task block at start time
- Smart Reminders π‘: Deadline-based reminders and snooze pending
βββββββββββββββββββββββββββββββββββββββ ββββββββββββββββββββ
β Dashboard Window β β Pet Window β
β (1100Γ720, normal frame) ββββββββΊβ (240Γ240, β
βββββββββββββββββββββββββββββββββββββββ€ Eventsβ transparent, β
β β’ Schedule timeline & task cards β β always-on-top, β
β β’ Settings & API key management β β frameless) β
β β’ Analytics & achievements β β β
β β’ Focus timer β β β’ Pet canvas β
β β’ Daily reports β β β’ Emotion state β
βββββββββββββββββββββββββββββββββββββββ β β’ Reminder loop β
β ββββββββββββββββββββ
ββββΊ System Tray (Show / Sleep / Quit)
β
SQLite Database (local, shared)
User Input (Tasks)
β
βββββββββββββββββββββββββββββββββββββββββββ
β AI Provider: Gemini LLM (Fuzzy) β
β β’ Parse free-form input β
β β’ Break into ordered milestones β
β β’ Estimate time, assign priority β
β β’ Detect fixed-time events β
β β’ Return: structured JSON (schema-safe) β
βββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββββββββββββββ
β Deterministic Packer (Pure TypeScript) β
β β’ Sort flexible tasks by priority/date β
β β’ Pin fixed-time events at exact times β
β β’ Compute free gaps β
β β’ Flow tasks into gaps β
β β’ Insert Pomodoro breaks (50+10 min) β
β β’ Return: blocks + overflow list β
βββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββββββββββββββ
β SQLite Local Database β
β β’ Upsert schedules & blocks β
β β’ Emit schedule_updated event β
βββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββββββββββββββ
β Zustand Stores (Both Windows) β
β β’ useScheduleStore β
β β’ useTaskStore β
β β’ usePetStore β
β β’ useProfileStore β
βββββββββββββββββββββββββββββββββββββββββββ
β
React UI Renders (Dashboard + Pet)
src/
βββ apps/
β βββ dashboard/
β β βββ DashboardApp.tsx # Shell + nav routing
β β βββ TodayView.tsx # Day planning + task mgmt
β β βββ TimelineView.tsx # Schedule visualization
β β βββ AnalyticsView.tsx # Charts + reports
β β βββ RewardsView.tsx # Achievements + profile
β β βββ SettingsView.tsx # API key, preferences
β βββ pet/
β βββ PetApp.tsx # Floating window, emotion, tray
βββ components/ # Reusable React components
βββ db/
β βββ schema.ts # SQLite schema (14 tables)
β βββ index.ts # execute/query helpers
βββ services/ # Business logic modules
β βββ ai/
β β βββ provider.ts # LlmProvider interface
β β βββ gemini.ts # Gemini (active)
β β βββ groq.ts # Groq (partial)
β β βββ index.ts # Factory
β βββ scheduler/
β β βββ packer.ts # Deterministic packing (pure)
β βββ tasks.ts # Task CRUD
β βββ schedule.ts # Schedule generation
β βββ milestones.ts # Milestone ops
β βββ focus.ts # Focus session tracking
β βββ gamification.ts # XP, coins, levels, streaks
β βββ reports.ts # Daily reports, analytics
β βββ notifications.ts # Notification scheduling
β βββ reminderLoop.ts # 30s scheduler in pet window
β βββ pet.ts # Pet state mgmt
β βββ settings.ts # Settings persistence
βββ stores/ # Zustand state (7 stores)
βββ lib/
β βββ events.ts # Typed Tauri event bus
β βββ secureStore.ts # OS keychain API key storage
β βββ datetime.ts # Local time helpers
βββ types.ts # Domain TypeScript types
βββ index.css # Tailwind + globals
src-tauri/
βββ src/lib.rs # Entry: plugins, tray, events
βββ tauri.conf.json # Window + build config
βββ capabilities/default.json # Security permissions (Tauri v2)
βββ Cargo.toml # Rust dependencies
| Component | Tech | Version | Purpose |
|---|---|---|---|
| Desktop | Tauri | 2 | Native shell, minimal footprint |
| Frontend | React + TypeScript + Vite | 19 / 5.8 / 7 | Reactive UI, type-safe, fast bundling |
| Styling | Tailwind CSS | 4 | Utility-first CSS |
| Components | shadcn/ui + Radix UI | Latest | Accessible, pre-built components |
| Icons | Lucide React | 0.469+ | Consistent icon set |
| Animation | Framer Motion | 12 | Micro-interactions |
| Pet Rendering | Rive | Scaffolded | State-machine animations (pending) |
| State | Zustand | 5 | Lightweight, multi-window sync |
| Database | SQLite | Embedded | Local-first, offline |
| DB Plugin | tauri-plugin-sql | 2 | SQL from TypeScript |
| Charts | Recharts | 2.15 | React charting |
| HTTP | tauri-plugin-http | 2 | Outbound calls (Gemini) |
| Notifications | tauri-plugin-notification | 2 | OS desktop notifications |
| Storage | tauri-plugin-store | 2 | Secure keychain storage |
| Auto-Start | tauri-plugin-autostart | 2 | Launch on login |
The hybrid scheduler separates fuzzy (subjective) work from exact (deterministic) work.
Gemini LLM handles subjective decisions:
Input:
DSA practice (2 hrs), EKAM development (4 hrs), writeup (1 hr)
Available: 9 AM β 8 PM
Output (JSON-validated):
{
"tasks": [
{
"title": "DSA Practice",
"priority": "high",
"estimatedMinutes": 120,
"milestones": [
{ "title": "Review concepts", "estimatedMinutes": 30 },
{ "title": "Solve problems", "estimatedMinutes": 60 },
{ "title": "Review solutions", "estimatedMinutes": 30 }
]
},
...
]
}Pure TypeScript algorithm ensures reproducible, conflict-free schedules. No database access; fully testable.
Algorithm:
- Sort flexible tasks by priority, deadline, input order
- Pin fixed-time events (contests, meetings) at exact times
- Compute free gaps around anchored events
- Flow flexible tasks into gaps:
- Non-splittable (exam, contest): requires one contiguous gap or overflow
- Splittable (study, chores): broken into 50-min focus chunks with 10-min breaks
- Return non-overlapping blocks + overflow list
Output:
9:00β9:10 Break
9:10β10:00 DSA Part 1/3
10:00β10:10 Break
10:10β11:00 DSA Part 2/3
11:00β12:00 EKAM Part 1/4
12:00β13:00 Lunch Break
...
Code: src/services/scheduler/packer.ts (pure) + src/services/schedule.ts (orchestration)
interface LlmProvider {
readonly id: LlmProviderId;
breakdownTasks(input: string, ctx: PlanContext): Promise<StructuredPlan>;
generateSummary(context: string): Promise<string>;
classifyIntent(message: string): Promise<Intent>;
}| Provider | Status | Details |
|---|---|---|
| Gemini | β | Default; free tier; schema-validated structured output |
| Groq | π‘ | Scaffolded; partial implementation |
| OpenAI | β¬ | Interface-ready; implementation pending |
| Claude | β¬ | Interface-ready; implementation pending |
- Intent Classification: Classifies input as "productivity" or "off_topic" before answering
- Structured Output: JSON schema enforcement ensures valid task structure
- Scope Limiting: System prompt keeps responses productivity-focused
- API Keys: Stored in OS keychain via
tauri-plugin-store(never disk-persisted) - BYOK Model: Users bring their own free-tier API keys
- Test Function: Settings panel includes key verification before saving
- Node.js 16+, npm
- Rust toolchain (via rustup)
- WebView2 runtime (Windows 11+; auto-handled on macOS/Linux)
- MSVC linker (Windows only)
# Install MSVC build tools
winget install --id Microsoft.VisualStudio.2022.BuildTools `
--override "--quiet --add Microsoft.VisualStudio.Workload.VCTools --includeRecommended"
# Install Rust
winget install --id Rustlang.Rustup
# Restart PowerShell for PATH updates
# Clone & install
git clone https://github.com/neha23jk/Milo.git
cd Milo && npm installcurl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env
git clone https://github.com/neha23jk/Milo.git
cd Milo && npm installsudo apt-get update
sudo apt-get install -y build-essential curl libssl-dev libgtk-3-dev libayatana-appindicator3-dev
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env
git clone https://github.com/neha23jk/Milo.git
cd Milo && npm installnpm run tauri devLaunches both windows. On first run:
- SQLite creates
mochi.dbin app data dir - Schema + seed data applied automatically
- Pet appears on desktop
npm run dev # Vite dev server (browser preview)
npm run build # Production bundle
npm run preview # Preview buildNote: Browser mode stubs Tauri APIs (database, notifications are no-ops).
- Settings β Paste Google Gemini API key (get free tier)
- Test Key β Verify connectivity
- Show Pet β Click or use system tray
- Click Pet β Opens task-entry dialog
- Enter Day's Tasks β "DSA 2 hrs, Homework 1 hr"
- Generate Schedule β AI breaks down, packer lays out timeline
- Start Focus β Reminders fire at block start times
- Daily Report β View AI summary + stats at day's end
14 tables (single-user, local-first):
| Table | Purpose |
|---|---|
profile |
User level, XP, coins, streaks, pet type |
tasks |
Task definitions, status, priority, deadline, fixed times |
milestones |
Task decomposition, XP rewards |
schedules |
Daily schedule metadata (date, availability window) |
schedule_blocks |
Time slots (task / break / buffer) |
focus_sessions |
Work sessions (start, end, duration) |
reports |
Daily productivity reports + AI summaries |
pet_state |
Pet emotion, growth stage, last interaction |
achievements |
Achievements catalog (8 seeded) |
user_achievements |
Unlocked achievements + timestamps |
inventory |
Pet accessories, hats, furniture, backgrounds |
notifications |
Pending/fired desktop notifications |
activity_log |
XP awards, task/milestone completions, level-ups, streaks |
settings |
Key-value config (theme, work hours, provider, etc.) |
| Phase | Status | Notes |
|---|---|---|
| 1 | β | Tauri scaffold, React + TS + Vite, SQLite, Zustand |
| 2 | β | Task CRUD, AI breakdown, deterministic packer, Schedule UI |
| 3 | π‘ | Pet window (floating, draggable, emoji sprite β ; Rive pending) |
| 4 | β | Notifications, reminder loop (30s), cross-window sync |
| 5 | β | Gamification (XP, levels, streaks, 8 achievements, profile UI) |
| 6 | π‘ | Advanced AI (intent guardrail β ; provider expansion ready) |
| 7 | β¬ | Polish, performance, accessibility, test suite |
| Feature | Status | Notes |
|---|---|---|
| Rive Animations | π‘ | Canvas scaffolded; emoji sprite active |
| Click-Through Pet | π‘ | setIgnoreCursorEvents not yet enabled |
| Fullscreen Auto-Hide | π‘ | Setting exists; logic pending |
| Inventory / Shop | β¬ | Tables seeded; UI not built |
| Pet Growth Stages | β¬ | Not tied to level yet |
| Multi-Device Sync | β¬ | Planned: PostgreSQL + offline replication |
| Authentication | β¬ | Single-user local MVP |
Located in src/services/scheduler/packer.ts:
- Pure: No DB access, no Tauri calls, fully testable
- Reproducible: Same input β same output
- Fair: Respects priorities, deadlines, task splittability
- Overflow Aware: Reports unscheduled work with reason (no_room vs. no_contiguous_gap)
- Source of Truth: SQLite
- Change Notification: Tauri event bus + custom events
- State Management: Zustand subscribers in both windows
- Consistency: Eventual consistency via event-driven updates
- No Polling: All updates are push-based
- Window Config: transparent + always-on-top + skip-taskbar + no-focus
- System Tray: Keeps app alive when dashboard closed
- Reminder Loop: 30-second poller (runs in pet window, fires desktop notifications)
- Auto-Start: Launches on login
- Fork repo
- Create feature branch (
git checkout -b feature/xyz) - Make changes; ensure types pass (
npm run build) - Commit with clear messages
- Open PR with description
Architecture Principles:
- TypeScript-first; minimal Rust
- Local-first; offline-ready
- Pure functions where possible (packer is fully pure)
- Event-driven state sync (no polling)
- Secure by default (keychain-backed API keys)
| File | Purpose |
|---|---|
idea.md |
Full specification + design rationale |
SETUP.md |
Detailed platform-specific setup |
work.md |
Implementation status + next steps |
package.json |
npm dependencies |
src-tauri/Cargo.toml |
Rust dependencies |
vite.config.ts |
Vite config (multi-page build) |
Q: Do I need Rust installed to develop?
A: No for frontend-only work (npm run dev). Yes for full app testing (npm run tauri dev).
Q: Is my data secure?
A: Yes. SQLite is local; API keys stored in OS keychain. No data leaves your machine without explicit action.
Q: Can I use a different LLM?
A: Yes. The LlmProvider interface supports it. Only Gemini is wired; adding others is straightforward.
Q: Will this support multi-device sync?
A: Planned. Future phase includes PostgreSQL backend + offline-first replication.
Q: Mobile support?
A: Not in MVP scope. Tauri can target iOS/Android later.
MIT β See LICENSE
Built for focus and productivity.