Public
Remixed
Track expenses with categories, amounts, and a summary dashboard
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.

๐Ÿ’ฐ Expenses Tracker

A clean, full-stack expenses tracker built with React + Hono on Val Town.

Features

  • 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

Live URL

Click the val's HTTP endpoint to open the app in your browser.

Architecture

Rendering mermaid diagram...

File structure

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

API

MethodRouteDescription
GET/api/expensesList all expenses (newest first)
POST/api/expensesAdd an expense (amount, category, date, description?)
DELETE/api/expenses/:idDelete an expense
GET/api/summaryTotal + breakdown by category