Categories live in user.personalFinanceCategory.primary and user.personalFinanceCategory.detailed (Category, Sub-Category).
user table could store flat array or nested array of categories/sub-categories to allow for auto-complete search box when filtering (and to use in reporting dashboard)
would require a query (upon app login/init or CROM job for API app) to walk all applicable transactions per applicable accountId for the user to grab DISTINCT values and push them to the array on the user record.
Potential for reporting dashboard to run a set of chained promises: accountIds.each(account =>{getTransactionCategories()} to calculate spending per category for graphs/reporting
Categories live in
user.personalFinanceCategory.primary
anduser.personalFinanceCategory.detailed
(Category, Sub-Category).user
table could store flat array or nested array of categories/sub-categories to allow for auto-complete search box when filtering (and to use in reporting dashboard)user
record.accountIds.each(account =>{getTransactionCategories()}
to calculate spending per category for graphs/reporting