1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-19 13:19:39 +02:00
Commit graph

67 commits

Author SHA1 Message Date
Zach Gollwitzer
297a695d0f
Transaction rules engine V1 (#1900)
* Domain model sketch

* Scaffold out rules domain

* Migrations

* Remove existing data enrichment for clean slate

* Sketch out business logic and basic tests

* Simplify rule scope building and action executions

* Get generator working again

* Basic implementation + tests

* Remove manual merchant management (rules will replace)

* Revert "Remove manual merchant management (rules will replace)"

This reverts commit 83dcbd9ff0.

* Family and Provider merchants model

* Fix brakeman warnings

* Fix notification loader

* Update notification position

* Add Rule action and condition registries

* Rule form with compound conditions and tests

* Split out notification types, add CTA type

* Rules form builder and Stimulus controller

* Clean up rule registry domain

* Clean up rules stimulus controller

* CTA message for rule when user changes transaction category

* Fix tests

* Lint updates

* Centralize notifications in Notifiable concern

* Implement category rule prompts with auto backoff and option to disable

* Fix layout bug caused by merge conflict

* Initialize rule with correct action for category CTA

* Add rule deletions, get rules working

* Complete dynamic rule form, split Stimulus controllers by resource

* Fix failing tests

* Change test password to avoid chromium conflicts

* Update integration tests

* Centralize all test password references

* Add re-apply rule action

* Rule confirm modal

* Run migrations

* Trigger rule notification after inline category updates

* Clean up rule styles

* Basic attribute locking for rules

* Apply attribute locks on user edits

* Log data enrichments, only apply rules to unlocked attributes

* Fix merge errors

* Additional merge conflict fixes

* Form UI improvements, ignore attribute locks on manual rule application

* Batch AI auto-categorization of transactions

* Auto merchant detection, ai enrichment in batches

* Fix Plaid merchant assignments

* Plaid category matching

* Cleanup 1

* Test cleanup

* Remove stale route

* Fix desktop chat UI issues

* Fix mobile nav styling issues
2025-04-18 11:39:58 -04:00
Zach Gollwitzer
eac5d5e663
Populate holdings for "offline" securities properly (#1958)
* Placeholder logic for missing prices

* Generate holdings properly for "offline" securities

* Separate forward and reverse calculators for holdings and balances

* Remove unnecessary currency conversion during sync

* Clearer sync process

* Move price caching logic to dedicated model

* Base holding calculator

* Base calculator for balances

* Finish balance calculators

* Better naming

* Logs cleanup

* Remove stale data type

* Remove stale test

* Fix price lookup logic for holdings sync

* Fix Plaid item sync regression

* Remove temp logging

* Calculate cash and holdings series

* Add holdings, cash, and balance series dropdown for investments
2025-03-07 17:35:55 -05:00
Nikhil Badyal
26762477a3
Preference to set default_period (#1941)
Some checks are pending
Publish Docker image / ci (push) Waiting to run
Publish Docker image / Build docker image (push) Blocked by required conditions
2025-03-07 10:05:54 -05:00
Zach Gollwitzer
d75be2282b
New Design System + Codebase Refresh (#1823)
Since the very first 0.1.0-alpha.1 release, we've been moving quickly to add new features to the Maybe app. In doing so, some parts of the codebase have become outdated, unnecessary, or overly-complex as a natural result of this feature prioritization.

Now that "core" Maybe is complete, we're moving into a second phase of development where we'll be working hard to improve the accuracy of existing features and build additional features on top of "core". This PR is a quick overhaul of the existing codebase aimed to:

- Establish the brand new and simplified dashboard view (pictured above)
- Establish and move towards the conventions introduced in Cursor rules and project design overview #1788
- Consolidate layouts and improve the performance of layout queries
- Organize the core models of the Maybe domain (i.e. Account::Entry, Account::Transaction, etc.) and break out specific traits of each model into dedicated concerns for better readability
- Remove stale / dead code from codebase
- Remove overly complex code paths in favor of simpler ones
2025-02-21 11:57:59 -05:00
Zach Gollwitzer
abccba3947
Fix account deletion cascade bug (#1644)
* Fix account deletion cascade bug

* Rubocop fixes
2025-01-20 11:37:01 -05:00
Zach Gollwitzer
49c353e10c
Plaid portfolio sync algorithm and calculation improvements (#1526)
* Start tests rework

* Cash balance on schema

* Add reverse syncer

* Reverse balance sync with holdings

* Reverse holdings sync

* Reverse holdings sync should work with only trade entries

* Consolidate brokerage cash

* Add forward sync option

* Update new balance info after syncs

* Intraday balance calculator and sync fixes

* Show only balance for trade entries

* Tests passing

* Update Gemfile.lock

* Cleanup, performance improvements

* Remove account reloads for reliable sync outputs

* Simplify valuation view logic

* Special handling for Plaid cash holding
2024-12-10 17:41:20 -05:00
Zach Gollwitzer
c3248cd796
Improve account transaction, trade, and valuation editing and sync experience (#1506)
Some checks failed
Publish Docker image / ci (push) Has been cancelled
Publish Docker image / Build docker image (push) Has been cancelled
* Consolidate entry controller logic

* Transaction builder

* Update trades controller to use new params

* Load account charts in turbo frames, fix PG overflow

* Consolidate tests

* Tests passing

* Remove unused code

* Add client side trade form validations
2024-11-27 16:01:50 -05:00
Arsen Shkrumelyak
c1034e6edf
Update index method in AccountsController to fetch all accounts (#1491)
Some checks failed
Publish Docker image / ci (push) Has been cancelled
Publish Docker image / Build docker image (push) Has been cancelled
* Fetch all manual accounts, regardless of their active status
* Fetch all Plaid items, regardless of their active status
2024-11-22 15:28:36 -05:00
Zach Gollwitzer
cbba2ba675
Basic Plaid Integration (#1433)
Some checks are pending
Publish Docker image / ci (push) Waiting to run
Publish Docker image / Build docker image (push) Blocked by required conditions
* Basic plaid data model and linking

* Remove institutions, add plaid items

* Improve schema and Plaid provider

* Add webhook verification sketch

* Webhook verification

* Item accounts and balances sync setup

* Provide test encryption keys

* Fix test

* Only provide encryption keys in prod

* Try defining keys in test env

* Consolidate account sync logic

* Add back plaid account initialization

* Plaid transaction sync

* Sync UI overhaul for Plaid

* Add liability and investment syncing

* Handle investment webhooks and process current day holdings

* Remove logs

* Remove "all" period select for performance

* fix amount calc

* Remove todo comment

* Coming soon for investment historical data

* Document Plaid configuration

* Listen for holding updates
2024-11-15 13:49:37 -05:00
Tony Vincent
3b928775a8
Fix timeframe dropdown next to Portfolio (#1434) 2024-11-08 09:10:05 -05:00
Zach Gollwitzer
65db49273c
Account Activity View + Account Forms (#1406)
Some checks are pending
Publish Docker image / ci (push) Waiting to run
Publish Docker image / Build docker image (push) Blocked by required conditions
* Remove balance mode, sketch out refactor

* Activity view checkpoint

* Entry partials, checkpoint

* Finish txn partial

* Give entries context when editing for different turbo responses

* Calculate change of balance for each entry

* Account tabs consolidation

* Translations, linting, brakeman updates

* Account actions concern

* Finalize forms, get account system tests passing

* Get tests passing

* Lint, rubocop, schema updates

* Improve routing and stream responses

* Fix broken routes

* Add import option for adding accounts

* Fix system test

* Fix test specificity

* Fix sparklines

* Improve account redirects
2024-11-04 20:27:31 -05:00
Zach Gollwitzer
263d65ea7e
Basic account onboarding (#1328)
* Basic account onboarding

* Cleanup
2024-10-18 17:18:54 -04:00
Zach Gollwitzer
e8e100e1d8
Rework account views and addition flow (#1324)
* Move accountable partials

* Split accountables into separate view partials

* Fix test

* Add form to permitted partials

* Fix failing system tests

* Update new account modal views

* New sync algorithm implementation

* Update account system test assertions to match new behavior

* Fix off by 1 date error

* Revert new balance sync algorithm

* Add missing account overviews
2024-10-18 14:37:42 -04:00
Zach Gollwitzer
fd941d714d
Add loan and credit card views (#1268)
* Add loan and credit card views

* Lint fix

* Clean up overview card markup

* Lint fix

* Test fix
2024-10-08 17:16:37 -04:00
Zach Gollwitzer
398b246965
CSV Imports Overhaul (Transactions, Trades, Accounts, and Mint import support) (#1209)
* Remove stale 1.0 import logic and model

* Fresh start

* Checkpoint before removing nav

* First working prototype

* Add trade, account, and mint import flows

* Basic working version with tests

* System tests for each import type

* Clean up mappings flow

* Clean up PR, refactor stale code, tests

* Add back row validations

* Row validations

* Fix import job test

* Fix import navigation

* Fix mint import configuration form

* Currency preset for new accounts
2024-10-01 10:47:59 -04:00
Tony Vincent
e06f0c76f9
Add error handling for vehicle and property account creation (#1179)
* add error handling for vehicle and property account creation

* Add required true for money_field

* Remove rescue in controllers
2024-09-17 10:37:09 -04:00
Zach Gollwitzer
eef4c2643b
Rubocop updates (#1118)
* Minimal code style enforcement

* Formatting and lint code updates (no change in functionality)
2024-08-23 10:06:24 -04:00
Zach Gollwitzer
e856691c86
Add Property Details View (#1116)
* Add backend for property account details

* Rubocop updates

* Add property form with details

* Revert "Rubocop updates"

This reverts commit 05b0b8f3a4.

* Bump brakeman to latest version

* Add overview section to property view

* Lint fixes
2024-08-23 08:47:08 -04:00
Zach Gollwitzer
ea8309eedd
Show cash + holdings value for investment account view (#1046)
* Handle missing tickers in security price syncs

* Show combined cash and holdings value on account page

* Improve partial locals
2024-08-02 17:09:25 -04:00
pranavbabu
7ba9830db5
Fix: Omit layout for turbo frames with custom sidebar layout (#1024)
* Define layout method

* Use with_sidebar method

---------

Co-authored-by: Pranav Babu <babu@maindeck.io>
2024-07-26 12:00:41 -04:00
Zach Gollwitzer
fa08f027c7
Sync notifications and troubleshooting guides (#998)
* Add help articles

* Broadcast sync messages as notifications

* Lint fixes

* more lint fixes

* Remove redundant code
2024-07-18 14:39:38 -04:00
Zach Gollwitzer
e9f42c1a65
Add default currencies to forms based on preference (#994)
* Add default currencies to forms based on preference

* Remove dev debugging
2024-07-17 08:57:17 -04:00
Zach Gollwitzer
e51806b98b
More composable forms (#989)
* Make forms more composable, opt-in to form builder

* Remove unused method

* Simpler money input controls

* Add in new form styling to imports

* Lint fixes

* Small tweak of multi select styles
2024-07-16 14:08:24 -04:00
Andrey Morskov
37d5c149ba
Wrap account update in transaction (#985) 2024-07-15 10:03:35 -04:00
Zach Gollwitzer
34e03c2d6a
Make balance editing easier (#976)
* Make balance editing easier

* Translations

* Fix money input option

* Fix balance sync logic

* Rework balance update flow
2024-07-12 13:47:39 -04:00
Zach Gollwitzer
c6bdf49f10
Account::Sync model and test fixture simplifications (#968)
* Add sync model

* Fresh fixtures for sync tests

* Sync tests overhaul

* Fix entry tests

* Complete remaining model test updates

* Update system tests

* Update demo data task

* Add system tests back to PR checks

* More simplifications, add empty family to fixtures for easier testing
2024-07-10 11:22:59 -04:00
Tony Vincent
3ffb6cb62b
Add error handling for AccountsController#create (#957) 2024-07-08 08:53:45 -04:00
Tony Vincent
cc6bf6e961
Enable syncing all accounts in one click (#948)
* Enable syncing all accounts on one click

* Remove argument to sync_later method call

* Add partial for sync all accounts button

* Redirect back if possible when syncing all accounts
2024-07-05 07:36:18 -04:00
Zach Gollwitzer
12380dc8ad
Account namespace updates: part 5 (valuations) (#901)
* Move Valuation to Account namespace

* Move account history to controller

* Clean up valuation controller and views

* Translations and cleanup

* Remove unused scopes and methods

* Pass brakeman
2024-06-21 16:23:28 -04:00
Zach Gollwitzer
957584b69c
Clean up sync logic (#871) 2024-06-13 17:03:38 -04:00
Zach Gollwitzer
9956a9540e
Add institution management and account editing controls (#868)
* Add institution management

* Allow user to select institution on create or edit

* Improve redirect behavior

* Final cleanup

* i18n normalization
2024-06-13 14:37:27 -04:00
Zach Gollwitzer
8c1a7af37f
Allow for optional start date on account creation (#866) 2024-06-13 09:16:00 -04:00
Zach Gollwitzer
c5704ffd45
Improve account internal linking and redirect behavior (#864)
* Fix transaction row link and overflow

* Allow user to access imports from account page

* Clean up accounts controller, add link to account page from settings

* Add link to accounts management from accounts summary page

* Cleanup styles
2024-06-11 18:47:38 -04:00
Jakub Kottnauer
30c19b9d2e
Show an error notification if account cannot be manually synced (#761) 2024-05-20 10:34:48 -04:00
Zach Gollwitzer
45ae4a9737
CSV Transaction Imports (#708)
Introduces a basic CSV import module for bulk-importing account transactions.

Changes include:

- User can load a CSV
- User can configure the column mappings for a CSV
- Imported CSV shows invalid cells
- User can clean up their data directly in the UI
- User can see a preview of the import rows and confirm import
- Layout refactor + Import nav stepper
- System test stability improvements
2024-05-17 09:09:32 -04:00
Jakub Kottnauer
3d9ff3ad2a
Add start balance to manual accounts (#735)
* Add start_balance to accounts

* Add tests

* Cleanup

* Refactor code and add tests

* Update physical cash demo account to be manual

* Do not populate start_balance in migration

* Cleanup

* Review fixes

* Revert calc change

* Update app/models/exchange_rate.rb

Co-authored-by: Zach Gollwitzer <zach.gollwitzer@gmail.com>
Signed-off-by: Jakub Kottnauer <jk@jakubkottnauer.com>

* Add test

* Fix syncable bug and update csv tests

---------

Signed-off-by: Jakub Kottnauer <jk@jakubkottnauer.com>
Co-authored-by: Zach Gollwitzer <zach.gollwitzer@gmail.com>
2024-05-16 15:57:21 -04:00
Claude Ayitey
9563ac6334
Dashboard empty view (#707)
* Added i18n for the Dashboard page.

* Add a check for blank. Empty returned an error since @accounts was nil.

* Remove subtitle when accounts are empty..

* Increased the padding-right value for the buttons. The sapce occupied by the icon made the button elements unbalanced.

* Add refactor as suggested by Zach (https://github.com/maybe-finance/maybe/pull/707#discussion_r1588506443)

* Extract empty state into a partial.

* Render new partial if no accounts exist.

* Moved translation text to shared directory.

* Fix padding-right on New account button.

* Lint fix

* i18n tasks

* Get tests passing with :test queue adapter

---------

Co-authored-by: Zach Gollwitzer <zach.gollwitzer@gmail.com>
2024-05-03 08:11:31 -04:00
Josh Brown
7f491f5064
Add trends to sidebar account list (#697) 2024-04-29 09:56:38 -04:00
Zach Gollwitzer
9bda7efc3f
New Settings Menu, Routes and Controllers Organization (#641)
* Add new settings routes and controllers

* Add new settings view, restructure controllers and routes

* Fix lint errors
2024-04-18 07:56:51 -04:00
Thibaut Gorioux
a22c7a0e9c
Add persistent notification with dismiss and action button (#611)
* Update notification partial

* Update locals args

* Lint

* Move content to body in notification helper

* Avoid dynamic Tailwind class

* Styling

* Add notification to localization file

* Lint

* Normalize locales

* Auto dismiss by default
2024-04-16 13:33:51 -04:00
Mattia
315c4bf1ec
Account Sync should happen at login, 1x per day, OR on-demand (#594)
* Add last_sync_date to accounts table

* Always sync Account after Valuation or Transaction creation, update, or deletion.

Skip sync if user clicks "sync" button without changing anything

* Sync user accounts daily based on last_login_at
2024-04-04 17:00:12 -04:00
Zach Gollwitzer
0a0289846e
Centralize auth (#598) 2024-04-03 10:35:55 -04:00
Mattia
f6540c03ef
Add ability to delete Account (#582)
* Add ability to delete Account

Issue #571

* Fix ActiveJob::DeserializationError in AccountSyncJob when an account doesn't exists

* Use custom confirm modal for account deletion

* Revert "Fix ActiveJob::DeserializationError in AccountSyncJob when an account doesn't exists"

This reverts commit 8dbf634819.
2024-03-31 17:36:54 -04:00
Zach Gollwitzer
110855d077
Multi-Currency Part 2 (#543)
* Support all currencies, handle outside DB

* Remove currencies from seed

* Fix account balance namespace

* Set default currency on authentication

* Cache currency instances

* Implement multi-currency syncs with tests

* Series fallback, passing tests

* Fix conflicts

* Make value group concrete class that works with currency values

* Fix migration conflict

* Update tests to expect multi-currency results

* Update account list to use group method

* Namespace updates

* Fetch unknown exchange rates from API

* Fix date range bug

* Ensure demo data works without external API

* Enforce cascades only at DB level
2024-03-21 13:39:10 -04:00
Zach Gollwitzer
f904d9d062
Add the ability to "rollup" values in a time series (#554)
* Clean up time series models

* Add value group rollup class for summarizing hierarchical data

* Integrate new classes

* Update UI to use new patterns

* Update D3 charts to expect new data format

* Clean up account model

* More cleanup

* Money improvements

* Use new money fields

* Remove invalid fixture data to avoid orphaned accountables

* Update time series to work better with collections

* Fix tests and UI bugs
2024-03-19 09:10:40 -04:00
Zach Gollwitzer
ad7136cb63
Add accounts management list (#522)
* Add accounts management

* Normalize i18n file

* Get turbo streams working

* Ignore disabled accounts in calculations

* Add empty state
2024-03-07 10:55:51 -05:00
Zach Gollwitzer
6f0e410684
Dashboard View and Calculations (#521)
* Handle Turbo updates with tabs

Fixes #491

* Add Filterable concern for controllers

* Add trendline chart

* Extract common UI to partials

* Series refactor

* Put placeholders for calculations in

* Add classification generated column to account

* Add basic net worth calculation

* Add net worth tests

* Get net worth graph working

* Fix lint errors

* Implement asset grouping query

* Make trends and series more intuitive

* Fully functional dashboard

* Remove logging
2024-03-06 09:56:59 -05:00
Zach Gollwitzer
0fe9b6d34a
Add Money and Money Series (#505)
* Add Money class

* Standardize creation of money series

* Formatting

* Fix test
2024-03-01 17:17:34 -05:00
Zach Gollwitzer
7d48c01833
Prepare fixture data for account sync tests (#493)
* Rename account balance field for clarity

`original_balance` and `original_currency` may infer that these values are "original" to the account.  In reality, they represent the "current" balance and currency on the account.

* Prepare fixture data for account sync testing

* Update to new field

* Fix conflicts

* Remove local schema change
2024-02-27 12:43:49 -05:00
Zach Gollwitzer
7e324f1b53
Scaffold out Account Syncing (#474)
* Add trends, time series, seed data

* Remove test data

* Replace old view values with helpers

* Fix tooltip bugs in D3 chart

* Fix tests

* Fix smoke test

* Add CRUD actions for valuations

* Scaffold out inline editing with Turbo

* Refactor series logic

* Scaffold out basic sync process for accounts

* Fix tests
2024-02-22 11:35:06 -05:00