A Flask-based web application for managing todos with a clean interface and REST API support. This application provides a full-featured todo management system with database integration.
- Python 3.8 or higher
- pip (Python package installer)
- Git
git clone <repository-url>
cd todo-manager# Create virtual environment
python3 -m venv venv
# Activate virtual environment
source venv/bin/activate# Create virtual environment
python -m venv venv
# Activate virtual environment
venv\Scripts\activateWith the virtual environment activated, install the required packages:
pip install -r requirements.txtWhen running the application for the first time, the SQLite database will be automatically created.
# Make sure your virtual environment is activated
source venv/bin/activate
# Run the application
python3 app.py# Make sure your virtual environment is activated
venv\Scripts\activate
# Run the application
python app.pyThe application will be available at http://localhost:5001
- Create new todos with titles, descriptions, and due dates
- View list of todos in a card layout
- Update existing todos
- Mark todos as complete/incomplete
- Delete todos
- Search todos in real-time
- RESTful API endpoints
- Bootstrap-based responsive design
- GET
/api/todos- List all todos - GET
/api/todos/<id>- Get a specific todo - POST
/api/todos- Create a new todo - PUT
/api/todos/<id>- Update a todo - DELETE
/api/todos/<id>- Delete a todo
todo_manager/
├── app.py # Main Flask application
├── models.py # Database models
├── forms.py # Form definitions
├── requirements.txt # Project dependencies
├── templates/ # HTML templates
│ ├── base.html
│ ├── index.html
│ ├── add_todo.html
│ └── update_todo.html
└── static/
└── js/
└── search.js # Client-side search functionality
If you get an error about port 5001 being in use:
- Change the port number in
app.py - Or kill the process using the port:
# For macOS/Linux lsof -i :5001 kill -9 <PID> # For Windows netstat -ano | findstr :5001 taskkill /PID <PID> /F
If you have problems with the virtual environment:
- Delete the
venvdirectory - Re-create it following the installation steps above
If you encounter database problems:
- Delete the
todos.dbfile - Restart the application to create a fresh database
When you're done working on the project:
deactivate- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details