A modern, beautiful todo application built with Next.js, TypeScript, and Tailwind CSS. Features a clean interface, local storage persistence, and is optimized for deployment on Cloudflare Pages.
- ✅ Add, edit, and delete todos
- ✅ Mark todos as complete/incomplete
- ✅ Filter todos by status (all, active, completed)
- ✅ Local storage persistence
- ✅ Responsive design
- ✅ Modern UI with smooth animations
- ✅ Keyboard shortcuts (Enter to add/save, Escape to cancel)
- ✅ Clear completed todos functionality
- Next.js 15 - React framework with App Router
- TypeScript - Type-safe JavaScript
- Tailwind CSS - Utility-first CSS framework
- Lucide React - Beautiful icons
- Local Storage - Client-side data persistence
- Node.js 18+
- npm or yarn
- Clone the repository:
git clone <your-repo-url>
cd todo-app
- Install dependencies:
npm install
- Run the development server:
npm run dev
- Open http://localhost:3000 in your browser.
This app is configured for easy deployment on Cloudflare Pages with static export.
- Push your code to GitHub/GitLab
- Log in to Cloudflare Dashboard
- Go to Pages → Create a project → Connect to Git
- Select your repository
- Configure build settings:
- Build command:
npm run build
- Build output directory:
out
- Root directory:
todo-app
(if in subdirectory)
- Build command:
- Deploy!
- Build the project locally:
npm run build
- Upload the generated
out
folder to Cloudflare Pages
The app uses these settings in next.config.js
for static export:
output: 'export'
- Generates static filestrailingSlash: true
- Ensures proper routingimages: { unoptimized: true }
- Disables Next.js image optimization
# Install dependencies
npm install
# Start development server
npm run dev
# Build for production
npm run build
# Build and export static files
npm run export
todo-app/
├── src/
│ ├── app/
│ │ ├── layout.tsx # Root layout
│ │ ├── page.tsx # Home page
│ │ └── globals.css # Global styles
│ └── components/
│ └── TodoApp.tsx # Main todo component
├── next.config.js # Next.js configuration
├── tailwind.config.js # Tailwind configuration
└── package.json # Dependencies and scripts
- Add new todos with the input field and "Add" button or Enter key
- Click the checkbox to mark todos as complete/incomplete
- Edit todos in place by clicking the edit icon
- Delete todos with the trash icon
- All: Show all todos
- Active: Show only incomplete todos
- Completed: Show only completed todos
- All todos are automatically saved to browser's local storage
- Data persists between browser sessions
- No backend required
- Works seamlessly on desktop, tablet, and mobile devices
- Clean, modern interface with smooth animations
The app uses Tailwind CSS for styling. Key design tokens:
- Primary color: Blue (blue-600)
- Success color: Green (green-600)
- Danger color: Red (red-600)
- Background: Gradient from blue-50 to indigo-100
Some ideas for additional features:
- Due dates for todos
- Categories/tags
- Todo priorities
- Sync with cloud storage
- Collaborative todos
- Fork the repository
- Create a feature branch:
git checkout -b feature-name
- Commit your changes:
git commit -m 'Add feature'
- Push to the branch:
git push origin feature-name
- Submit a pull request
This project is open source and available under the MIT License.
🚀 Ready for Cloudflare Pages deployment!
The app is configured with static export and will work perfectly on Cloudflare Pages with zero configuration needed.