Skip to main content

Local development

cd backend
python3 -m venv venv
source venv/bin/activate   # Windows: venv\Scripts\activate
pip install -r requirements.txt
cp .env.example .env
Edit backend/.env:
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_SERVICE_KEY=your-service-role-key
ANTHROPIC_API_KEY=sk-ant-...
# GOOGLE_APPLICATION_CREDENTIALS=/path/to/firebase-service-account.json  # optional, for FCM
Start the server:
uvicorn main:app --reload --port 8000
Available endpoints after startup:
EndpointPurpose
GET /healthHealth check
POST /ai/askAI advisor (SSE streaming)
GET /market/priceLive stock/crypto prices
POST /rag/ingest?user_id=...Manually trigger RAG ingestion
GET /transactions/Transaction CRUD
GET /holdings/Holdings CRUD
GET /accounts/Accounts CRUD

RAG ingestion

The backend runs APScheduler cron jobs to embed your financial data for the AI memory:
ScheduleWhat runs
Daily at 2 AMYesterday’s spending summary
Sunday at 3 AMWeekly pattern summary
1st of month at 4 AMMonthly review
For local development, trigger ingestion manually:
curl -X POST "http://localhost:8000/rag/ingest?user_id=your-user-id"
The embedding server (Docker) must be running for RAG ingestion to work. See Docker setup.