Public
Remixed
Starter template with client-side React & Hono server
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.

Todos

A simple todo list app with a SQLite backend, Hono API, and React frontend.

Features

  • βœ… Add, toggle, and delete todos
  • πŸ’Ύ Persisted in SQLite (per-val database)
  • ⚑ Optimistic UI updates
  • 🎨 Styled with Twind (Tailwind utility classes)

Architecture

Rendering mermaid diagram...

File structure

index.ts                          ← Hono backend (frontend + API + SQLite)
shared/types.ts                   ← Shared Todo type
frontend/
  index.html                      ← HTML shell (Twind + React)
  index.tsx                       ← React entrypoint
  components/
    App.tsx                       ← Root layout
    TodoList.tsx                  ← Todo list UI + API calls

API

MethodPathBodyDescription
GET/api/todosList all todos
POST/api/todos{ text }Create a todo
PATCH/api/todos/:id{ done?, text? }Update a todo
DELETE/api/todos/:idDelete a todo