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 invoice builder for creating and managing invoices. Create invoices, add line items, and print or save as PDF.
- Home screen — List all invoices with quick access to edit or delete
- Invoice editor — Focus on line items, settings collapse by default
- Live preview — See your invoice update in real time as you edit
- Auto-save — Changes automatically save to the database
- Line items — Add/remove items with description, quantity, and rate
- Print / PDF — Clean print layout; use browser print dialog to save as PDF
- Pre-filled defaults — Business and client details rarely change; edit them in settings
- Home screen — Click "+ New Invoice" to create a new invoice or "Edit" to modify an existing one
- Add items — Enter description, quantity, and rate for each line item
- Adjust settings — Click "⚙ Settings" to change invoice number, date, client, or business details
- Print / Save PDF — Click "Print / Save PDF" and use your browser's print dialog
index.ts ← Hono server + API
frontend/
index.html ← HTML shell (Twind + React)
index.tsx ← React entrypoint
components/
App.tsx ← Root component (navigation & auto-save)
Home.tsx ← Invoice list & create new
InvoiceForm.tsx ← Line items editor + settings
InvoicePreview.tsx ← Printable invoice preview
Invoices are stored in SQLite at iorek/invoice-builder with the invoices table:
id— Unique invoice IDnumber— Invoice number (e.g., HBFANRDP-0003)date— Issue datedueDate— Due datecreatedAt— When invoice was createdupdatedAt— Last update timestampdata— Full invoice JSON (line items, business details, etc.)
The app debounces changes and saves automatically 1 second after you stop typing. Look for the save status indicator in the top bar: "✓ Saved", "Saving...", or "Unsaved changes".