Skip to content

prybalko/expense-tracker

Repository files navigation

Expense Tracker

Mobile-first expense tracker — Go API + React 19 PWA, designed to live on your iOS home screen.

Go React Vite PWA SQLite License

Feed Insights Quick entry

Highlights

  • Read-only offline — service worker caches the expenses list so past spending stays browsable on the subway; writes require connectivity and fail visibly when offline.
  • Installable PWA — standalone display, custom icons, safe-area aware.
  • Quick entry — bespoke numpad keyed for fast logging.
  • Insights — monthly totals and category breakdowns derived client-side from your feed.

Quick start

Docker

docker-compose up --build

Open http://localhost:8080.

Local development

Two terminals — Go API on :8080, Vite dev server on :5173 proxying /api:

go run ./cmd/server
cd web/app && npm install && npm run dev

Open http://localhost:5173.

Production build

cd web/app && npm run build          # outputs web/dist/, embedded by Go
go build -o expense-tracker ./cmd/server
./expense-tracker

Configuration

Variable Default Purpose
PORT 8080 HTTP port
DB_PATH expenses.db SQLite file
SECURE_COOKIE false Set for HTTPS deployments
ADMIN_USER admin Bootstrap admin (created on first run)
ADMIN_PASSWORD random Printed to logs if unset

Users

go run ./cmd/adduser -user <name> -password <pw> [-db expenses.db]

Testing

go test ./...                        # backend + handlers
cd web/app && npm run build          # typecheck + frontend build

# E2E (Playwright via Go) — first time only:
go install github.com/playwright-community/playwright-go/cmd/playwright@v0.5200.1
playwright install                   # add --with-deps on Linux
go test -v ./e2e/...

The E2E harness rebuilds web/dist/ automatically when missing. Selectors anchor on data-testid.

Stack

Go 1.25 · SQLite via modernc.org/sqlite (CGo-free) · React 19 · Vite 7 · TanStack Query · vite-plugin-pwa + Workbox · Playwright.

See AGENTS.md for the full project layout and contribution conventions.

License

MIT.

About

A beautiful, mobile-first expense tracking app

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages