A feature-rich command-line todo application built with Test-Driven Development (TDD) and Spec-Driven Development (SDD), featuring three-tier progressive architecture: Primary (CRUD), Intermediate (Organization), and Advanced (Automation).
π― Hackathon Project: Built with rigorous software engineering practices - 317 comprehensive tests, 85% code coverage, clean architecture, and professional-grade code quality.
- β Add tasks with title, description, priority, and tags
- β View all tasks with visual indicators
- β Update task details
- β Delete tasks with confirmation
- β Status Mark submenu (Complete/Incomplete with A/B selection)
- π·οΈ Priority management (HIGH/MEDIUM/LOW)
- π·οΈ Tags and categories (Work/Home + custom)
- π Scheduled tasks with due dates and overdue detection
- π Search tasks by keyword
- π― Filter by status, priority, tags, or date
- π Sort by due date, priority, title, or created date
- π Recurring tasks (DAILY/WEEKLY/MONTHLY/YEARLY)
- β° Due date and time reminders with desktop notifications
- πΎ Automatic JSON storage - All tasks saved to disk automatically
- π File locking - Prevents data corruption from multiple instances
- β‘ Atomic writes - Safe saves with automatic backup recovery
- π Platform-specific paths:
- Windows:
%APPDATA%\todo-app\tasks.json - macOS:
~/Library/Application Support/todo-app/tasks.json - Linux:
~/.local/share/todo-app/tasks.json
- Windows:
- Python 3.9 or higher
- pip package manager
- Clone the repository:
git clone https://github.com/Malikasadjaved/Python-Todo-Cli-App.git
cd Python-Todo-Cli-App- Create and activate virtual environment:
# Windows
python -m venv venv
venv\Scripts\activate
# macOS/Linux
python3 -m venv venv
source venv/bin/activate- Install dependencies:
pip install -r requirements.txt- Install development dependencies (optional, for testing):
pip install -r requirements-dev.txtRun the application:
python main.pyDue Date Input:
- Format:
YYYY-MM-DDorYYYY-MM-DD HH:MM(24-hour time) - Examples:
2025-12-25(date only, defaults to 00:00)2025-12-25 14:30(specific time: 2:30 PM)
Timezone Handling:
- All times are in local system timezone
- Overdue detection uses current local time
Available Patterns:
- DAILY: Repeats every day at the same time
- WEEKLY: Repeats every 7 days from completion date
- BIWEEKLY: Repeats every 14 days from completion date
- MONTHLY: Repeats on the same day next month (edge case: Jan 31 β Feb 28/29)
- YEARLY: Repeats on the same date next year (handles Feb 29 leap years)
Behavior:
- When you mark a recurring task as complete, a new task instance is automatically created
- The new task has the next due date calculated based on the recurrence pattern
- All other properties (title, description, priority, tags, reminder) are preserved
Edge Cases Handled:
- Month-end dates: Jan 31 with monthly recurrence becomes Feb 28 (or 29 in leap years)
- Leap years: Feb 29 with yearly recurrence becomes Feb 28 in non-leap years
Desktop Notifications:
- Cross-platform system notifications using
plyerlibrary - Supported on Windows, macOS, and Linux
Reminder Configuration:
- Set reminder offset when creating or updating tasks
- Offset is specified in hours before the due date/time
- Example: For a task due at 2:00 PM with 1-hour reminder, notification triggers at 1:00 PM
Notification Timing:
- The notification system runs in the background when the app is active
- Reminders trigger at the calculated time (due_date - reminder_offset)
- Each task can have one reminder configuration
The application presents a menu organized by feature tier:
=== Python CLI Todo Application ===
PRIMARY TIER - Core Operations:
1. Add Task
2. View All Tasks
3. Update Task
4. Delete Task
5. Status Mark (Complete/Incomplete)
INTERMEDIATE TIER - Organization:
6. Search Tasks
7. Filter Tasks
8. Sort Tasks
ADVANCED TIER - Automation:
9. Recurring Tasks (Automatic)
10. Reminders (Automatic)
0. Exit
Enter a number or keyword (e.g., "add", "list", "search") to select an option.
Add a task:
Choose option: 1
Enter title: Team meeting
Enter description: Weekly sync with development team
Select Priority:
1. HIGH
2. MEDIUM (default)
3. LOW
Enter choice (1-3) [2]: 1
Tags (comma-separated): Work, Meeting
Due date (YYYY-MM-DD or YYYY-MM-DD HH:MM): 2025-12-10 14:00
Select Recurrence (optional):
1. DAILY
2. WEEKLY
3. BIWEEKLY
4. MONTHLY
5. YEARLY
0. None (no recurrence)
Enter choice (0-5) [0]: 2
Search tasks:
Choose option: 6
Enter keyword: meeting
Found 3 tasks matching 'meeting'
Filter tasks:
Choose option: 7
Filter by status (complete/incomplete/all): incomplete
Filter by priority (HIGH/MEDIUM/LOW/all): HIGH
Found 5 tasks matching criteria
# Run all tests
pytest
# Run with coverage
pytest --cov=src/todo --cov-report=html
# Run specific test file
pytest tests/test_models.py -v# Format code
black src/ tests/
# Lint code
flake8 src/ tests/
# Type checking
mypy src/ --strictTo-do-app/
βββ src/
β βββ todo/
β βββ __init__.py
β βββ models.py # Task data model, enums
β βββ storage.py # In-memory CRUD operations
β βββ commands.py # Business logic
β βββ filters.py # Search, filter, sort
β βββ scheduler.py # Recurring tasks
β βββ notifications.py # Reminders
β βββ cli.py # CLI interface
βββ tests/
β βββ conftest.py # Shared fixtures
β βββ test_models.py
β βββ test_storage.py
β βββ test_commands.py
β βββ test_filters.py
β βββ test_scheduler.py
β βββ test_notifications.py
β βββ test_cli.py
βββ main.py # Entry point
βββ requirements.txt
βββ requirements-dev.txt
βββ pyproject.toml
βββ .flake8
βββ README.md
- Storage: In-memory with list + dict index for O(1) lookups
- Testing: TDD approach with β₯85% coverage requirement
- Code Quality: PEP 8 compliant, type-hinted, formatted with black
- Design: Layered architecture with separation of concerns
colorama- Colored terminal outputpython-dateutil- Recurrence calculationplyer- Cross-platform desktop notifications
pytest- Testing frameworkpytest-cov- Coverage reportingblack- Code formatterflake8- Lintermypy- Static type checker
- Handles 1000+ tasks without degradation
- All operations complete in < 1 second
- O(1) lookup complexity for task retrieval
Total Tests: 317 passing β
Coverage by Module:
storage.py: 100% - Core CRUD operationsfilters.py: 100% - Search/filter/sortnotifications.py: 100% - Reminder systemmodels.py: 98% - Data models and validationpersistence.py: 95% - JSON storage and file operationsscheduler.py: 90% - Recurring task logiccommands.py: 83% - Business logic layercli.py: 76% - Interactive CLI (presentation layer)
Overall: 85% (Core business logic: 90-100%)
The CLI layer has lower coverage as it's the interactive presentation layer. All core business logic is thoroughly tested with TDD approach.
PRODUCTION READY π
β 15 features complete (12 original + 3 UX enhancements) β 317 tests passing (85% coverage) β Code formatted with black β Flake8 compliant β Type-hinted β Clean architecture
See DEPLOYMENT.md for detailed deployment and usage guide.
- README.md - This file (quick start guide)
- DEPLOYMENT.md - Detailed deployment and usage guide
- PROJECT_SUMMARY.md - Complete project overview
- REQUIREMENTS_VERIFICATION.md - Constitution compliance report
- FEATURE_F013_SUMMARY.md - Latest feature (selection menus)
- CLAUDE.md - Development guidelines for Claude Code
Contributions are welcome! This project follows:
- Test-Driven Development (TDD) - Write tests first
- Spec-Driven Development (SDD) - Plan before coding
- Clean Code - PEP 8, type hints, documentation
See CLAUDE.md for detailed development workflow.
MIT License - see LICENSE file for details.
- Built with Claude Code using TDD and SDD methodologies
- Developed as part of a hackathon project
- Demonstrates professional software engineering practices