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.
A simple todo list app with a SQLite backend, Hono API, and React frontend.
- β Add, toggle, and delete todos
- πΎ Persisted in SQLite (per-val database)
- β‘ Optimistic UI updates
- π¨ Styled with Twind (Tailwind utility classes)
Rendering mermaid diagram...
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
| Method | Path | Body | Description |
|---|---|---|---|
| GET | /api/todos | List all todos | |
| POST | /api/todos | { text } | Create a todo |
| PATCH | /api/todos/:id | { done?, text? } | Update a todo |
| DELETE | /api/todos/:id | Delete a todo |