todo-list by antaww
No description provided.
โจ 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 - Frontend framework
- TypeScript - Type safety
- Tailwind CSS - Styling
- Supabase - Backend and real-time updates
- Vite - Build tool
- PNPM - Package manager
๐๏ธ Project Structure
todo-list/
โโโ src/
โ โโโ lib/
โ โ โโโ TodoList.svelte # Main todo list component
โ โ โโโ supabase.ts # Supabase client configuration
โ โ โโโ types.ts # TypeScript interfaces
โ โโโ App.svelte # Root component
โ โโโ app.css # Global styles
โ โโโ main.ts # Application entry point
โโโ supabase/ # Supabase configuration and migrations
๐ฆ Getting Started
- Clone the repository:
- Install dependencies:
- Create a
.env
file 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.