Cashflow App
Features & Capabilities
Cashflow App - Features & Capabilities Report
Template Version: 1.0.0 Generated: 2026-01-22 Package:
@epicdm/flowstate-app-cashflowApp ID:cashflow
Table of Contents
- Overview
- App Identity
- Feature Categories
- Capabilities
- Data Models
- User Workflows
- Integration Points
- Architecture Summary
- Quality & Compliance
Overview
Purpose
The Cashflow App is a comprehensive financial tracking and income statement management application for FlowState. It provides real-time visibility into personal or business finances through a 4-quadrant income statement dashboard, account management, transaction tracking, scheduled transactions with cash flow projections, and seamless YNAB integration for data synchronization.
Target Users
| User Type | Description | Primary Use Cases |
|---|---|---|
| Personal Finance Users | Individuals managing household finances | Track income/expenses, monitor net worth, budget |
| YNAB Users | Existing YNAB users wanting enhanced reporting | Sync data, advanced income statement views |
| Small Business Owners | Entrepreneurs tracking business finances | Income statements, cash flow projections |
| Household Managers | People managing family finances | Multi-account tracking, bill scheduling |
Value Proposition
- 4-Quadrant Income Statement: Visual dashboard showing Income, Expenses, Assets, and Liabilities
- YNAB Integration: Seamless OAuth sync with existing YNAB budgets and accounts
- Cash Flow Projections: 30-day forward-looking projections from scheduled transactions
- Guided Setup Wizard: Multi-step wizard for easy onboarding (manual or YNAB import)
- Flexible Period Views: Monthly, quarterly, and annual period filtering
- Real-time Net Worth: Automatic calculation from asset and liability accounts
- Category Management: Customizable hierarchical categories for transaction organization
- CSV Import: Bulk transaction import from bank exports
App Identity
| Property | Value |
|---|---|
| ID | cashflow |
| Display Name | Cashflow App |
| Package Name | @epicdm/flowstate-app-cashflow |
| Version | 1.0.0 |
| Category | technical |
| Icon | box |
| Color | #6366f1 |
| Base Path | /cashflow |
| Permissions | database |
Entry Points
| Entry Point | Path | Description |
|---|---|---|
| Main Export | src/index.ts | Primary package export |
| Standalone | src/standalone.tsx | Standalone app entry |
| App Component | src/App.tsx | Main React component with routing |
| Plugin | src/plugin.ts | FlowState plugin registration |
Feature Categories
Category 1: Income Statement Dashboard
Core financial dashboard with 4-quadrant layout
Feature: 4-Quadrant Dashboard
| Property | Details |
|---|---|
| ID | dashboard-quadrants |
| Status | Implemented |
| Priority | High |
Description: Main dashboard displaying income statement data in a 4-quadrant layout: Income (top-left), Assets (top-right), Expenses (bottom-left), and Liabilities (bottom-right). Includes net worth summary and cash flow overview.
User Story: As a user, I want to see my financial position at a glance so that I can understand my income, expenses, and net worth.
Acceptance Criteria:
- [x] Display income quadrant with period totals
- [x] Display expense quadrant with budgeted vs actual
- [x] Display assets quadrant with account balances
- [x] Display liabilities quadrant with debt balances
- [x] Show net worth summary
- [x] Show cash flow summary (income - expenses)
Implementation:
| Component | Path | Purpose |
|---|---|---|
| DashboardPage | src/pages/DashboardPage.tsx | Main dashboard page |
| IncomeQuadrant | src/components/dashboard/IncomeQuadrant.tsx | Income display |
| ExpenseQuadrant | src/components/dashboard/ExpenseQuadrant.tsx | Expense display |
| AssetsQuadrant | src/components/dashboard/AssetsQuadrant.tsx | Assets display |
| LiabilitiesQuadrant | src/components/dashboard/LiabilitiesQuadrant.tsx | Liabilities display |
| NetWorthSummary | src/components/dashboard/NetWorthSummary.tsx | Net worth card |
| usePeriodIncome | src/hooks/usePeriodIncome.ts | Income calculations |
| usePeriodExpenses | src/hooks/usePeriodExpenses.ts | Expense calculations |
Routes:
/dashboard- Main dashboard (default route)
Feature: Period Navigation
| Property | Details |
|---|---|
| ID | period-navigation |
| Status | Implemented |
| Priority | High |
Description: Navigate between monthly, quarterly, and annual periods with forward/back controls. Data automatically filters to the selected period.
User Story: As a user, I want to view my finances by different time periods so that I can track trends over time.
Acceptance Criteria:
- [x] Toggle between monthly, quarterly, annual views
- [x] Navigate forward/backward in time
- [x] Display current period label
- [x] Filter all dashboard data by selected period
Implementation:
| Component | Path | Purpose |
|---|---|---|
| DashboardPage | src/pages/DashboardPage.tsx | Period state management |
| getDateRange | src/pages/DashboardPage.tsx | Date range calculation |
Category 2: Account Management
Track and manage financial accounts
Feature: Account CRUD Operations
| Property | Details |
|---|---|
| ID | account-crud |
| Status | Implemented |
| Priority | High |
Description: Create, view, edit, and delete financial accounts including checking, savings, credit cards, loans, and other account types.
User Story: As a user, I want to manage my accounts so that I can track balances across all my financial institutions.
Acceptance Criteria:
- [x] Create accounts with name, type, and initial balance
- [x] View accounts in grouped list (assets/liabilities)
- [x] Edit account details
- [x] Delete/close accounts
- [x] Track cleared and uncleared balances
- [x] Support debt-specific fields (interest rate, minimum payment)
Implementation:
| Component | Path | Purpose |
|---|---|---|
| AccountsPage | src/pages/AccountsPage.tsx | Account list page |
| AccountDetailPage | src/pages/AccountDetailPage.tsx | Account details |
| AccountList | src/components/accounts/AccountList.tsx | Account listing |
| AccountCard | src/components/accounts/AccountCard.tsx | Account display card |
| AddAccountModal | src/components/accounts/AddAccountModal.tsx | Create account |
| EditAccountModal | src/components/accounts/EditAccountModal.tsx | Edit account |
| DebtFieldsSection | src/components/accounts/DebtFieldsSection.tsx | Debt-specific fields |
| useAccounts | src/hooks/useAccounts.ts | Account operations |
Routes:
/accounts- Account list/accounts/:accountId- Account detail with transactions
Category 3: Transaction Management
Track and categorize financial transactions
Feature: Transaction List & Filtering
| Property | Details |
|---|---|
| ID | transaction-list |
| Status | Implemented |
| Priority | High |
Description: View all transactions with comprehensive filtering by date range, account, category, amount, and cleared status. Includes search functionality.
User Story: As a user, I want to view and filter my transactions so that I can find specific transactions and understand spending patterns.
Acceptance Criteria:
- [x] Display transactions in sortable list
- [x] Filter by date range
- [x] Filter by account
- [x] Filter by category
- [x] Filter by amount range
- [x] Filter by cleared status
- [x] Search by payee name
- [x] Show active filter badges
Implementation:
| Component | Path | Purpose |
|---|---|---|
| TransactionsPage | src/pages/TransactionsPage.tsx | Transaction page |
| TransactionList | src/components/transactions/TransactionList.tsx | Transaction list |
| TransactionRow | src/components/transactions/TransactionRow.tsx | Single row |
| TransactionFilters | src/components/transactions/TransactionFilters.tsx | Filter panel |
| useTransactions | src/hooks/useTransactions.ts | Transaction queries |
Routes:
/transactions- Transaction list with filters
Feature: Bulk Category Assignment
| Property | Details |
|---|---|
| ID | bulk-category-assign |
| Status | Implemented |
| Priority | Medium |
Description: Select multiple transactions and assign a category to all of them at once for efficient categorization of imported transactions.
User Story: As a user, I want to categorize multiple transactions at once so that I can quickly organize imported transactions.
Acceptance Criteria:
- [x] Multi-select transactions in list
- [x] Show selection count
- [x] Open category assignment modal
- [x] Apply category to all selected
- [x] Clear selection after assignment
Implementation:
| Component | Path | Purpose |
|---|---|---|
| TransactionsPage | src/pages/TransactionsPage.tsx | Selection state |
| TransactionList | src/components/transactions/TransactionList.tsx | Multi-select UI |
| CategorySelector | src/components/transactions/CategorySelector.tsx | Category picker |
| useUpdateTransaction | src/hooks/useTransactions.ts | Update operations |
Feature: CSV Import
| Property | Details |
|---|---|
| ID | csv-import |
| Status | Implemented |
| Priority | Medium |
Description: Import transactions from CSV files exported from banks or other financial software with column mapping wizard.
User Story: As a user, I want to import transactions from CSV so that I can bring in data from my bank.
Acceptance Criteria:
- [x] Upload CSV file
- [x] Preview data before import
- [x] Map CSV columns to transaction fields
- [x] Validate data before import
- [x] Create transactions from import
Implementation:
| Component | Path | Purpose |
|---|---|---|
| CSVImport | src/components/transactions/CSVImport.tsx | Import wizard |
| TransactionsPage | src/pages/TransactionsPage.tsx | Import integration |
| useCreateTransaction | src/hooks/useTransactions.ts | Create operations |
Category 4: Budget Management
Create and track budgets
Feature: Budget Display
| Property | Details |
|---|---|
| ID | budget-display |
| Status | Implemented |
| Priority | Medium |
Description: View budgets with their associated accounts, date ranges, and currency information. Supports YNAB-synced budgets.
User Story: As a user, I want to see my budgets so that I can track my spending against planned amounts.
Acceptance Criteria:
- [x] Display budget cards with key information
- [x] Show date range (first/last month)
- [x] Show associated accounts with balances
- [x] Display currency format
- [x] Link to budget creation/setup wizard
Implementation:
| Component | Path | Purpose |
|---|---|---|
| BudgetsPage | src/pages/BudgetsPage.tsx | Budget list page |
| useBudgets | src/hooks/useBudgets.ts | Budget queries |
Routes:
/budgets- Budget list
Category 5: Category Management
Organize transactions with categories
Feature: Category CRUD Operations
| Property | Details |
|---|---|
| ID | category-crud |
| Status | Implemented |
| Priority | High |
Description: Create, view, edit, and delete categories organized in category groups. Supports both income and expense categories.
User Story: As a user, I want to manage categories so that I can organize my transactions meaningfully.
Acceptance Criteria:
- [x] Create categories with name and group
- [x] View categories grouped by category group
- [x] Edit category details
- [x] Delete categories
- [x] Support income vs expense categorization
- [x] Provide default category templates
Implementation:
| Component | Path | Purpose |
|---|---|---|
| CategoriesPage | src/pages/CategoriesPage.tsx | Category management |
| CategoryList | src/components/categories/CategoryList.tsx | Category list |
| CategoryCard | src/components/categories/CategoryCard.tsx | Category display |
| AddCategoryModal | src/components/categories/AddCategoryModal.tsx | Create category |
| EditCategoryModal | src/components/categories/EditCategoryModal.tsx | Edit category |
| useCategories | src/hooks/useCategories.ts | Category operations |
| defaultCategories | src/constants/defaultCategories.ts | Category templates |
Routes:
/categories- Category management
Category 6: Scheduled Transactions
Manage recurring transactions and cash flow projections
Feature: Scheduled Transaction Management
| Property | Details |
|---|---|
| ID | scheduled-transactions |
| Status | Implemented |
| Priority | High |
Description: View and manage scheduled/recurring transactions with various frequency options (daily, weekly, monthly, etc.). Filter by income or expenses.
User Story: As a user, I want to manage scheduled transactions so that I can track recurring income and expenses.
Acceptance Criteria:
- [x] Display scheduled transactions in table
- [x] Show frequency, next date, amount
- [x] Filter by income/expenses
- [x] Sort by next date
- [x] Support multiple frequency options
Implementation:
| Component | Path | Purpose |
|---|---|---|
| ScheduledTransactionsPage | src/pages/ScheduledTransactionsPage.tsx | Scheduled list |
| useScheduledTransactions | src/hooks/useScheduledTransactions.ts | Scheduled queries |
| frequencyUtils | src/utils/frequencyUtils.ts | Frequency helpers |
Routes:
/scheduled- Scheduled transactions list
Feature: Cash Flow Projections
| Property | Details |
|---|---|
| ID | cashflow-projections |
| Status | Implemented |
| Priority | High |
Description: Calculate and display 30-day forward-looking cash flow projections based on scheduled transactions.
User Story: As a user, I want to see projected cash flow so that I can plan for upcoming income and expenses.
Acceptance Criteria:
- [x] Calculate projected income for 30 days
- [x] Calculate projected expenses for 30 days
- [x] Calculate net cash flow
- [x] Show count of upcoming transactions
- [x] Display summary cards
Implementation:
| Component | Path | Purpose |
|---|---|---|
| ScheduledTransactionsPage | src/pages/ScheduledTransactionsPage.tsx | Projections display |
| useProjectedCashFlow | src/hooks/useScheduledTransactions.ts | Projection calculations |
Category 7: YNAB Integration
Sync data with YNAB (You Need A Budget)
Feature: YNAB OAuth Connection
| Property | Details |
|---|---|
| ID | ynab-oauth |
| Status | Implemented |
| Priority | High |
Description: Connect to YNAB using OAuth 2.0 authentication flow. Manage connection status and disconnect when needed.
User Story: As a YNAB user, I want to connect my YNAB account so that I can sync my data into FlowState.
Acceptance Criteria:
- [x] OAuth connect button
- [x] Handle OAuth callback
- [x] Store tokens securely
- [x] Display connection status
- [x] Disconnect functionality
- [x] Show connection timestamp
Implementation:
| Component | Path | Purpose |
|---|---|---|
| SettingsPage | src/pages/SettingsPage.tsx | Connection UI |
| YNABCallbackPage | src/pages/YNABCallbackPage.tsx | OAuth callback |
| useYNABConnection | src/hooks/useYNABConnection.ts | Connection state |
| oauth | src/services/ynab/oauth.ts | OAuth logic |
| tokenStorage | src/services/ynab/tokenStorage.ts | Token management |
Routes:
/settings- YNAB connection settings/settings/ynab-callback- OAuth callback handler
Feature: YNAB Data Sync
| Property | Details |
|---|---|
| ID | ynab-sync |
| Status | Implemented |
| Priority | High |
Description: Synchronize accounts, categories, transactions, and scheduled transactions from YNAB with configurable polling interval.
User Story: As a user, I want to sync my YNAB data so that I can see my YNAB information in FlowState.
Acceptance Criteria:
- [x] Select budget to sync
- [x] Manual sync on demand
- [x] Background auto-sync with interval
- [x] Show sync progress and status
- [x] Display sync results (created/deleted counts)
- [x] Test sync mode (limited records)
- [x] Configure polling interval (5-60 minutes)
Implementation:
| Component | Path | Purpose |
|---|---|---|
| SettingsPage | src/pages/SettingsPage.tsx | Sync settings UI |
| useYNABSync | src/hooks/useYNABSync.ts | Sync orchestration |
| useYNABBudgets | src/hooks/useYNABBudgets.ts | Budget selection |
| YNABSyncService | src/services/sync/YNABSyncService.ts | Sync logic |
| mappers | src/services/sync/mappers.ts | Data transformation |
Feature: YNAB Import in Setup Wizard
| Property | Details |
|---|---|
| ID | ynab-import-wizard |
| Status | Implemented |
| Priority | High |
Description: Import YNAB data as part of the setup wizard flow for easy onboarding of existing YNAB users.
User Story: As a YNAB user, I want to import my data during setup so that I can quickly get started with FlowState.
Acceptance Criteria:
- [x] YNAB import path in wizard
- [x] Budget selection during import
- [x] Import progress display
- [x] Import accounts, categories, transactions
Implementation:
| Component | Path | Purpose |
|---|---|---|
| ChoosePathStep | src/pages/SetupWizard/steps/ChoosePathStep.tsx | Path selection |
| useYNABImport | src/hooks/useYNABImport.ts | Import operations |
Category 8: Setup Wizard
Guided setup for new income statements
Feature: Multi-Step Setup Wizard
| Property | Details |
|---|---|
| ID | setup-wizard |
| Status | Implemented |
| Priority | High |
Description: Multi-step wizard guiding users through income statement setup with options for manual creation or YNAB import.
User Story: As a new user, I want a guided setup process so that I can easily configure my income statement.
Acceptance Criteria:
- [x] Choose path (manual vs YNAB)
- [x] Basics step (name, description)
- [x] Categories step (configure categories)
- [x] Accounts step (add accounts)
- [x] Income step (configure income sources)
- [x] Expenses step (configure expense budgets)
- [x] Review step (confirm and activate)
- [x] Progress indicator
- [x] Draft persistence (resume incomplete setup)
Implementation:
| Component | Path | Purpose |
|---|---|---|
| SetupWizardPage | src/pages/SetupWizard/SetupWizardPage.tsx | Wizard container |
| WizardContext | src/pages/SetupWizard/WizardContext.tsx | Wizard state |
| StepIndicator | src/pages/SetupWizard/components/StepIndicator.tsx | Progress display |
| ChoosePathStep | src/pages/SetupWizard/steps/ChoosePathStep.tsx | Path selection |
| BasicsStep | src/pages/SetupWizard/steps/BasicsStep.tsx | Name/description |
| CategoriesStep | src/pages/SetupWizard/steps/CategoriesStep.tsx | Category setup |
| AccountsStep | src/pages/SetupWizard/steps/AccountsStep.tsx | Account setup |
| IncomeStep | src/pages/SetupWizard/steps/IncomeStep.tsx | Income config |
| ExpensesStep | src/pages/SetupWizard/steps/ExpensesStep.tsx | Expense config |
| ReviewStep | src/pages/SetupWizard/steps/ReviewStep.tsx | Review/activate |
| useSetupWizard | src/hooks/useSetupWizard.ts | Wizard operations |
| useIncomeStatements | src/hooks/useIncomeStatements.ts | Statement persistence |
Routes:
/setup/new- New income statement wizard/setup/:id- Resume draft wizard
Capabilities
Core Capabilities
| Capability | Description | Implementation |
|---|---|---|
| 4-Quadrant Dashboard | Income/Expense/Assets/Liabilities view | QuadrantCard components with period filtering |
| Multi-Account Tracking | Track unlimited financial accounts | RxDB collection with typed models |
| Transaction Categorization | Organize transactions by category | Hierarchical categories with groups |
| Cash Flow Projections | 30-day forward projections | Scheduled transaction calculations |
| YNAB Synchronization | Full data sync with YNAB | OAuth + REST API integration |
Technical Capabilities
| Capability | Status | Notes |
|---|---|---|
| CRUD Operations | Yes | Full CRUD on all entity types |
| Real-time Updates | Yes | RxDB reactive subscriptions |
| Offline Support | Yes | RxDB local-first architecture |
| Search & Filter | Yes | Multi-field filtering on transactions |
| Sorting | Yes | Date, amount, payee sorting |
| Pagination | Partial | Infinite scroll patterns |
| Export | No | Not currently implemented |
| Notifications | Partial | Toast notifications for actions |
Integration Capabilities
| Integration | Type | Description |
|---|---|---|
| YNAB | external | OAuth-based data synchronization |
| RxDB Server | internal | Replication for data sync |
| FlowState Framework | internal | Auth, org context, layout |
Data Models
Collections Used
| Collection | Description | Operations | Primary Hook |
|---|---|---|---|
finAccounts | Financial accounts | CRUD, Query | useAccounts |
finBudgets | Budget definitions | CRUD, Query | useBudgets |
finCategories | Transaction categories | CRUD, Query | useCategories |
finTransactions | Financial transactions | CRUD, Query | useTransactions |
finScheduledTransactions | Recurring transactions | CRUD, Query | useScheduledTransactions |
finIncomeStatements | Income statement configs | CRUD, Query | useIncomeStatements |
Entity Relationships
IncomeStatement
|
+-- Accounts (hasMany via budget)
| |
| +-- Transactions (hasMany)
|
+-- Categories (hasMany via budget)
| |
| +-- Transactions (belongsTo)
|
+-- ScheduledTransactions (hasMany)
Budget
|
+-- Accounts (hasMany)
|
+-- Categories (hasMany)
|
+-- Transactions (hasMany)
Key Data Flows
User Action --> Component --> Hook --> RxDB Collection --> UI Update
|
+--> YNAB Sync Service
|
+--> Replication --> Server
User Workflows
Workflow 1: Initial Setup (Manual)
Set up first income statement manually
Trigger: Click "New" or navigate to /setup/new
Steps:
| Step | Action | Component | Outcome |
|---|---|---|---|
| 1 | Choose "Manual Setup" | ChoosePathStep | Path selected |
| 2 | Enter name/description | BasicsStep | Basics saved |
| 3 | Configure categories | CategoriesStep | Categories created |
| 4 | Add accounts | AccountsStep | Accounts created |
| 5 | Set up income | IncomeStep | Income configured |
| 6 | Configure expenses | ExpensesStep | Budgets set |
| 7 | Review and activate | ReviewStep | Statement active |
Success Outcome: Income statement created and visible on dashboard Failure Handling: Draft saved, can resume from /setup/:id
Workflow 2: YNAB Connection & Sync
Connect YNAB and sync data
Trigger: Navigate to Settings, click "Connect YNAB"
Steps:
| Step | Action | Component | Outcome |
|---|---|---|---|
| 1 | Click Connect YNAB | SettingsPage | OAuth redirect |
| 2 | Authorize in YNAB | External | Token obtained |
| 3 | Handle callback | YNABCallbackPage | Connection saved |
| 4 | Select budget | SettingsPage | Budget configured |
| 5 | Click Sync Now | SettingsPage | Sync started |
| 6 | View results | SettingsPage | Data synced |
Success Outcome: YNAB data visible in app Failure Handling: Error displayed, retry option available
Workflow 3: Transaction Categorization
Categorize uncategorized transactions
Trigger: View transactions with missing categories
Steps:
| Step | Action | Component | Outcome |
|---|---|---|---|
| 1 | Navigate to transactions | TransactionsPage | List displayed |
| 2 | Select multiple transactions | TransactionList | Selection made |
| 3 | Click "Assign Category" | TransactionsPage | Modal opens |
| 4 | Choose category | CategorySelector | Category selected |
| 5 | Apply | BulkCategoryAssignment | Categories updated |
Success Outcome: Transactions categorized, appear in expense reports Failure Handling: Error toast, selection preserved
Workflow 4: CSV Import
Import transactions from bank CSV
Trigger: Click "Import CSV" on transactions page
Steps:
| Step | Action | Component | Outcome |
|---|---|---|---|
| 1 | Click Import CSV | TransactionsPage | Wizard opens |
| 2 | Upload file | CSVImport | File parsed |
| 3 | Map columns | CSVImport | Fields mapped |
| 4 | Preview data | CSVImport | Data validated |
| 5 | Confirm import | CSVImport | Transactions created |
Success Outcome: Transactions imported and visible in list Failure Handling: Validation errors shown, can adjust mapping
Integration Points
Internal Integrations
| Integration | Package | Purpose |
|---|---|---|
| FlowState Framework | @epicdm/flowstate-app-framework | App container, auth, layout, navigation |
| Database | @epicdm/flowstate-rxdb-react | Reactive subscriptions |
| UI Components | Tailwind CSS + Lucide | Styling and icons |
External Integrations
| Integration | Type | Configuration |
|---|---|---|
| YNAB API | OAuth 2.0 REST | Client ID in env, tokens in storage |
MCP Integration
| Tool | Purpose | Example Usage |
|---|---|---|
collection-query | Query accounts, transactions | {"collection": "finAccounts", "selector": {"type": "checking"}} |
collection-create | Create transactions | {"collection": "finTransactions", "data": {...}} |
collection-update | Update account balance | {"collection": "finAccounts", "id": "...", "data": {"balance": 5000}} |
Architecture Summary
Directory Structure
src/
├── components/ # UI components (30+ files)
│ ├── accounts/ # Account components (8 files)
│ ├── categories/ # Category components (5 files)
│ ├── dashboard/ # Dashboard quadrants (8 files)
│ └── transactions/ # Transaction components (6 files)
├── hooks/ # Custom React hooks (15 hooks)
├── services/ # Business logic
│ ├── sync/ # YNAB sync service
│ └── ynab/ # YNAB OAuth/API
├── pages/ # Page components (13 pages)
│ └── SetupWizard/ # Multi-step wizard (7 steps)
├── constants/ # Default categories, config
├── utils/ # Utility functions
└── styles/ # Tailwind CSS
Key Architectural Patterns
| Pattern | Usage | Example |
|---|---|---|
| State Management | RxDB for data | Collections for all financial entities |
| Data Flow | Reactive subscriptions | RxDB observables through hooks |
| Component Architecture | Feature-based | Components grouped by domain |
| Routing | React Router v6 | Flat route structure with params |
| Services | External API integration | YNAB sync orchestration |
Services Overview
| Service | Responsibility | Key Methods |
|---|---|---|
YNABSyncService | YNAB data synchronization | syncAccounts(), syncTransactions(), syncCategories() |
oauth | YNAB OAuth flow | initiateAuth(), handleCallback() |
tokenStorage | Token management | saveTokens(), getTokens(), clearTokens() |
mappers | Data transformation | mapYNABAccount(), mapYNABTransaction() |
Hooks Overview
| Hook | Purpose | Returns |
|---|---|---|
useAccounts | Account operations | { accounts, isLoading, createAccount, updateAccount } |
useTransactions | Transaction operations | { transactions, isLoading, createTransaction } |
useCategories | Category operations | { categories, isLoading, createCategory } |
useScheduledTransactions | Scheduled transactions | { scheduledTransactions, isLoading } |
useProjectedCashFlow | Cash flow projections | { projectedIncome, projectedExpenses, projectedNet } |
usePeriodIncome | Period income calculations | { incomeItems, incomeTotal, actualIncomeTotal } |
usePeriodExpenses | Period expense calculations | { expenseItems, expenseTotal, budgetedTotal } |
useYNABConnection | YNAB connection state | { isConnected, connect, disconnect } |
useYNABSync | YNAB sync operations | { syncNow, start, stop, state } |
useSetupWizard | Wizard state | { currentStep, nextStep, prevStep, path } |
useIncomeStatements | Income statement CRUD | { incomeStatements, createIncomeStatement } |
Quality & Compliance
Test Coverage
| Test Type | Location | Coverage Target |
|---|---|---|
| Unit Tests | src/**/__tests__/ | >= 80% |
| Hook Tests | src/hooks/__tests__/ | >= 80% |
| Service Tests | src/services/__tests__/ | >= 80% |
| E2E Tests | playwright/ | Critical paths |
Accessibility
| Requirement | Status | Notes |
|---|---|---|
| WCAG 2.1 AA | In Progress | Components use semantic HTML |
| Keyboard Navigation | Yes | Tab navigation supported |
| Screen Reader Support | Partial | Aria labels on interactive elements |
| Focus Management | Yes | Modal focus trapping |
Security Considerations
| Consideration | Implementation |
|---|---|
| OAuth Tokens | Stored securely via tokenStorage service |
| Input Validation | Form validation on all inputs |
| Authorization | Workspace/org isolation via IDs |
| API Security | OAuth bearer tokens for YNAB API |
FlowState Alignment
Spec-Driven Development
This app follows the FlowState Standard for spec-driven development:
- Requirements:
.flowstate/specs/{{feature-name}}/requirements.md - Design:
.flowstate/specs/{{feature-name}}/design.md - Wireframes:
.flowstate/specs/{{feature-name}}/wireframes.html - Tasks:
.flowstate/specs/{{feature-name}}/tasks.md
Quality Gates
| Gate | Requirement | Status |
|---|---|---|
| Test Coverage | >= 80% statements | In Progress |
| TypeScript Strict | No any without justification | Pass |
| Accessibility | WCAG 2.1 AA | In Progress |
| Documentation | 100% TSDoc on public APIs | In Progress |
| Security | No critical vulnerabilities | Pass |
Appendix
Related Documentation
| Document | Location | Purpose |
|---|---|---|
| FLOWSTATE.md | .flowstate/docs/FLOWSTATE.md | Development workflow |
| PROCESS.md | .flowstate/docs/PROCESS.md | Development process |
| TDD.md | .flowstate/steering/TDD.md | Testing standards |
| QUALITY.md | .flowstate/steering/QUALITY.md | Code quality |
Version History
| Version | Date | Author | Changes |
|---|---|---|---|
| 1.0.0 | 2026-01-22 | Claude | Initial documentation |