Skip to content

Dev#20

Merged
kemboi22 merged 16 commits into
mainfrom
dev
May 20, 2026
Merged

Dev#20
kemboi22 merged 16 commits into
mainfrom
dev

Conversation

@compgeniuses
Copy link
Copy Markdown
Contributor

@compgeniuses compgeniuses commented May 20, 2026

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.

Fixes #(issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactor (no functional changes)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.

  • Unit tests
  • Integration tests
  • End-to-end tests
  • Manual testing

Test Configuration:

  • Node.js version:
  • PostgreSQL version:
  • OS:

Checklist:

  • My code follows the project's code style
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (if applicable)
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Screenshots (if appropriate):

Additional context:

Add any other context about the pull request here.

Add complete multi-currency infrastructure:
- Exchange rate synchronization service with multiple provider support
- Idempotent script to seed default supported currencies
- Generalized currency formatting and validation utilities

Implement full mobile wallet management system:
- Standardized wallet provider interface and central registry
- M-PESA SMS-based transaction parser and handler
- Webhook processing for incoming wallet transactions
- Transaction logging and stats aggregation tools
- Role-based permission controls for wallet access

Update environment configuration with multi-currency settings
Add comprehensive unit test coverage for all new modules
- Add complete multi-currency database schema including business currencies, exchange rates, and currency columns to all monetary tables
- Add reusable CurrencySelect React component with flag icons, search, and form integration
- Fix currency input formatting to handle 0 decimal place currencies correctly
- Update KES currency test to match lowercase Ksh symbol expectation
- Improve mobile wallet webhook error handling for unknown providers
- Refactor Mpesa SMS parsing: update regex, reorder transaction type detection, simplify party name extraction
- Remove abstract modifier from optional wallet provider interface methods
- Update test database setup to use correct migration file paths
Add complete end-to-end mobile wallet feature including:
- Unified wallet API with router, transaction/ledger/stats endpoints
- Frontend dashboard with overview, transaction list, daily ledger views, and SMS transaction import
- Update desktop and mobile site navigation to include the wallet menu item
- Add one-time migration script to convert existing M-PESA data to the new provider framework
- Refactor legacy M-PESA routes to use the new unified mobile wallet data layer while preserving backward compatibility
- Update dashboard and business reset logic to support wallet transaction tracking and data cleanup
include a comprehensive 8681-line test file covering:
- dashboard wallet summary and daily payments endpoints
- multi-provider wallet aggregation, unified wallet apis, and m-pesa proxy routes
- test context setup, cleanup, and seeded test data for consistent runs
This commit implements a complete mobile wallet system for the application:
- Adds support for M-Pesa, Airtel Money, and Sasapay providers with SMS parsing and full API integration
- Adds wallet admin dashboard, protected routes, and new navigation menu item
- Adds SMS transaction preview and import tools with multi-provider selection
- Adds reusable currency converter and wallet provider selector UI components
- Adds automatic seeding of default wallet providers and exchange rates on app startup
- Updates test configurations and increases test timeouts for reliable test execution
- Adds comprehensive unit tests for all new wallet provider implementations
add previewed state to track completed preview, reset state when form inputs change, update import button disabled condition
feat(exchange-rates): add frankfurter support

- Set Frankfurter as the default exchange rate provider (free, open-source)
- Add environment variable configuration for Frankfurter API URL
- Refactor currency converter to support Frankfurter API calls and dedicated sync logic
- Update exchange rate environment validation to exclude Frankfurter from requiring an API key
- Add new settings UI section for currency exchanges with manual sync button
- Update wallet management API route to use new currency converter refresh method
- Update example environment file with new config defaults and comments
add multi-currency enable toggle in site settings page
add per-business default currency selector in business management
add currency activation/deactivation and creation controls in wallet admin
refactor exchange rate logic to use centralized CurrencyConverter with memory and database fallbacks, improving performance and reliability
update backend API routes for currency and exchange rate management
Replace all references to "mpesa" with "wallet" across schemas, UI components, test files, seed data, and backend logic. Add comprehensive database migration for wallet and currency management tables, new .kilo config file, and business overview consolidation plan document.
Extract shared account filtering code into reusable utility functions across Bills, Expenses, and Mpesa pages. Add auto-detection of funding accounts when the payment method changes, automatically selecting the account if exactly one valid match exists. Restrict funding account dropdown options to only allowed account types for the selected payment method. Update the Mpesa page to include both mpesa and wallet accounts in its account filter.
- Create new BusinessOverview page as central hub for single business management including profile details, logo upload, document management, and branch CRUD
- Update Businesses list action button to link to the new overview page instead of the legacy details route
- Add lazy-loaded `/businesses/:id` route in the main App component
- Add back navigation to Businesses list from the Locations page
Add authenticated tRPC query endpoint to fetch non-deleted locations filtered by business ID.
Update BusinessOverview page to support location active status and account management:
- Fetch global accounts list for dropdown selections
- Add form fields for default wallet/cash account and active status
- Display location's default accounts and associated account balances
- Fix location update mutation to pass all new form fields correctly
Add full wallet management features to settings page with sub-tabs for providers, exchange rates, and currencies. Remove the unused locations navigation item from mobile navigation.
remove the /locations (Branches) and /admin/wallet (Wallet Admin) nav entries
add database migration to add 'wallet' to account and payment method enums for cross-system wallet integration
fix wallet transaction amount handling to use absolute value and 2 decimal places
remove unused businesses nav links from main and mobile navigation menus
add direct buttons to businesses and locations management pages in settings
update test setup to run the new wallet migration
add required imports including useNavigate and Wallet icon across components
feat: add multi-currency and mobile wallet support
@kemboi22 kemboi22 merged commit af6dabf into main May 20, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants