Svelte Todo App with Database
A modern, full-stack todo application built with Svelte 5, SvelteKit, and SQLite database. Features authentication, task management, and a beautiful UI with dark mode support.
š Tech Stack
- Frontend: Svelte 5 (with runes), SvelteKit, TailwindCSS
- Backend: SvelteKit server functions
- Database: SQLite with Drizzle ORM
- Authentication: Session-based with email/username and password
- UI Components: Custom components built with shadcn/ui principles
- Styling: TailwindCSS with dark/light mode support
š ļø Development
Prerequisites
- Node.js 18+
- npm, pnpm, or yarn
Getting Started
- Clone the repository
- Install dependencies:
npm install
- Start the development server:
npm run dev
# or start the server and open the app in a new browser tab
npm run dev -- --open
Building for Production
npm run build
Preview the production build:
npm run preview
š± Features
ā
Implemented Features
Core Todo Functionality
- ā
Authentication - Email/username and password login system
- ā
Add a task - Create new tasks with title and description
- ā
"All Task" Filter - View all tasks regardless of status
- ā
"Active Task" Filter - View only incomplete tasks
- ā
"Completed Task" Filter - View only completed tasks
- ā
Mark a task as completed - Toggle task completion status
- ā
Remove a task - Delete tasks (works for both completed and active)
- ā
Change title of the task - Edit task titles through modal
- ā
Change description of the task - Edit task descriptions through modal
- ā
Dark Mode - Toggle between light and dark themes
- ā
Search & Filtering - Search tasks by title and description
- ā
Responsive Design - Works on mobile, tablet, and desktop
- ā
Real-time Updates - UI updates immediately on changes
- ā
Task Details View - Click to view full task details in modal
Authentication Features
- ā
Email and password authentication - Full login/signup system
- ā
Session management - Secure session handling
- ā
User registration - Create new accounts
- ā
Database integration - SQLite with Drizzle ORM
š§ In Progress / Planned Features
MVP Remaining
- ā Clear all completed tasks - Bulk delete completed tasks
Additional Features (Future)
- ā Scheduling (day and time)
- ā Recurring Task Customization
- ā Attachment support
- ā Advanced Search & Filtering (beyond basic text search)
- ā Tags system
Enhanced Authentication (Infrastructure Ready)
- ā Password check with HaveIBeenPwned (schema ready)
- ā Email verification (schema ready)
- ā 2FA with TOTP (schema ready)
- ā 2FA recovery codes (schema ready)
- ā Password reset (schema ready)
- ā Login throttling and rate limiting
Note: The database schema already includes fields for advanced authentication features like TOTP keys, email verification, and recovery codes. These features are structurally ready but not yet implemented in the UI.
šÆ Current Status
This todo application has successfully implemented most of the MVP features and is fully functional for daily task management. The app includes:
- Complete authentication system with secure sessions
- Full CRUD operations for tasks (Create, Read, Update, Delete)
- Advanced filtering and search capabilities
- Beautiful, responsive UI with dark mode
- Real-time updates and smooth user experience
Ready for daily use! š
š References
š License
This project is open source and available under the MIT License.
Development Status: Most MVP features complete ā
| Ready for production use š
šļø Project Structure
src/
āāā lib/
ā āāā components/
ā ā āāā TaskItem.svelte # Individual task component
ā ā āāā TaskList.svelte # Task list container
ā ā āāā ui/ # Reusable UI components
ā āāā server/
ā ā āāā db/ # Database schema & connection
ā ā āāā task.ts # Task-related server functions
ā ā āāā user.ts # User management
ā ā āāā session.ts # Session handling
ā ā āāā password.ts # Password utilities
ā āāā utils.ts # Utility functions
āāā routes/
ā āāā +layout.svelte # Global layout with theme toggle
ā āāā +page.svelte # Main todo app page
ā āāā login/ # Login page
ā āāā signup/ # Registration page
ā āāā api/task/ # Task API endpoints