A beautiful and feature-rich todo application built with Next.js 15, Redux Toolkit, and shadcn/ui.
- β Add new todos - Create tasks with a clean input interface
- β Edit existing todos - Inline editing with save/cancel options
- β Delete todos - Remove tasks with a single click
- β Toggle completion - Mark tasks as complete/incomplete
- β Filter todos - View All, Active, or Completed tasks
- β Clear completed - Remove all completed tasks at once
- β Bulk actions - Mark all as complete/incomplete
- β Local storage persistence - Your todos are saved automatically
- β Dark/Light mode - Toggle between themes
- β Responsive design - Works on all screen sizes
- β Smooth animations - Powered by Framer Motion
- β Modern UI - Beautiful components from shadcn/ui
- Framework: Next.js 15 (App Router)
- State Management: Redux Toolkit
- Persistence: Local Storage
- UI Components: shadcn/ui
- Styling: Tailwind CSS
- Animations: Framer Motion
- Icons: Lucide React
- Theme: next-themes
- Type Safety: TypeScript
-
Clone the repository
git clone <repository-url> cd todo-app
-
Install dependencies
npm install
-
Run the development server
npm run dev- Open your browser Navigate to http://localhost:3000
/app
βββ layout.tsx # Root layout with providers
βββ page.tsx # Main todo page
βββ globals.css # Global styles
/components
βββ providers/
β βββ ReduxProvider.tsx # Redux store provider
β βββ ThemeProvider.tsx # Theme provider
βββ todo/
β βββ AddTodo.tsx # Add new todo form
β βββ FilterTabs.tsx # Filter tabs (All/Active/Completed)
β βββ TodoItem.tsx # Individual todo item
β βββ TodoList.tsx # Todo list container
βββ ui/
βββ button.tsx # shadcn/ui button
βββ input.tsx # shadcn/ui input
βββ checkbox.tsx # shadcn/ui checkbox
βββ tabs.tsx # shadcn/ui tabs
βββ card.tsx # shadcn/ui card
βββ dialog.tsx # shadcn/ui dialog
βββ theme-toggle.tsx # Theme toggle button
/store
βββ store.ts # Redux store configuration
βββ todosSlice.ts # Todos slice with reducers
βββ hooks.ts # Typed Redux hooks
/lib
βββ localStorage.ts # Local storage utilities
βββ utils.ts # Utility functions
npm run dev- Format code and start development servernpm run build- Format code and build for productionnpm run start- Start production servernpm run lint- Run ESLintnpm run format- Format all files with Prettiernpm run format:check- Check if files are formatted correctlynpm run format:fix- Fix formatting issues
- Type your task in the input field
- Press Enter or click the + button
- Your todo will appear at the top of the list
- Complete/Uncomplete: Click the checkbox or the todo text
- Edit: Click the edit icon (pencil) to modify the text
- Delete: Click the delete icon (trash) to remove the todo
- All: Shows all todos
- Active: Shows only incomplete todos
- Completed: Shows only completed todos
- Toggle All: Mark all todos as complete or incomplete
- Clear Completed: Remove all completed todos
- Click the theme toggle button (sun/moon icon) in the top right
- Supports system preference detection
The app supports both light and dark themes with automatic system preference detection. Themes are powered by next-themes and Tailwind CSS.
Colors can be customized in the app/globals.css file using CSS custom properties for both light and dark modes.
Animations are handled by Framer Motion and can be customized in individual components.
This project uses Prettier for consistent code formatting with the following configuration:
- Print Width: 120 characters
- Tab Width: 2 spaces
- Quotes: Single quotes
- Semicolons: Always
- Trailing Commas: ES5
- Bracket Spacing: Enabled
- Arrow Parens: Avoid when possible
- On Save: VS Code automatically formats files when saved
- Pre-commit: Git hooks format staged files before commit
- Build Process: Prettier runs before
devandbuildcommands - Tailwind Classes: Automatic sorting with
prettier-plugin-tailwindcss
The project includes .vscode/settings.json with:
- Format on save enabled
- Prettier as default formatter
- ESLint auto-fix on save
- Consistent editor settings
npm run format # Format all files
npm run format:check # Check formatting without changes
npm run format:fix # Fix formatting issues- Pre-commit: Automatically formats staged files
- Lint-staged: Only formats changed files for faster commits
The app uses Redux Toolkit for state management with the following structure:
interface TodosState {
todos: Todo[];
filter: 'all' | 'active' | 'completed';
}
interface Todo {
id: string;
text: string;
completed: boolean;
createdAt: number;
updatedAt: number;
}All todos are automatically saved to localStorage and restored when the app loads. The data persists across browser sessions and page refreshes.
- Centralized state management
- Immutable updates with Immer
- Type-safe actions and selectors
- Automatic localStorage synchronization
- Accessible and customizable UI components
- Consistent design system
- Built on Radix UI primitives
- Full TypeScript support
- App Router for better performance
- Server and Client Components
- Built-in optimization features
- Turbopack for faster development
- Fork the repository
- Create your 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 open source and available under the MIT License.
The following features could be implemented to enhance the todo app further:
- Due Date Assignment: Allow users to assign due dates to tasks
- Visual Indicators: Highlight overdue tasks with red borders or icons
- Countdown Display: Show "due in X days" or "overdue by X days"
- Notification System: Browser notifications for upcoming deadlines
- Smart Sorting: Automatically sort by due date proximity
- Priority Levels: Add Low / Medium / High / Critical priority options
- Visual Hierarchy: Use colors, icons, or badges to indicate urgency
- Priority Sorting: Sort tasks by priority level
- Smart Filters: Filter by priority combinations
- Priority-based Styling: Different card styles for different priorities
- Calendar Integration: Visualize tasks on a monthly/weekly calendar
- Timeline View: Show tasks in chronological order
- Drag & Drop: Move tasks between dates
- Calendar Export: Export to Google Calendar, Outlook, etc.
- Month/Week/Day Views: Multiple calendar perspectives
- Nested Todos: Support hierarchical task structure
- Progress Tracking: Show completion percentage for parent tasks
- Collapsible Groups: Expand/collapse task groups
- Subtask Dependencies: Mark subtasks as prerequisites
- Bulk Subtask Actions: Complete all subtasks at once
- Project Organization: Group todos into projects or categories
- Color-coded Categories: Visual distinction between project types
- Tag System: Multiple tags per task with autocomplete
- Advanced Filtering: Filter by project, category, or tag combinations
- Project Templates: Pre-defined task templates for common projects
- Full-text Search: Search through task titles and descriptions
- Tag-based Search: Quick search by tags or categories
- Advanced Filters: Combine search with date, priority, and status filters
- Search History: Remember recent searches
- Fuzzy Search: Find tasks even with typos
- Repeat Patterns: Daily, weekly, monthly, yearly recurrence
- Custom Intervals: Every X days, specific days of week
- Smart Scheduling: Skip weekends, handle holidays
- Recurrence Management: Edit or stop recurring task series
- Template-based Recurring: Use templates for complex recurring tasks
- Productivity Dashboard: Visual charts of task completion
- Streak Tracking: Track daily/weekly completion streaks
- Time Analysis: Average time to complete tasks
- Category Insights: Most productive categories or times
- Goal Setting: Set and track completion goals
- Gamification: Points, badges, and achievements
- Action History: Track all user actions with timestamps
- Undo Stack: Multiple levels of undo/redo
- Visual Feedback: Show what action will be undone
- Keyboard Shortcuts: Ctrl+Z / Ctrl+Y support
- Batch Undo: Undo multiple related actions at once
- Language Selection: Support for multiple languages
- RTL Support: Right-to-left languages like Arabic, Hebrew
- Date Localization: Localized date formats
- Dynamic Loading: Load language packs on demand
- Fallback System: Graceful handling of missing translations
- Multiple Formats: JSON, CSV, Markdown export options
- Import Sources: From files, clipboard, or other todo apps
- Data Migration: Import from popular todo apps (Todoist, Any.do, etc.)
- Backup/Restore: Full app state backup and restoration
- Selective Export: Export specific projects or date ranges
- Cloud Storage: Sync via Firebase, Supabase, or custom backend
- Real-time Updates: Live sync across multiple devices
- Conflict Resolution: Handle simultaneous edits gracefully
- Offline Queue: Queue changes when offline, sync when online
- User Authentication: Secure user accounts and data
- Connection Status: Visual indicator of online/offline state
- Offline Capabilities: Full functionality when offline
- Sync Status: Show pending sync operations
- Data Persistence: Ensure no data loss during offline periods
- Background Sync: Automatic sync when connection is restored
- Custom Themes: User-defined color schemes
- Drag & Drop: Reorder tasks with drag and drop
- Keyboard Shortcuts: Power user keyboard navigation
- Voice Input: Add tasks via voice commands
- Quick Actions: Swipe gestures on mobile
- Focus Mode: Distraction-free view for current tasks
- Progressive Web App: Full PWA with offline support
- Native App Feel: Smooth animations and gestures
- Push Notifications: Mobile notifications for reminders
- Widget Support: Home screen widgets
- Share Integration: Share tasks from other apps
- Task Templates: Reusable task templates
- Time Tracking: Track time spent on tasks
- Task Dependencies: Link related tasks
- Batch Operations: Select and modify multiple tasks
- Advanced Search: Regular expressions, saved searches
- API Integration: Connect with external services
- Automation Rules: Trigger actions based on conditions
Phase 1 (Quick Wins):
- Due dates & reminders
- Task priorities
- Search functionality
- Undo/redo
Phase 2 (Enhanced UX):
- Projects/categories
- Subtasks
- Import/export
- Stats/analytics
Phase 3 (Advanced):
- Calendar view
- Recurring tasks
- Multi-language support
- Cloud sync
Phase 4 (Premium Features):
- Advanced analytics
- Automation
- API integrations
- Enterprise features
- Next.js for the amazing React framework
- Redux Toolkit for state management
- shadcn/ui for beautiful UI components
- Tailwind CSS for utility-first styling
- Framer Motion for smooth animations
- Lucide for beautiful icons
Built with β€οΈ using modern web technologies.