Skip to content

H1D/lunch-buddy

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

359 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lunch Buddy

Lunch Buddy is an Angular PWA for tracking Lunch Money budget progress across the month.

What It Does

  • Shows expense and income category progress.
  • Includes recurring expense projections and per-category activity.
  • Supports category preferences (ordering, visibility, notification settings).
  • Works offline with cached data and background sync support.

Tech Stack

  • Angular 21 (standalone components + signals + zoneless change detection)
  • Vitest (via Angular unit-test builder)
  • Playwright (E2E)
  • Custom service worker for caching and background workflows

Getting Started

Prerequisites

  • Node.js >=24.0.0
  • npm 10+

Install and Run

npm install
npm start

Dev server: http://localhost:4200

Runtime Environment Variables

These are optional and can be provided with NG_APP_* keys:

  • NG_APP_LUNCHMONEY_API_BASE - Base URL for Lunch Money API (or /v2 for mock API)
  • NG_APP_LUNCHMONEY_API_KEY - Default API key for local/dev usage

Values are baked into src/environments/runtime-env.generated.ts via npm run generate:env.

Mock API Development

export NG_APP_LUNCHMONEY_API_BASE=/v2
export NG_APP_LUNCHMONEY_API_KEY=mock-api-key-12345
npm start

Notes:

  • /v2 is proxied to https://alpha.lunchmoney.dev during local dev.
  • Mock login accepts keys with length >= 11.

Diagnostics (Optional)

Diagnostics endpoints use Upstash Redis and optional admin retrieval tooling.

Required server env vars:

  • UPSTASH_REDIS_REST_URL
  • UPSTASH_REDIS_REST_TOKEN
  • DIAGNOSTICS_ADMIN_TOKEN (required to retrieve logs)

Optional for MCP setup tooling:

  • DIAGNOSTICS_WRITE_SECRET

Fetch logs locally:

DIAGNOSTICS_ADMIN_TOKEN=your_secret node tools/fetch-logs.mjs <supportCode>

tools/fetch-logs.mjs uses VERCEL_URL if present, otherwise http://localhost:3000.

Commands

  • npm start - Start dev server
  • npm run build - Build production assets
  • npm test - Run unit tests with coverage
  • npm run test:watch - Run unit tests in watch mode
  • npm run test:e2e - Run Playwright tests
  • npm run lint - Auto-fix lint/style/format issues
  • npm run lint:check - Run lint/style/format checks
  • npm run generate:env - Regenerate runtime env module

Security and API Key Storage

When entered in the login screen, the Lunch Money API key is stored in browser localStorage.

Contributing

Deployment

This project is configured for Vercel (vercel.json), but can be deployed as static assets on other hosts.

  • Build output directory: dist/lunch-buddy
  • Ensure SPA routing falls back to index.html

Self-Hosting with a Container

Pre-built images are published to GitHub Container Registry:

docker run -p 3000:3000 ghcr.io/astiskala/lunch-buddy:latest

About

Lunch Buddy is a progressive web app (PWA) that visualises your Lunch Money budgets to help you keep category budgets on track as you progress through the month.

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • TypeScript 75.8%
  • JavaScript 8.6%
  • SCSS 8.2%
  • HTML 7.3%
  • Other 0.1%