A mobile application for managing investment portfolios with real-time stock tracking, risk analysis, dividend forecasting, and biometric authentication.
Cashflow is a full-stack investment portfolio management app built with React Native (Expo) and FastAPI. It allows users to track their stock portfolios, analyze risk, forecast dividend income, and manage cash balances across multiple portfolio types. The app features biometric authentication, real-time price updates, and comprehensive financial analytics.
- Node.js 18+ and npm
- Python 3.10+
- Neon PostgreSQL account
- Supabase account (for authentication)
1. Backend Setup
cd backend
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
# Create .env file with DATABASE_URL, SUPABASE_URL, SUPABASE_ANON_KEY2. Mobile App Setup
cd mobile
npm install
# Create .env file with EXPO_PUBLIC_SUPABASE_URL, EXPO_PUBLIC_SUPABASE_ANON_KEY3. Start the App
For home WiFi:
./home.sh # Terminal 1: Start backend
cd mobile && npx expo start # Terminal 2: Start mobile appFor school WiFi:
./school.sh # Terminal 1: Start backend
cd mobile && npx expo start # Terminal 2: Start mobile appNote: Update mobile/src/services/api.ts with your current IP address when switching networks.
- Portfolio Management - Create and manage multiple portfolios (Individual & Retirement)
- Stock Trading - Buy and sell stocks with real-time price calculations
- Risk Analysis - Comprehensive risk assessment with volatility, beta, Sharpe ratio, and VaR
- Dividend Forecasting - Project future dividend income with multiple growth scenarios
- Dividend Calendar - View upcoming dividend payments organized by month
- Biometric Auth - FaceID/TouchID support for secure login
- Cash Management - Add/withdraw cash from portfolios
Frontend: React Native (Expo), TypeScript, React Navigation, Supabase Auth
Backend: FastAPI, SQLModel, PostgreSQL (Neon), Polygon.io API
Infrastructure: Neon PostgreSQL, Supabase (auth only)
cashflow/
├── backend/ # FastAPI backend
│ ├── app/
│ │ ├── routers/ # API endpoints
│ │ ├── services/ # Business logic
│ │ └── models.py # Database models
│ └── start_backend.sh
│
├── mobile/ # React Native app
│ ├── src/
│ │ ├── screens/ # App screens
│ │ ├── services/ # API & Supabase clients
│ │ └── navigation/
│ └── package.json
│
├── home.sh # Start backend (home WiFi)
└── school.sh # Start backend (school WiFi)
iOS:
cd mobile
npx expo run:iosAndroid:
cd mobile
npx expo run:androidExpo Go (Quick Testing):
cd mobile
npx expo start
# Scan QR code with Expo Go appThe mobile app needs your Mac's IP address to connect to the backend:
- Android Emulator: Uses
http://10.0.2.2:8000automatically - iOS Simulator: Uses
http://localhost:8000automatically - Physical Devices: Update IP in
mobile/src/services/api.ts
Find your IP:
ifconfig | grep "inet " | grep -v 127.0.0.1 | head -1 | awk '{print $2}'Backend (.env):
DATABASE_URL=your_neon_postgresql_url
SUPABASE_URL=your_supabase_url
SUPABASE_ANON_KEY=your_supabase_anon_key
POLYGON_API_KEY=your_polygon_key (optional)
Mobile (.env):
EXPO_PUBLIC_SUPABASE_URL=your_supabase_url
EXPO_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
EXPO_PUBLIC_API_BASE_URL=http://localhost:8000
Backend won't start:
- Check virtual environment is activated
- Verify
.envfile exists with correct values - Check port 8000 is available:
lsof -i :8000
Mobile app can't connect:
- Ensure backend is running:
curl http://localhost:8000/health - Update IP address in
mobile/src/services/api.tsfor physical devices - Ensure devices are on the same network
FaceID not working:
- Requires development build (
npx expo run:ios) - doesn't work in Expo Go - Check device has FaceID/TouchID enabled
This project is part of a capstone project.
Nathaniel Issac