Project Overview: Intelligent Cashflow Management System
The INIGRA Cashflow Manager is a modern, full-stack financial tracking application designed for small businesses and entrepreneurs who need real-time visibility into their cash flow. This enterprise-grade solution combines automated transaction processing, multi-currency support, and cutting-edge WhatsApp integration to streamline financial management workflows.
Core Technology Stack
Frontend Architecture
- React 18 with TypeScript for type-safe component development
- Vite as the build tool for lightning-fast hot module replacement
- Tailwind CSS for responsive, mobile-first UI design with custom INIGRA branding (#ac7222)
- Custom font integration (Bank Gothic, Barlow Semi Condensed) for professional corporate identity
Backend Infrastructure
- Node.js with Express.js for RESTful API architecture
- TypeScript throughout the stack for enhanced code quality and maintainability
- Supabase (PostgreSQL) as the cloud database with Row Level Security
- Railway platform for production deployment and CI/CD
Database Design
- PostgreSQL 15+ with advanced features:
- Database triggers for automatic balance calculations
- Real-time data synchronization
- Atomic transaction handling
- Multi-table relationships with foreign key constraints

Key Features & Capabilities
1. Automated Account Balance Tracking
- Real-time balance updates triggered by database events
- Separate tracking for business and personal accounts
- Automatic balance recalculation on transaction INSERT/UPDATE/DELETE
- Historical balance tracking with timestamp audit trail
2. Multi-Currency Transaction Management
- Support for PLN, USD, and GBP currencies
- Automatic currency conversion to base currency (PLN)
- Configurable exchange rates with admin panel
- Real-time exchange rate updates
3. Advanced Transaction Categorization
- Dynamic category system for income and expenses
- Business vs. Personal account segregation
- Recurring transaction templates
- Category-based financial analytics
4. WhatsApp Integration & Natural Language Processing
The standout feature of this system is the Twilio-powered WhatsApp integration that enables hands-free transaction entry:
How it works:
- Users send natural language messages via WhatsApp
- Advanced message parser extracts transaction details:
- Transaction type (income/expense) from keywords
- Amount and currency detection with regex patterns
- Date parsing in multiple formats (DD.MM, DD.MM.YYYY, YYYY-MM-DD)
- Account type inference (business/personal)
- Automatic category assignment based on keyword matching
Example:
User sends: "James, Payment, 2500 PLN, payment date 3.11"
System creates:
- Type: Expense
- Description: "James Payment"
- Amount: 2500 PLN
- Date: November 3, 2025
- Category: Payroll (auto-assigned)
- Account: Business
Confirmation System:
- Automatic confirmation messages sent back via WhatsApp
- Formatted transaction summary with emojis
- Balance update notifications
- Error handling with user-friendly messages
5. Real-Time Dashboard Analytics
- Monthly financial summaries (income, expenses, balance)
- Visual breakdown of business vs. personal expenses
- Percentage-based expense analysis
- Deficit warnings with actionable insights
- Historical data comparison across months
6. Responsive Mobile-First Design
- Fully optimized for mobile devices (iOS/Android)
- Touch-friendly UI with large tap targets
- Horizontal scrolling tabs for easy navigation
- Clamp-based typography for perfect scaling
- Progressive Web App (PWA) ready

Technical Innovations
1. PostgreSQL Database Triggers
Custom PL/pgSQL functions automatically maintain account balances:
CREATE TRIGGER trigger_update_account_balance
AFTER INSERT OR UPDATE OR DELETE ON transactions
FOR EACH ROW
EXECUTE FUNCTION update_account_balance();
2. Smart Message Parsing Algorithm
- Regex-based pattern matching for amounts and currencies
- Context-aware keyword detection for categories
- Fuzzy date parsing with timezone handling (UTC)
- Multi-language support (Polish/English)
3. RESTful API Architecture
Comprehensive API endpoints:
/api/transactions– CRUD operations for transactions/api/categories– Category management/api/account-balances– Real-time balance retrieval/api/exchange-rates– Currency rate management/api/whatsapp/webhook– Twilio webhook integration/api/whatsapp/status– Integration health monitoring
4. Security & Data Protection
- Environment variable management for sensitive credentials
- Supabase Row Level Security (RLS) policies
- CORS configuration for controlled API access
- SQL injection prevention via parameterized queries
- No client-side credential exposure
Automation & Workflows
1. Transaction Automation
- Automatic balance updates (no manual calculation needed)
- Recurring transaction templates
- Batch transaction processing
- Historical data recalculation
2. WhatsApp Workflow
- 24/7 automated message processing
- Instant transaction confirmation
- Error detection and user feedback
- Multi-user support (via Twilio sandbox/production)
3. Deployment Automation
- Git-based continuous deployment via Railway
- Automatic environment variable injection
- Zero-downtime deployments
- Database migration handling
Financial Calculations & Analytics
1. Real-Time Balance Calculation
Current Balance = Previous Balance + Income - Expenses
Updated atomically via database triggers on every transaction.
2. Monthly Summary Metrics
- Total Income (sum of all income transactions)
- Total Expenses (sum of all expense transactions)
- Net Balance (income minus expenses)
- Business Expenses percentage
- Personal Expenses percentage
3. Currency Conversion
Amount in PLN = Amount × Exchange Rate
All transactions normalized to PLN for consistent reporting.
4. Deficit Analysis
Automatic calculation of required funds to reach break-even:
Required Funds = |Negative Balance|
Integration Capabilities
Current Integrations:
- Twilio WhatsApp Business API
- Webhook-based message receiving
- Automated message sending
- Sandbox and production modes
- Supabase Cloud Database
- Real-time data synchronization
- Automatic backups
- Database triggers and functions
- Railway Deployment Platform
- Environment variable management
- Automatic scaling
- SSL certificates
Future Integration Potential:
- Bank API connections (Open Banking)
- Accounting software sync (QuickBooks, Xero)
- Invoice generation systems
- Payment gateway integration (Stripe, PayPal)
- Email notifications (SendGrid)
- Slack/Microsoft Teams notifications
Performance & Scalability
- Sub-second API response times via indexed database queries
- Optimized SQL queries with proper indexing on foreign keys
- Efficient React rendering with key-based list rendering
- Code splitting for faster initial page load
- Production build optimization (minification, tree-shaking)
- CDN-ready static asset deployment
Business Benefits
- Time Savings: Reduce transaction entry time by 80% via WhatsApp
- Real-Time Visibility: Instant balance updates, no manual calculation
- Mobile Accessibility: Manage finances from any device, anywhere
- Multi-Currency Support: Handle international transactions seamlessly
- Audit Trail: Complete transaction history with timestamps
- Expense Insights: Category-based spending analysis
- Error Reduction: Automated calculations eliminate human error
This cashflow management system is built with modern TypeScript and React for a seamless user experience. The automated accounting software features WhatsApp integration for hands-free financial tracking. Perfect for small business expense management, this real-time budget tracker offers multi-currency support and automated balance calculation. The PostgreSQL database ensures data integrity while Twilio API integration enables conversational transaction entry. Deploy this cloud-based financial dashboard on Railway with Supabase backend for scalable business analytics.
