# Enhanced Todo API Application This is an improved Todo API application built with FastAPI and SQLite, featuring advanced task management capabilities. ## Features - Create, Read, Update, and Delete todos - Todo prioritization (low, medium, high) - Due dates for deadline tracking - Tag/category support for organizing todos - Advanced search and filtering capabilities - Upcoming tasks view for planning - Health endpoint for monitoring application status - SQLite database for data persistence - Alembic for database migrations - **NEW** Subtasks support for breaking down complex todos - **NEW** Task reminder functionality ## Project Structure ``` simpletodoapplication/ ├── app/ │ ├── __init__.py │ ├── database.py │ ├── models.py │ └── schemas.py ├── migrations/ │ ├── versions/ │ │ ├── 001_create_todos_table.py │ │ ├── 002_add_priority_and_due_date.py │ │ ├── 003_add_tags_table_and_associations.py │ │ └── 004_add_subtasks_and_reminders.py │ ├── env.py │ ├── README │ └── script.py.mako ├── alembic.ini ├── main.py └── requirements.txt ``` ## API Endpoints ### Health - `GET /health` - Check API health ### Todo Management - `GET /todos` - Get all todos with optional filtering - `POST /todos` - Create a new todo - `POST /todos/with-tags` - Create a new todo with tags (creates tags if they don't exist) - `GET /todos/{todo_id}` - Get a specific todo - `PUT /todos/{todo_id}` - Update a todo - `DELETE /todos/{todo_id}` - Delete a todo ### Search & Filtering - `GET /todos/search` - Search todos by title, description, or tag - `GET /todos/upcoming` - Get todos due in the next N days (defaults to 7) - `GET /todos/reminders` - Get todos with reminders in the next N hours (defaults to 24) - `GET /todos` - With query parameters for advanced filtering: - `title` - Filter by title (partial match) - `description` - Filter by description (partial match) - `completed` - Filter by completion status - `priority` - Filter by priority level - `tag` - Filter by tag name - `due_before` - Filter todos due before a specific date - `due_after` - Filter todos due after a specific date - `overdue` - Filter overdue todos ### Tag Management - `GET /tags` - Get all tags - `POST /tags` - Create a new tag - `GET /tags/{tag_id}` - Get a specific tag ### Subtask Management - `POST /todos/{todo_id}/subtasks` - Create a new subtask for a todo - `GET /todos/{todo_id}/subtasks` - Get all subtasks for a todo - `GET /subtasks/{subtask_id}` - Get a specific subtask - `PUT /subtasks/{subtask_id}` - Update a subtask - `DELETE /subtasks/{subtask_id}` - Delete a subtask - `PUT /todos/{todo_id}/complete-all-subtasks` - Mark all subtasks of a todo as completed ### Reminder Management - `PUT /todos/{todo_id}/set-reminder` - Set or update a reminder for a todo ## Requirements - Python 3.8+ - Dependencies listed in requirements.txt ## Installation and Setup 1. Clone the repository 2. Install dependencies: ``` pip install -r requirements.txt ``` 3. Run database migrations: ``` alembic upgrade head ``` 4. Start the server: ``` uvicorn main:app --reload ``` ## API Documentation Once the application is running, you can access: - Swagger UI documentation at `/docs` - ReDoc documentation at `/redoc`