Overview
Running SpendWisely George locally enables all features including bank sync, mutual fund tracking, and settings persistence. This setup runs both the FastAPI backend and serves the frontend.All features work locally: Bank sync, mutual funds, settings, and manual expense tracking.
Prerequisites
Python 3.8+
Required for FastAPI server
Unfold CLI
Pre-built binary included in
unfold/ directoryFold Account
Invite-only banking aggregator service
Google Sheet
Optional, for manual expense tracking
Installation
Install Python Dependencies
fastapi- Web frameworkuvicorn- ASGI serverpyyaml- Config file handlingrequests- HTTP client for API calls
Verify Unfold Binary
The repository includes a pre-built Unfold CLI binary:If missing, build from source:
Configuration
Server Configuration
The server (server.py:16-20) uses these default paths:
Environment Variables
All configuration is file-based. The only environment variable is:
Running the Server
Access the Application
Open your browser:The frontend (
index.html) is served via FastAPI’s StaticFiles (server.py:237).Unfold CLI Setup
Login via Web Interface
The easiest method is through the app UI:Enter Phone Number
Click “Login to Fold” and enter your registered phone number (automatically prefixed with +91).
Manual Login via CLI
Alternatively, use the Unfold CLI directly:Syncing Transactions
- Via Web UI
- Manual Sync
- Automated Sync
Click the Sync button in the Transactions section.This calls
/api/sync (server.py:190-198), which runs:Mutual Fund Portfolio
The portfolio feature fetches NAV data from the public MFAPI service.Add Holdings
In the web app, go to Portfolio → Add Holding:
- Scheme Code: AMFI scheme code (e.g.,
120503for HDFC Top 100) - Units: Number of units you own
API Endpoints Reference
Authentication
Transactions
Portfolio
Troubleshooting
ModuleNotFoundError: No module named 'yaml'
ModuleNotFoundError: No module named 'yaml'
Cause: Missing
pyyaml dependencySolution:Unfold binary not found or permission denied
Unfold binary not found or permission denied
Cause: Binary missing or not executableSolution:If still failing, rebuild:
Database file not created after sync
Database file not created after sync
Cause: Unfold CLI requires
--db flagSolution:CORS errors when accessing from different port
CORS errors when accessing from different port
Cause: Frontend served from different originSolution: The server allows all origins (server.py:23-28). If still blocked, ensure you’re using
http://localhost:8000 directly, not a different port.Mutual fund API returns no data
Mutual fund API returns no data
Cause: Invalid scheme code or API downtimeSolution:
- Verify scheme code at https://www.amfiindia.com/
- Test API directly:
File Structure
After setup, your directory should look like:Next Steps
Google Sheets Integration
Add manual expense tracking
Cloud Deployment
Deploy to production on cloud platforms