Documentation Index
Fetch the complete documentation index at: https://mintlify.com/georgejohnsonoff-business/spendwiselygeorge/llms.txt
Use this file to discover all available pages before exploring further.
Overview
SpendWisely George integrates with Fold Money to provide real-time bank account aggregation and transaction synchronization. Fold Money uses India’s Account Aggregator framework to securely fetch transactions from connected bank accounts.Authentication
The integration uses OTP-based authentication via the Fold Money API.Login Flow
Request OTP
Send an OTP to the user’s registered phone number:
Phone numbers are automatically formatted with
+91 prefix if not provided.API Endpoints
Check Login Status
Login Request
Verify OTP
Transaction Synchronization
Transactions are fetched using the Unfold CLI binary and stored in a local SQLite database.Sync Process
Fetch Transactions
Database Schema
Transactions are stored inunfold/db.sqlite:
Unfold CLI
SpendWisely George uses the Unfold CLI binary for Fold Money integration.Configuration
- Binary Path:
./unfold/unfold - Config File:
./unfold_config.yaml - Database:
./unfold/db.sqlite
Common Commands
Security Considerations
- Tokens are stored locally in
unfold_config.yaml - API is unofficial and reverse-engineered from the Fold mobile app
- Use at your own risk - unforeseen consequences may occur
Rate Limits
The Fold Money API does not publicly document rate limits. Based on usage:- OTP Requests: Limited to prevent abuse
- Transaction Fetches: Recommended to sync at most once every 20 seconds
- Token Expiry: Refresh tokens periodically using
unfold refresh
Error Handling
Frontend Integration
The UI provides a complete login flow:
Implementation: index.html:588-631
Troubleshooting
”Not logged in” Error
- Check if
unfold_config.yamlexists - Verify token validity:
unfold user - Re-authenticate using
/api/fold/login
No Transactions Found
- Ensure banks are connected in Fold mobile app first
- Check database exists:
ls unfold/db.sqlite - Run manual sync:
POST /api/sync
Sync Failed
- Verify Unfold binary is executable:
chmod +x unfold/unfold - Check config file path matches
UNFOLD_CONFIGconstant - Ensure you’re logged in:
GET /api/fold/status