Skip to content

Repository files navigation

Advanced To-Do List with AI Summary

A modern, feature-rich to-do list web application with AI-powered task summaries using Google's Gemini API.

Features

✨ Modern UI Design

  • Dark theme with gradient accents
  • Responsive design (mobile, tablet, desktop)
  • Smooth animations and transitions
  • Real-time statistics dashboard

πŸ“‹ Task Management

  • Add, complete, and delete tasks
  • Filter tasks (All, Active, Completed)
  • Clear all completed tasks at once
  • Local storage persistence
  • Task activity tracking

πŸ€– AI-Powered Features

  • Generate intelligent summaries of your tasks using Gemini API
  • Get insights and recommendations
  • Analyze workload and priorities
  • Smart task breakdown analysis

Installation

Prerequisites

  • Python 3.8 or higher
  • pip (Python package manager)
  • A Google Gemini API key (Get one free)

Setup Steps

  1. Clone or navigate to the project directory
cd TaskM
  1. Create a virtual environment (recommended)
# Windows
python -m venv venv
venv\Scripts\activate

# macOS/Linux
python3 -m venv venv
source venv/bin/activate
  1. Install dependencies
pip install -r requirements.txt
  1. Configure Gemini API
# Copy the example file
cp .env.example .env

# Edit .env and add your Gemini API key
# On Windows, you can use: copy .env.example .env
  1. Add your Gemini API key
  • Visit https://ai.google.dev/
  • Generate an API key
  • Open .env file and replace your_api_key_here with your actual API key

Running the Application

Start the Flask Server

# Make sure your virtual environment is activated
python app.py

The application will start at http://localhost:5000

Access the Application

Open your browser and navigate to:

http://localhost:5000

Usage

Adding Tasks

  1. Type your task in the input field
  2. Click "Add Task" or press Enter
  3. Task appears at the top of your list

Managing Tasks

  • Check off: Click the checkbox to mark a task as complete
  • Delete: Click the delete button to remove a task
  • Filter: Use filter buttons to view All, Active, or Completed tasks

Getting AI Summary

  1. Click the "πŸ€– AI Summary" button
  2. Wait for the AI to analyze your tasks
  3. Read insights about your workload and get recommendations

View Statistics

  • Total Tasks: All tasks in your list
  • Completed: Tasks you've marked as done
  • Remaining: Active tasks to complete
  • Progress: Your completion percentage

Project Structure

TaskM/
β”œβ”€β”€ app.py                 # Flask backend
β”œβ”€β”€ requirements.txt       # Python dependencies
β”œβ”€β”€ .env.example          # Environment variables template
β”œβ”€β”€ README.md             # This file
β”œβ”€β”€ static/
β”‚   β”œβ”€β”€ style.css         # Styling
β”‚   └── script.js         # Frontend logic
└── templates/
    └── index.html        # Main HTML template

API Endpoints

GET /

Serves the main application page

GET /api/health

Health check endpoint

{
  "status": "healthy",
  "gemini_configured": true,
  "model_initialized": true
}

POST /api/generate-summary

Generate AI summary of tasks

Request:

{
  "tasks": [
    {
      "id": 1234567890,
      "text": "Task description",
      "completed": false,
      "createdAt": "12/5/2025, 10:30:45 AM"
    }
  ]
}

Response:

{
  "summary": "AI-generated summary text...",
  "task_count": 5,
  "completed_count": 2,
  "active_count": 3
}

Configuration

Environment Variables (.env)

Variable Description Required
GEMINI_API_KEY Your Google Gemini API key Yes
FLASK_ENV Set to 'development' or 'production' No

Browser Support

  • Chrome 90+
  • Firefox 88+
  • Safari 14+
  • Edge 90+

Troubleshooting

"GEMINI_API_KEY not found"

  • Make sure .env file exists in the project root
  • Verify your API key is correctly set
  • Restart the Flask server

AI Summary not generating

  • Check that your Gemini API key is valid
  • Ensure you have API quota remaining
  • Check browser console for error messages

Tasks not saving

  • Check if your browser allows localStorage
  • Clear browser cache if experiencing issues
  • Try a different browser

Port 5000 already in use

  • Change the port in app.py: app.run(port=5001)
  • Or kill the process using port 5000

Performance Tips

  1. For better performance:

    • Limit to 50-100 tasks for optimal UI performance
    • Archive completed tasks periodically
    • Clear browser cache occasionally
  2. For API efficiency:

    • Use AI Summary sparingly to preserve API quota
    • Batch summaries when possible

Security Notes

  • Never commit .env file to version control
  • Keep your Gemini API key private
  • The app runs locally and doesn't store data remotely
  • Tasks are only stored in your browser's localStorage

Future Enhancements

  • Task categories and tags
  • Due dates and reminders
  • Task priority levels
  • Cloud synchronization
  • Dark/Light theme toggle
  • Task export (PDF, JSON)
  • Voice input for tasks
  • Recurring tasks

License

This project is open source and available for personal and commercial use.

Support

For issues, feature requests, or questions:

  1. Check the troubleshooting section
  2. Review API documentation at https://ai.google.dev/
  3. Check Flask documentation at https://flask.palletsprojects.com/

Resources


Made with ❀️ for productivity enthusiasts

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages