todo-list
A modern, reactive todo list application with real-time updates, multiple lists support, and a beautiful glassmorphism design.
โจ Svelte Todo List
A modern, reactive todo list application built with Svelte, TypeScript, and Supabase. Features real-time updates, multiple lists support, and a beautiful glassmorphism design.
๐ Features
- โ Real-time updates with Supabase
- ๐ Multiple todo lists support
- ๐จ Modern glassmorphism UI design
- ๐ Smooth animations and transitions
- โก Optimistic updates for instant feedback
- ๐ผ Task reordering with up/down arrows
- ๐ฑ Fully responsive design
- ๐ Automatic polling fallback for real-time updates
- ๐๏ธ Inline editing for todos and list titles
- ๐ฏ Focus mode while editing
- ๐๏ธ Automatic cleanup of empty lists
๐ ๏ธ Tech Stack
- Svelte 5 + SvelteKit - Frontend framework (runes, snippets, attachments)
- TypeScript - Type safety
- Tailwind CSS - Styling
- Supabase - Backend and real-time updates
- Vite - Build tool
- Bun - Package manager
๐๏ธ Project Structure
todo-list/
โโโ src/
โ โโโ lib/
โ โ โโโ attachments/ # Reusable {@attach} behaviours (clickOutside, autoResize)
โ โ โโโ components/ # Svelte components (TodoList, Sidebar, ui/...)
โ โ โโโ helpers/ # Utilities
โ โ โโโ stores/ # Rune-based state classes (todos, list, lists, toaster...)
โ โ โโโ supabase.ts # Supabase client configuration
โ โ โโโ types.ts # TypeScript interfaces
โ โโโ routes/ # SvelteKit routes
โ โโโ app.css # Global styles and Tailwind theme
โ โโโ app.html # HTML shell
โโโ static/ # Static assets
๐ฆ Getting Started
- Clone the repository:
- Install dependencies:
- Create a
.envfile with your Supabase credentials:
- Start the development server:
๐ Database Schema
Todos Table
Lists Table
๐ Real-time Updates
The application uses Supabase's real-time functionality to keep todos synchronized across all clients. As a fallback mechanism, it also implements polling to ensure updates are received even if the real-time connection is interrupted.
๐งน Automatic Cleanup
Empty lists (lists without any todos) are automatically cleaned up from the database to maintain data consistency. This is handled by a SQL trigger that removes lists when their last todo is deleted.
๐ค Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
Pierre Roy