# Budget Manager PWA

A Progressive Web App for managing personal finances with push notifications.

## Features

- Track expenses and income
- Manage budget categories with custom colors
- View financial reports and analytics
- Receive push notifications for new transactions
- Works offline with local data storage
- Full PWA support for mobile installation

## Setup Instructions

### Backend

1. Navigate to the backend directory:
   ```bash
   cd backend
   ```

2. Install dependencies:
   ```bash
   bun install
   ```

3. Generate VAPID keys for push notifications:
   ```bash
   cd scripts
   bun run generate-vapid-keys.js
   ```

4. Copy the `.env.example` to `.env` and update with your VAPID keys:
   ```bash
   cp .env.example .env
   ```

5. Start the backend server:
   ```bash
   bun start
   ```

### Frontend

1. Navigate to the frontend directory:
   ```bash
   cd frontend
   ```

2. Install dependencies:
   ```bash
   bun install
   ```

3. Start the development server:
   ```bash
   bun dev
   ```

## Push Notifications

The app supports push notifications for the following events:
- New transaction added
- Budget threshold exceeded

To enable push notifications:
1. Go to the Settings page
2. Toggle "Push Notifications" to On
3. Grant notification permissions when prompted
