Skip to content

This Task Manager Application is a simple task management tool built using Python and Tkinter. The purpose of this application is to introduce beginner programmers to CRUD functionality with a database.

License

Notifications You must be signed in to change notification settings

saidurpulok/task_manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Task Manager Pro

A feature-rich, intermediate-level task management application built with Python and Tkinter. This application demonstrates professional software development practices including MVC architecture, database migrations, data export/import, and comprehensive testing.

🎯 Project Level: Intermediate

This project has been enhanced from a beginner-level application to an intermediate-level application with professional features and best practices.

✨ Features

Core Functionality

  • βœ… Full CRUD Operations - Create, Read, Update, and Delete tasks
  • πŸ“ Task Editing - Edit any task attribute at any time
  • βœ“ Task Completion - Mark tasks as complete or incomplete
  • 🎨 Color-Coded Priorities - Visual priority indicators (Low, Medium, High, Urgent)
  • πŸ“ Categories - Organize tasks with custom categories
  • πŸ“… Due Dates - Set and track task deadlines
  • ⚠️ Overdue Detection - Automatic highlighting of overdue tasks

Advanced Features

  • πŸ” Search & Filter - Search by description, filter by category or priority
  • πŸ“Š Task Statistics - View comprehensive statistics about your tasks
  • πŸ’Ύ Data Export - Export tasks to JSON or CSV formats
  • πŸ“₯ Data Import - Import tasks from JSON or CSV files
  • πŸ”„ Backup & Restore - Create database backups and restore when needed
  • πŸ—‚οΈ Multi-Column View - Sortable columns with TreeView widget
  • 🎯 Category Management - Create and manage custom categories

Technical Features

  • πŸ—οΈ MVC Architecture - Properly separated concerns with models, views, and database layers
  • πŸ—„οΈ Database Migrations - Automatic schema versioning and migration
  • πŸ“ Comprehensive Logging - Application logging with file and console output
  • βš™οΈ Configuration Management - Environment variable support
  • πŸ§ͺ Unit Tests - Extensive test coverage for models and database operations
  • πŸ”’ Error Handling - Robust error handling with user-friendly messages
  • 🎨 Modern UI - Clean, intuitive interface with keyboard shortcuts

πŸ“ Project Structure

task_manager/
β”œβ”€β”€ config/              # Configuration and settings
β”‚   β”œβ”€β”€ __init__.py
β”‚   └── settings.py      # Application settings with env variable support
β”œβ”€β”€ models/              # Data models
β”‚   β”œβ”€β”€ __init__.py
β”‚   β”œβ”€β”€ task.py          # Task model with validation
β”‚   └── category.py      # Category model
β”œβ”€β”€ utils/               # Utility modules
β”‚   β”œβ”€β”€ __init__.py
β”‚   β”œβ”€β”€ data_export.py   # Export/import functionality
β”‚   └── validators.py    # Data validation utilities
β”œβ”€β”€ views/               # UI components
β”‚   β”œβ”€β”€ __init__.py
β”‚   └── main_window.py   # Main application window
β”œβ”€β”€ tests/               # Unit tests
β”‚   β”œβ”€β”€ __init__.py
β”‚   β”œβ”€β”€ test_task.py     # Task model tests
β”‚   └── test_database.py # Database operation tests
β”œβ”€β”€ data/                # Data directory (auto-created)
β”‚   β”œβ”€β”€ exports/         # Exported files
β”‚   └── backups/         # Database backups
β”œβ”€β”€ logs/                # Log files (auto-created)
β”œβ”€β”€ database.py          # Enhanced database layer with migrations
β”œβ”€β”€ main.py              # Application entry point
β”œβ”€β”€ requirements.txt     # Python dependencies
β”œβ”€β”€ .env.example         # Example environment configuration
β”œβ”€β”€ .gitignore          # Git ignore file
└── README.md           # This file

πŸš€ Installation

Prerequisites

  • Python 3.8 or higher
  • pip (Python package installer)

Setup Instructions

  1. Clone the Repository

    git clone https://github.com/saidurpulok/task_manager.git
    cd task_manager
  2. Install Dependencies

    pip install -r requirements.txt

    Note: Tkinter usually comes with Python. If not installed:

    • Linux: sudo apt-get install python3-tk
    • macOS: Included with Python
    • Windows: Included with Python
  3. Configure Environment (Optional)

    cp .env.example .env
    # Edit .env file with your preferences
  4. Run the Application

    python main.py

πŸ’‘ Usage

Basic Operations

Adding a Task

  1. Click "Add Task" button or press Ctrl+N
  2. Enter task description (required)
  3. Select priority level (Low, Medium, High, Urgent)
  4. Choose or create a category
  5. Set a due date (optional, format: YYYY-MM-DD)
  6. Click "Save"

Editing a Task

  1. Select a task from the list
  2. Click "Edit Task" button or press Ctrl+E
  3. Modify any fields
  4. Click "Save"

Managing Tasks

  • Mark Complete: Select a task and click "Mark Complete"
  • Mark Incomplete: Select a completed task and click "Mark Incomplete"
  • Delete Task: Select a task and press Delete key or click "Delete Task"

Advanced Features

Search and Filter

  • Use the Search box to find tasks by description
  • Filter by Category using the dropdown
  • Filter by Priority using the dropdown
  • Click Clear Filters to reset all filters

Data Management

  • Export to JSON/CSV: File β†’ Export to JSON/CSV
  • Import from JSON/CSV: File β†’ Import from JSON/CSV
  • Create Backup: File β†’ Create Backup
  • Restore Backup: File β†’ Restore Backup

Category Management

  • Access via Category β†’ Manage Categories
  • Add new categories
  • Delete unused categories (tasks will move to "General")

Statistics

  • View via View β†’ Statistics or F5 to refresh
  • See task counts by priority and category
  • Track overdue tasks
  • Monitor completion rates

Keyboard Shortcuts

  • Ctrl+N - Add new task
  • Ctrl+E - Edit selected task
  • Delete - Delete selected task
  • F5 - Refresh view
  • Double-click on task - Quick edit

πŸ§ͺ Running Tests

Run the test suite to verify everything works correctly:

# Run all tests
python -m unittest discover tests

# Run specific test file
python -m unittest tests.test_task
python -m unittest tests.test_database

# Run with verbose output
python -m unittest discover tests -v

βš™οΈ Configuration

The application can be configured using environment variables. Copy .env.example to .env and modify:

# Database location
TASK_MANAGER_DB=tasks.db

# Logging level (DEBUG, INFO, WARNING, ERROR, CRITICAL)
LOG_LEVEL=INFO

# Window dimensions
WINDOW_WIDTH=1000
WINDOW_HEIGHT=700

πŸ“Š Database

The application uses SQLite for data persistence:

  • Automatic Schema Management: Database schema is versioned and automatically migrated
  • Data Integrity: Foreign keys and constraints ensure data consistency
  • Performance: Indexed columns for fast queries
  • Backup-Friendly: Simple file-based storage for easy backups

Schema

Tasks Table:

  • id - Unique identifier
  • description - Task description
  • priority - Priority level (Low, Medium, High, Urgent)
  • category - Task category
  • due_date - Optional due date
  • completed - Completion status
  • created_at - Creation timestamp
  • updated_at - Last update timestamp
  • completed_at - Completion timestamp

Categories Table:

  • id - Unique identifier
  • name - Category name (unique)
  • description - Category description

πŸŽ“ Learning Highlights

This project demonstrates intermediate Python concepts:

  1. Object-Oriented Programming: Classes, inheritance, encapsulation
  2. Database Management: SQLite, migrations, transactions
  3. Error Handling: Try-except blocks, custom exceptions
  4. Logging: Structured logging for debugging and monitoring
  5. Testing: Unit tests with unittest framework
  6. GUI Development: Tkinter, event handling, custom dialogs
  7. File I/O: JSON and CSV export/import
  8. Code Organization: Modular structure, separation of concerns
  9. Data Validation: Input validation and sanitization
  10. Configuration: Environment variables and settings management

🀝 Contributing

Contributions are welcome! Here are some ideas for enhancements:

  • Add recurring tasks functionality
  • Implement task reminders/notifications
  • Add dark mode theme
  • Create task templates
  • Add task attachments
  • Implement task dependencies
  • Add calendar view
  • Create reports and charts
  • Add user authentication
  • Implement cloud sync

How to Contribute

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ‘€ Author

Saidur Rahman Pulok

πŸ™ Acknowledgments

  • Built as an educational project to demonstrate intermediate Python programming
  • Enhanced from a beginner-level project to showcase professional development practices
  • Thanks to the Python and Tkinter communities for excellent documentation

Note: This is an educational project designed to demonstrate intermediate-level Python programming concepts. Feel free to use it as a learning resource or starting point for your own projects!

About

This Task Manager Application is a simple task management tool built using Python and Tkinter. The purpose of this application is to introduce beginner programmers to CRUD functionality with a database.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages