Created by Lucy Piao (UMID:37872192)
An intelligent Todo application built with Jac that uses AI to automatically categorize tasks, predict priorities, and assign rewards.
- ✅ Add and manage todos
- 🤖 AI-powered automatic categorization (Work, Personal, Shopping, Health, Other)
- 🎯 AI-predicted priority levels (Low, Medium, High)
- ⭐ Smart reward system (None, 1-3 stars)
- 🔄 Manual priority adjustment
- 📊 Sort todos by priority
- ✔️ Mark tasks as complete
- 🗑️ Delete tasks
🎯 AI-predicted priority levels (Low, Medium, High)
- AI model definition: main.jac -
predict_priority()function uses LLM - Priority enum: main.jac - Defines LOW, MEDIUM, HIGH levels
- Priority prediction in action: main.jac - Called when adding new todos
⭐ Smart reward system (None, 1-3 stars)
- AI model definition: main.jac -
predict_reward()function uses LLM - Reward enum: main.jac - Defines NONE, ONE_STAR, TWO_STARS, THREE_STARS
- Reward prediction: main.jac - Considers task category and priority
- Display in UI: main.jac - Shows reward badge for each todo
🔄 Manual priority adjustment
- Backend update function: main.jac -
update_priority()updates database - Frontend handler: main.jac -
change_priority()updates UI state - UI dropdown selector: main.jac - Allows users to select Low/Medium/High
📊 Sort todos by priority
- Backend sort function: main.jac -
sort_todos_by_priority()with priority mapping - Frontend toggle handler: main.jac -
toggle_sort()enables/disables sorting - UI checkbox control: main.jac - "Sort by Priority" checkbox
- Auto-sort on changes: main.jac - Re-sorts when priority is manually changed
Before you begin, ensure you have the following installed:
- Jac (Jaseci CLI)
- Python 3.12+
-
Clone the repository
gh repo clone ruixip/interactive-todo cd my-todo -
Set up your Anthropic API key
The app uses Claude AI for intelligent features. You need an Anthropic API key:
export ANTHROPIC_API_KEY='your-api-key-here'
Start the development server:
jac start main.jacThe application will automatically:
- Install necessary dependencies
- Build the client-side code
- Start the development server
- Open the app in your browser (typically at http://localhost:8000)
- Add a Todo: Type your task in the input field and press Enter or click "Add"
- AI Processing: The app will automatically:
- Categorize the task
- Assign a priority level
- Suggest a reward
- Sort by Priority: Check the "Sort by Priority" checkbox to view tasks ordered by importance (High → Medium → Low)
- Change Priority: Use the dropdown menu on each task to manually adjust priority
- Complete Tasks: Click the checkbox to mark tasks as done
- Delete Tasks: Click the "X" button to remove tasks
my-todo/
├── jac.toml # Project configuration
├── main.jac # Main application (backend functions + UI)
├── styles.css # Application styles
├── components/ # Reusable components
│ └── Button.cl.jac # Button component
└── assets/ # Static assets
The app uses Claude Sonnet 4 for AI features. You can modify the model in main.jac:
glob llm = Model(model_name="claude-sonnet-4-20250514");