todo-list-test
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 persistent todo list application built with:
- Backend: Hono server with SQLite for data persistence
- Frontend: Client-side React with Tailwind CSS
- Database: SQLite for storing todos
- ✅ Add new todos
- ✅ Mark todos as complete/incomplete
- ✅ Edit todo text (double-click to edit)
- ✅ Delete todos
- ✅ Persistent storage with SQLite
- ✅ Responsive design with Tailwind CSS
/
├── index.ts # Main Hono server entry point
├── backend/
│ ├── database/
│ │ └── schema.ts # Database schema and operations
│ └── routes/
│ └── todos.ts # API routes for todos
├── frontend/
│ └── App.jsx # React frontend application
├── shared/
│ └── types.ts # Shared TypeScript interfaces
└── README.md # This file
GET /api/todos- Get all todosPOST /api/todos- Create a new todoPUT /api/todos/:id- Update a todoDELETE /api/todos/:id- Delete a todo
- The app will automatically initialize the SQLite database on first run
- Visit the root URL to access the web interface
- Use the input field to add new todos
- Click checkboxes to mark todos as complete/incomplete
- Double-click on todo text to edit
- Click the delete button to remove todos
The application is deployed and ready to use. Simply visit the root URL of your Val Town project to start using the todo list.
You can test the API endpoints directly:
GET /api/todos- Get all todosPOST /api/todos- Create a new todo (send JSON withtextfield)PUT /api/todos/:id- Update a todo (send JSON withtextand/orcompleted)DELETE /api/todos/:id- Delete a todo
Example:
curl -X POST https://your-val-url.web.val.run/api/todos \ -H "Content-Type: application/json" \ -d '{"text":"Buy groceries"}'
The app uses:
- React 18.2.0 for the frontend
- Hono for the backend framework
- SQLite for persistent storage
- Tailwind CSS for styling
- Babel for JSX transformation in the browser
