SignalDB React Todo App
A modern, feature-rich Todo application built with React, TypeScript, and SignalDB. This application demonstrates the power of reactive data management with SignalDB while providing a comprehensive todo management experience.
๐น Demo
๐ Live Demo - Try the app now!
example.mp4
๐ Features
Core Functionality
- โ Full CRUD Operations - Create, read, update, and delete todos with ease
- ๐ Rich Todo Items - Support for title, description, priority, tags, and due dates
- ๐ Real-time Updates - Reactive UI updates powered by SignalDB
- ๐พ Local Persistence - All data saved to localStorage automatically
- ๐ฏ Smart Validation - Comprehensive form validation with helpful error messages
Advanced Features
- ๐ Advanced Search & Filter - Search by title, description, or tags
- ๐ Rich Statistics - Track completion rates, priority distribution, and productivity
- ๐ท๏ธ Tag Management - Organize todos with multiple tags
- ๐ Due Date Tracking - Visual indicators for overdue and upcoming tasks
- โก Performance Optimized - Virtual scrolling for 100+ items
- ๐ฑ Fully Responsive - Works seamlessly on mobile, tablet, and desktop
User Experience
- ๐จ Modern UI - Clean, intuitive interface with Tailwind CSS
- ๐ Accessibility - ARIA labels, keyboard navigation, and screen reader support
- โก Instant Actions - Quick toggles, inline editing, and bulk operations
- ๐ Visual Feedback - Loading states, animations, and confirmations
- ๐ Bulk Operations - Select multiple todos for mass actions
๐ ๏ธ Tech Stack
- Frontend Framework: React 18 with TypeScript
- Database: SignalDB (reactive database)
- State Management: React Hooks + SignalDB reactivity
- Styling: Tailwind CSS with custom components
- Build Tool: Vite
- Testing: Vitest, React Testing Library
- Code Quality: ESLint, Prettier
๐ฆ Installation
# Clone the repository
git clone <repository-url>
cd react-signaldb-example
# Install dependencies
npm install
# Start development server
npm run dev๐ง Available Scripts
npm run dev # Start development server
npm run build # Build for production
npm run preview # Preview production build
npm run lint # Run ESLint
npm run format # Format code with Prettier
npm run type-check # Run TypeScript type checking๐ Project Structure
src/
โโโ components/ # React components
โ โโโ TodoForm/ # Todo creation form
โ โโโ TodoItem/ # Individual todo display
โ โโโ TodoList/ # Todo list with virtualization
โ โโโ TodoFilter/ # Search and filter controls
โ โโโ TodoStats/ # Statistics dashboard
โโโ hooks/ # Custom React hooks
โ โโโ useSignalDB.ts # Generic SignalDB hook
โ โโโ useTodos.ts # Todo-specific operations
โโโ lib/ # Library configurations
โ โโโ db.ts # SignalDB setup
โโโ types/ # TypeScript definitions
โ โโโ todo.ts # Todo interfaces
โโโ utils/ # Utility functions
โ โโโ dateHelpers.ts # Date manipulation
โ โโโ validators.ts # Form validation
โโโ App.tsx # Main application
โโโ main.tsx # Entry point
๐ฏ Usage Guide
Creating a Todo
- Click the "Add Todo" button in the navigation
- Fill in the required title (minimum 2 characters)
- Optionally add:
- Description (up to 500 characters)
- Priority level (Low, Medium, High)
- Tags (comma-separated, up to 10 tags)
- Due date
- Click "Add Todo" to save
Managing Todos
- Toggle Completion: Click the checkbox to mark as complete/incomplete
- Edit Inline: Double-click on a todo or click the edit button
- Delete: Click the delete button (requires double-click confirmation)
- View Details: All todo information is displayed in the card
Filtering and Searching
- Search: Type in the search box to filter by title, description, or tags
- Status Filter: Show all, active, or completed todos
- Priority Filter: Filter by priority level
- Tag Filter: Filter by specific tags
- Date Range: Filter todos within a date range
- Sort: Order by date, title, or priority
Bulk Operations
- Select Multiple: Click checkboxes to select multiple todos
- Mark All Complete/Active: Toggle all todos at once
- Clear Completed: Remove all completed todos
- Clear All: Remove all todos (with confirmation)
Statistics View
Click "Stats" to view:
- Total, completed, and active todo counts
- Completion percentage with visual progress bar
- Priority distribution chart
- Tag usage analytics
- Today's productivity summary
- Overdue todo alerts
๐งช Testing
The application includes comprehensive test coverage:
Unit Tests
- Component rendering and interactions
- Hook functionality
- Utility functions
- SignalDB operations
Integration Tests
- Complete user workflows
- Data persistence
- State management
- Component communication
E2E Tests
- Full application workflows
- Search and filter operations
- Bulk actions
- Offline functionality
- Performance with large datasets
Run tests with:
npm run test # Run all tests
npm run test:ui # Interactive test UI
npm run test:coverage # Coverage report
npm run test:e2e # End-to-end tests๐จ Customization
Styling
The app uses Tailwind CSS with custom component classes. Modify src/index.css to customize:
- Color schemes
- Component styles
- Animations
- Responsive breakpoints
Database Configuration
SignalDB settings can be modified in src/lib/db.ts:
- Collection indexes
- Storage adapters
- Migration logic
- Performance optimizations
Validation Rules
Customize validation in src/utils/validators.ts:
- Field requirements
- Length limits
- Pattern matching
- Custom rules
๐ Performance
- Virtual Scrolling: Efficiently renders large lists (100+ items)
- Debounced Search: 300ms delay for smooth typing
- Memoization: Prevents unnecessary re-renders
- Indexed Queries: Optimized database lookups
- Lazy Loading: Components loaded on demand
โฟ Accessibility
- WCAG 2.1 AA Compliant: Meets accessibility standards
- Keyboard Navigation: Full keyboard support
- Screen Readers: Proper ARIA labels and roles
- Focus Management: Clear focus indicators
- High Contrast: Supports high contrast mode
๐ License
MIT License - feel free to use this project for any purpose.
๐ค Contributing
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Add tests for new features
- Ensure all tests pass
- Submit a pull request
๐ Known Issues
- Virtual scrolling may have minor visual glitches with very rapid scrolling
- Date picker may not work correctly in some older browsers
- Tag autocomplete suggestions are limited to existing tags
๐ฎ Support
For issues, questions, or suggestions:
- Open an issue on GitHub
- Check existing issues for solutions
- Provide reproduction steps for bugs
๐ Acknowledgments
- SignalDB team for the reactive database
- React team for the framework
- Tailwind CSS for the styling system
- Vite for the blazing fast build tool
Built with โค๏ธ using SignalDB and React
This Project was created with the assistance of Claude AI by Anthropic