Commit Graph

389 Commits

Author SHA1 Message Date
Víctor Falcón cfa5bfd728 chore: release v0.1.9 2026-01-28 21:30:14 +01:00
Víctor Falcón 530d21d776 test: Optimize DemoAccountRestrictionsTest to run under 10s
Replace slow demo:reset command with factory-created user since
isDemoAccount() only checks email match. Consolidate 8 tests into 2.
2026-01-28 21:27:27 +01:00
Víctor Falcón 952a5d4be7
feat: Sync new users to Resend contacts (#85)
## Summary
- Add `SyncUserToResendListener` to automatically sync users to Resend
contacts on registration
- Add `ResendService` for Resend API interactions
- Add `resend:sync` command to bulk sync existing users

## Changes
- **New**: `app/Listeners/SyncUserToResendListener.php` -
Auto-discovered queued listener
- **New**: `app/Services/ResendService.php` - Service for Resend
contacts API
- **New**: `app/Console/Commands/ResendSyncCommand.php` - Bulk sync
command
- **New**: Tests for listener and command

## Usage
New users are automatically synced on registration. For existing users:
```bash
php artisan resend:sync
```

## Test plan
- [x] New user registration triggers contact sync
- [x] `resend:sync` command syncs all existing users
- [x] Graceful handling when API key is not configured
- [x] Duplicate contacts are handled by Resend (no errors)
2026-01-28 21:25:58 +01:00
Víctor Falcón f03fcf5ac6 feat: Print sponsor message on whispermoney script 2026-01-28 19:57:28 +01:00
Víctor Falcón a9b889b145
feat: Release budgets feature to all users (#84)
## Summary
- Enable the budgets Pennant feature flag for all users by changing the
default from `false` to `true`

## Test plan
- [x] Existing `BudgetFeatureFlagTest` passes (9 tests, 39 assertions)
2026-01-28 09:56:52 +01:00
Víctor Falcón c32a7ab6ae
Fix chart hover background visibility in dark mode (#82)
## Summary

- Fixed hover background color in dark mode to improve visibility and
contrast with chart bars
- Changed from `fill-muted` (oklch(0.269 0 0)) to `fill-white/5` in dark
mode for a lighter, more transparent background
- Resolves issue where hover background was too similar to bar colors in
dark mode

## Changes

- Updated `ChartContainer` component to use `dark:fill-white/5` for the
recharts tooltip cursor in dark mode
- Maintains existing `fill-muted` behavior for light mode

Closes #66
2026-01-27 19:08:35 +01:00
Víctor Falcón cffa979765
Fix mobile bottom nav alignment for 5 items (#81)
## Summary
- Removed explicit `gap-6` from the mobile bottom navigation bar so
`justify-evenly` distributes items naturally
- Reduced horizontal padding from `px-8` to `px-4` to give items more
room when 5 are present (e.g., when Cashflow and Budgets features are
enabled)

Closes #77 

## Test plan
- [x] Verify the bottom nav looks correct with 4 items (Cashflow or
Budgets feature disabled)
- [x] Verify the bottom nav looks correct with 5 items (all features
enabled)
- [x] Confirm items are evenly spaced and none are clipped on small
screens
2026-01-27 19:02:38 +01:00
Víctor Falcón 9620d3cfe1 chore: Update README to make it clearer that whispermoney install command must be run first 2026-01-27 12:09:35 +01:00
Víctor Falcón d1f69a284a fix: Delete transactions on local browser DB after deleting it on the backend 2026-01-27 11:12:05 +01:00
Víctor Falcón bbc3027545 feat: Reload transactions table on import proccess complete 2026-01-27 11:12:04 +01:00
Víctor Falcón a6a2a0d58c
fix: Apply automation rule labels on transaction creation and import (#79)
## Summary
- Fixes automation rules not applying labels when creating transactions
manually or via CSV import
- Eager-loads the `labels` relationship on automation rules in both
`TransactionController` and `HandleInertiaRequests`
- Syncs `label_ids` on the transaction `store` endpoint (was accepted
but never persisted)
- Passes `automationRules` prop through the full component chain:
`index.tsx` → `TransactionActionsMenu` → `ImportTransactionsDrawer`, and
`index.tsx` → `EditTransactionDialog`
- Passes `automationRules` as the missing 5th argument to
`reEvaluateAll()`

Closes #61

## Test plan
- [x] Existing feature tests pass (`php artisan test
--filter=Transaction`, `--filter=AutomationRule`)
- [x] Pint, ESLint, and Prettier all pass
- [x] Manually verify: create a transaction matching an automation rule
with labels → labels are applied
- [x] Manually verify: import CSV with transactions matching rules with
labels → labels are applied
- [x] Manually verify: "Re-evaluate All" applies labels from matched
rules
2026-01-27 11:11:29 +01:00
Víctor Falcón bc02bf948f chore: Update larevel boot package 2026-01-27 10:55:46 +01:00
Víctor Falcón 0e7ea220b1
chore: Add GitHub issue template for bug reports (#80)
## Summary
- Adds a structured bug report issue template using GitHub's YAML form
format
- Includes fields for environment, steps to reproduce, expected/actual
behavior, and additional context

## Test plan
- [x] Verify the template appears when creating a new issue on GitHub
- [x] Confirm all form fields render correctly
2026-01-26 19:16:32 +01:00
Víctor Falcón ccba0cde12 Add star history to the README 2026-01-26 14:59:29 +01:00
Víctor Falcón f4f25ac48a chore: release v0.1.8 2026-01-25 17:25:05 +01:00
Víctor Falcón 8a8d5962b5
refactor: Simplify transaction endpoints architecture (#76)
## Summary

Simplifies transaction endpoints by separating sync API (read-only) from
web routes (mutations). This creates clearer architectural boundaries
and fixes inconsistent label behavior.

## Architecture Changes

### Before
- Sync API handled both sync (GET) and mutations (POST/PATCH/DELETE)
- Frontend used sync API for all operations
- Bulk updates merged labels, single updates replaced them

### After  
- **Sync API**: Read-only GET endpoint for IndexedDB sync
- **Web Routes**: All mutations (create, update, delete, bulk
operations)
- **Consistent behavior**: All label updates replace instead of merge

## Endpoint Mapping

| Operation | Old Endpoint | New Endpoint |
|-----------|-------------|--------------|
| Fetch/Sync | `GET /api/sync/transactions` | `GET
/api/sync/transactions`  |
| Create | `POST /api/sync/transactions` | `POST /transactions` |
| Update | `PATCH /api/sync/transactions/{id}` | `PATCH
/transactions/{id}` |
| Delete | `DELETE /api/sync/transactions/{id}` | `DELETE
/transactions/{id}` |
| Bulk Update | `PATCH /transactions/bulk` | `PATCH /transactions/bulk`
 |

## Backend Changes

### TransactionSyncController
-  Simplified to read-only `index()` method
-  Removed `store()`, `update()`, `destroy()` methods
-  Added docblock clarifying purpose

### TransactionController
-  Fixed `store()` to return labels with `id, name, color`
-  Fixed `update()` to return labels with `id, name, color`  
-  Changed `bulkUpdate()` to replace labels instead of merging

### Cleanup
-  Removed `UpdateTransactionSyncRequest` (no longer needed)
-  Updated `routes/api.php` to only have GET for sync

## Frontend Changes

### transaction-sync.ts
-  Updated `create()` → `POST /transactions`
-  Updated `update()` → `PATCH /transactions/{id}`
-  Updated `delete()` → `DELETE /transactions/{id}`
-  Replaced all `fetch()` calls with `axios`
-  Removed manual CSRF token handling

## Test Changes

### TransactionSyncTest
-  Removed create/update/delete tests
-  Kept only read-only sync tests
-  Added test for labels format

### BulkUpdateTransactionsTest  
-  Added test verifying label replacement behavior

## Test Results

All tests passing! 

```
Tests:    42 passed (235 assertions)
Duration: 6.17s

✓ TransactionTest: 29 tests
✓ TransactionSyncTest: 4 tests
✓ BulkUpdateTransactionsTest: 9 tests
```

## Benefits

1. **Clear separation of concerns**: Sync API is read-only, web routes
handle mutations
2. **Consistent label behavior**: All updates replace labels (not merge)
3. **Standardized HTTP client**: Axios everywhere, automatic CSRF
handling
4. **Reduced complexity**: Removed duplicate form request class
5. **Better architecture**: Aligns with intended design

## Breaking Changes

None - All changes are internal to how the frontend calls the backend.
The functionality remains the same from the user's perspective.

## Files Changed

- `app/Http/Controllers/Sync/TransactionSyncController.php`
- `app/Http/Controllers/TransactionController.php`
- `app/Http/Requests/UpdateTransactionSyncRequest.php` (deleted)
- `resources/js/services/transaction-sync.ts`
- `routes/api.php`
- `tests/Feature/Sync/TransactionSyncTest.php`
- `tests/Feature/BulkUpdateTransactionsTest.php`
2026-01-25 16:15:17 +01:00
Víctor Falcón 91dd23edc0 fix: Update transactions 2026-01-25 11:31:17 +01:00
Víctor Falcón e5eca1eacb
feat: Add label support to single transaction update endpoint (#75)
## Summary
- Added label update support to the single transaction `update()`
endpoint
- Previously, labels could only be updated via the bulk update endpoint
- Now both endpoints support label updates with consistent behavior

## Changes
- **UpdateTransactionRequest**: Added `label_ids` validation (array of
UUIDs that must belong to user)
- **TransactionController@update**: Now handles label updates alongside
other attributes
  - Syncs labels when `label_ids` is provided
  - Reloads labels relationship for fresh data in events
  - Fires single `updated` event after all changes
- **AssignTransactionToBudget listener**: Ensures labels are loaded
fresh after queue serialization
- **Tests**: Added 6 comprehensive tests covering all label update
scenarios

## Behavior
- **Don't send `label_ids`** → labels unchanged (partial update)
- **Send `label_ids: []`** → removes all labels
- **Send `label_ids: [uuid1, uuid2]`** → replaces labels with these

## Testing
When labels are updated, the `TransactionUpdated` event fires and the
transaction is automatically assigned to matching budgets (via queued
listener).

All tests pass (29 tests, 134 assertions).

Fixes the issue where transactions wouldn't appear in budget after
adding a matching label via the single transaction update endpoint.
2026-01-24 17:54:54 +01:00
Víctor Falcón 134a292ddb
fix: Fire transaction updated event after a label change (#73) 2026-01-22 15:25:52 +01:00
Víctor Falcón f30e600b75 fix: typo in composer dev command 2026-01-22 15:07:37 +01:00
Víctor Falcón fee7ad36ab
feat: Load transactions history on budget created (#72) 2026-01-22 11:10:15 +01:00
Víctor Falcón 839e4993df test: Improve demo reset tests performance 2026-01-22 10:24:07 +01:00
Víctor Falcón d216d0c071 fix: Progress bar color on dark scheme 2026-01-22 09:25:53 +01:00
Víctor Falcón 417860bdc5 chore: release v0.1.7 2026-01-21 15:57:29 +01:00
Víctor Falcón 9b6c30775f
Add Budgeting Feature to Track and Manage Spending (#36)
## Overview

We're excited to introduce budgeting capabilities to Whisper Money! This
feature helps you take control of your finances by setting spending
limits and tracking your progress over time.

## Screenshots
<img width="1316" height="793" alt="image"
src="https://github.com/user-attachments/assets/ac394d36-cded-4ea4-9883-120785e260f1"
/>
<img width="1315" height="907" alt="image"
src="https://github.com/user-attachments/assets/7c682474-5aa7-4388-b626-29b56f5ebbef"
/>
<img width="1315" height="992" alt="image"
src="https://github.com/user-attachments/assets/21eace45-23c6-472d-9aa0-0feb6db3fba4"
/>

## What's New

### Create Flexible Budgets
- Set budgets for specific categories or labels
- Choose from monthly, weekly, bi-weekly, or custom periods
- Set your own budget start date for better alignment with your pay
schedule

### Track Your Spending
- Visual spending charts show how much you've spent vs. your budget
- See at a glance which budgets are on track and which need attention
- View all transactions that count toward each budget

### Smart Budget Management
- **Carry Over**: Unused budget amounts automatically roll into the next
period
- **Reset**: Unused amounts return to your available money pool
- Edit or delete budgets anytime as your needs change

### Easy Access
- New Budgets section in the main navigation
- Quick overview cards showing budget status
- Detailed budget pages with spending history and transaction lists

## How It Works

1. Create a budget by selecting a category or label and setting your
spending limit
2. Your transactions are automatically matched to relevant budgets
3. Track your progress with visual charts and spending summaries
4. Adjust your budgets as needed to stay on track with your financial
goals

This feature is now available behind a feature flag and can be enabled
for users who want to start budgeting their expenses.
2026-01-21 15:25:50 +01:00
Víctor Falcón f1a2d787e5 fix: unused vars 2026-01-20 15:57:36 +01:00
Víctor Falcón a7c8544249 fix: Error showing randomg transactions from local browser DB 2026-01-20 13:45:07 +01:00
Víctor Falcón f5d09eb247
feat: Add PostHog (#70) 2026-01-20 10:47:59 +01:00
Víctor Falcón 9759113186 chore: release v0.1.6 2026-01-19 19:47:10 +01:00
Víctor Falcón f4ab9181e1
feat: Better, easier, and faster account balance update modal (#65)
https://github.com/user-attachments/assets/a80966de-b282-4ba0-9431-2cfbcfddc023

Every detail is important. Now, when you are about to update the balance
of an account, the current balance is pre-filled, and you can even do
simple math operations.

If you just receive 1,000 dollars, you can just type `+ 1000` and press
enter.

No need to do the maths by your self.
2026-01-19 19:43:20 +01:00
Víctor Falcón 439ec86722
chore: Simplify IndexedDB sync by moving to Inertia shared props (#63)
This PR simplifies the IndexedDB synchronization mechanism by removing
individual sync controllers and services, and instead using Inertia.js
shared props to provide data globally across the application.

## Benefits

1. **Simplified Architecture**: Removed complex sync logic for
static/semi-static data (accounts, categories, banks, labels, automation
rules)
2. **Better Performance**: Data is now shared via Inertia props,
eliminating unnecessary API calls and IndexedDB operations
3. **Reduced Complexity**: Significantly reduced codebase size (~2000
lines removed)
4. **Better UX**: Data is immediately available on page load without
waiting for sync operations
5. **Maintainability**: Fewer moving parts means easier to maintain and
debug

## Migration Notes

- Transaction syncing still uses IndexedDB for offline support
- All other data (accounts, categories, banks, labels, automation rules)
is now fetched via Inertia shared props
- Components automatically receive updated data on navigation without
manual sync operations
2026-01-19 19:15:26 +01:00
Víctor Falcón 49ed94cbc7 fix: MYSQL_EXTRA_OPTIONS env var 2026-01-19 18:18:23 +01:00
Víctor Falcón 16a331ab5f feat: Don't check upgrades if not in main branch or in DEV_MODE 2026-01-19 13:10:01 +01:00
Víctor Falcón 0d76913e5d
test: Fix and improve Browser test suite (#62) 2026-01-19 10:04:25 +01:00
Víctor Falcón ab21a33e6f chore: Fix caddy container 2026-01-17 20:02:14 +01:00
Víctor Falcón 02b8317b17 docs: Update README 2026-01-17 19:47:15 +01:00
Víctor Falcón 3a684114bb test: Optimize tests performance 2026-01-17 19:20:23 +01:00
Víctor Falcón 25e6f57f25 test: Check that sync endpoints are not returning balances or transactions from other users 2026-01-17 12:51:20 +01:00
Víctor Falcón bd835dc841 chore: release v0.1.5 2026-01-17 10:00:59 +01:00
Víctor Falcón 80117c3ede
fix: Check IDOR vulnerabilities (#60) 2026-01-17 09:58:52 +01:00
Víctor Falcón cae804c588 fix: lsoft port checking was broken 2026-01-16 19:59:01 +01:00
Víctor Falcón c953dd694d feat: Check ports availavility automatically on setup script 2026-01-16 19:28:14 +01:00
Víctor Falcón b2ae8cdb07 fix: composer dependencies install 2026-01-16 19:25:18 +01:00
Víctor Falcón 7fa9d620b2 fix: better script suggestions 2026-01-16 19:22:47 +01:00
Víctor Falcón 7cec6c0053 fix: wrong script path 2026-01-16 19:21:22 +01:00
Víctor Falcón 44f2efab87 fix: APP_KEY generation on setup script 2026-01-16 19:06:56 +01:00
Víctor Falcón 2607861fce fix: Wrong whispermoney script path 2026-01-16 18:48:44 +01:00
Víctor Falcón 3ab920ee60 fix: wrong script path 2026-01-16 18:28:27 +01:00
Víctor Falcón ffd96949e5
feat: Add wispermoney local command (#59)
## Changes

- Moved `setup.sh` to `public/setup.sh` so it's accessible via
`https://whisper.money/setup.sh` for remote users
- Added `wispermoney` wrapper command in root directory for easy local
execution
- Updated README to document the new `wispermoney` command
- Removed duplicate `setup.sh` from root directory

## Benefits

- Remote users can still use: `bash <(curl -fsSL
https://whisper.money/setup.sh)`
- Local developers can now use: `./wispermoney install` (or
start/stop/upgrade)
- Single source of truth - no duplicate setup scripts
- Cleaner project structure
2026-01-16 16:40:15 +01:00
Víctor Falcón 819bea1922
feat: Automated setup script for local deployment (#58)
This PR adds a comprehensive setup script that automates the entire
local development setup process.

<img width="1470" height="932" alt="image"
src="https://github.com/user-attachments/assets/b173333a-6605-4fd9-b2e4-4c62d164d048"
/>

### Key Features

- **Automated Setup Script** (`setup.sh`): One-command installation that
handles everything
- **Caddy Integration**: Replaced Traefik with Caddy for simpler SSL
certificate management
- **Automatic Repository Cloning**: Script can be run remotely and will
clone the repo automatically
- **SSL Certificate Management**: Uses mkcert for trusted local
certificates
- **Automatic Hosts Configuration**: Configures /etc/hosts automatically
- **Version Checking**: Warns users when their local copy is outdated
- **Service Management**: Easy commands to start/stop/upgrade services

### Improvements

- Simplified local development setup
- Better SSL certificate handling (no browser warnings with mkcert)
- Updated README with quick start instructions
- Updated environment configuration for Docker
- Added production Dockerfile for CI/CD builds

### Usage

```bash
bash <(curl -fsSL https://whisper.money/setup.sh)
```

After installation, visit https://whisper.money.local
2026-01-16 15:57:12 +01:00