A full-stack todo application built with React (Frontend) and Python Flask (Backend) to help you track tasks you've been procrastinating on.
- ✅ Create, read, update, and delete todos
- 📱 Responsive design with Tailwind CSS
- ⚡ Real-time updates with TanStack Query
- 🎨 Beautiful UI with shadcn/ui components
- 📅 Automatic timestamps (created_at, updated_at)
- 🗑️ Safe delete operations with loading states
- 📊 Status tracking (completed/in progress)
- 🌍 Localized date formatting (Turkey locale)
- React with TypeScript
- TanStack Query (React Query) for data fetching
- TanStack Form for form management
- Tailwind CSS for styling
- shadcn/ui for UI components
- Lucide React for icons
- Sonner for toast notifications
- Python Flask web framework
- SQLite database
- SQLAlchemy ORM
- Flask-CORS for cross-origin requests
todo-app/
├── frontend/ # React frontend
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── lib/ # Utilities and API
│ └── package.json
├── backend/ # Python Flask backend
│ ├── app.py # Main application
│ ├── models.py # Database models
│ ├── database.py # Database setup
│ └── requirements.txt
└── README.md
- Node.js (v18 or higher)
- Python (v3.8 or higher)
- npm or yarn
-
Navigate to the backend directory:
cd backend -
Create a virtual environment:
python -m venv venv
-
Activate the virtual environment:
- Windows:
venv\Scripts\activate
- macOS/Linux:
source venv/bin/activate
- Windows:
-
Install dependencies:
pip install -r requirements.txt
-
Run the backend server:
python app.py
The backend will start on
http://localhost:5000
-
Navigate to the frontend directory:
cd frontend -
Install dependencies:
npm install
-
Start the development server:
npm run dev
The frontend will start on
http://localhost:5173(or another available port)
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/todos |
Get 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 |
Create a todo:
curl -X POST http://localhost:5000/api/todos \
-H "Content-Type: application/json" \
-d '{"title": "Learn Python", "description": "Study Flask framework"}'Get all todos:
curl http://localhost:5000/api/todos- Adding a Todo: Use the form to add new tasks with titles and descriptions
- Viewing Todos: See all your todos in a clean list view
- Updating Status: Click the checkmark to mark todos as complete/incomplete
- Viewing Details: Click on any todo to see detailed information and timestamps
- Deleting Todos: Use the delete button to remove todos you no longer need
The app uses these main components:
- TodoInput: Form for creating new todos
- TodoList: Displays all todos with loading and empty states
- TodoItem: Individual todo item with actions and detailed dialog
- Card: Container components for organized layout
- The backend uses SQLite for easy development
- Database file is automatically created in the
instancefolder - Automatic timestamp handling with SQLAlchemy
- Built with Vite for fast development
- TypeScript for type safety
- TanStack Query for efficient data synchronization
- Responsive design with Tailwind CSS
- Title field is required
- Real-time validation feedback
- Proper error messages
- Optimistic updates for better UX
- Automatic cache invalidation
- Loading states for all operations
- Strikethrough effect for completed todos
- Color-coded status badges
- Smooth transitions and animations
- Mobile-responsive design
- Fork the project
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- shadcn/ui for beautiful UI components
- TanStack for amazing React libraries
- Tailwind CSS for utility-first CSS
- Lucide for beautiful icons
Happy productivity! 🚀 Stop procrastinating and start completing those todos!