A modern todo application built with React and @sqlife/react for local-first data management.
The app uses a SQLite table with the following structure:
CREATE TABLE todo (
id TEXT PRIMARY KEY NOT NULL,
title TEXT NOT NULL,
completed BOOLEAN NOT NULL DEFAULT 0,
created_at TEXT NOT NULL,
updated_at TEXT NOT NULL,
completed_at TEXT NOT NULL DEFAULT "",
pinned INTEGER NOT NULL DEFAULT 0
)
āāā index.ts # Main HTTP handler
āāā frontend/
ā āāā index.html # HTML template
ā āāā index.tsx # React app entry point
ā āāā components/
ā āāā App.tsx # Main app component
ā āāā TodoItem.tsx # Individual todo item
ā āāā AddTodoForm.tsx # Form for adding new todos
āāā README.md
This app uses @sqlife/react which provides:
The database is created automatically when the first todo is added.