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 clean, full-stack expenses tracker built with React + Hono on Val Town.
- Add expenses โ amount, category, description, and date
- Category breakdown โ visual bars showing spending by category
- Total spent โ running total at a glance
- Delete expenses โ remove entries with one click
- 10 categories โ Food, Transport, Housing, Shopping, Entertainment, Health, Education, Work, Travel, Other
- Persistent storage โ all data saved in SQLite
Click the val's HTTP endpoint to open the app in your browser.
Rendering mermaid diagram...
index.ts โ Hono backend (serves frontend + API routes)
frontend/
index.html โ HTML shell (loads Twind + React)
index.tsx โ React entrypoint
favicon.svg โ App icon
components/
App.tsx โ Root component (layout + data fetching)
ExpenseForm.tsx โ Form to add new expenses
ExpenseList.tsx โ List of expenses with delete buttons
Summary.tsx โ Total spent + category breakdown bars
| Method | Route | Description |
|---|---|---|
| GET | /api/expenses | List all expenses (newest first) |
| POST | /api/expenses | Add an expense (amount, category, date, description?) |
| DELETE | /api/expenses/:id | Delete an expense |
| GET | /api/summary | Total + breakdown by category |