Skip to content

AppGambitStudio/AiMoney

Repository files navigation

AIMoney

AI-powered personal investment portfolio manager for Indian markets.

Features

  • Multi-broker aggregation — Zerodha (MF + stocks + gold/silver) and Groww (stocks) via MCP SDK
  • Unified dashboard — consolidated view across all brokers with real-time LTP refresh
  • Portfolio drift detection — compare actual vs target allocation with configurable thresholds
  • Hybrid rebalancing — prioritizes new money deployment, sells only when drift exceeds critical threshold
  • Goal tracking — link investment goals to portfolio targets
  • News feed & analysis — RSS aggregation with LLM-powered sentiment analysis
  • XIRR calculation — time-weighted returns for each holding
  • Interactive charts — allocation pie, drift bar, historical performance via Ant Design Charts
  • Investor profile — risk tolerance, time horizon, and allocation preferences

Tech Stack

Project Structure

aimoney/
├── packages/
│   ├── shared/        # @aimoney/shared — Zod schemas, types, constants
│   ├── backend/       # @aimoney/backend — Hono API, Drizzle, MCP/LLM services
│   └── frontend/      # @aimoney/frontend — Vite + React dashboard
├── docker-compose.yml # PostgreSQL 17 + pgAdmin
├── turbo.json
└── biome.json

Prerequisites

  • Node.js >= 20
  • pnpm >= 10
  • Docker (for PostgreSQL)
  • Zerodha account (for MF + stocks + gold/silver data)
  • Groww account (optional, for additional stock holdings)

Quick Start

# Clone
git clone https://github.com/AppGambitStudio/aimoney.git
cd aimoney

# Install dependencies
pnpm install

# Start PostgreSQL + pgAdmin
cp .env.example .env    # edit with your API keys
docker compose up -d

# Run database migrations
pnpm db:migrate

# Start dev servers (backend :3001 + frontend :5173)
pnpm dev

Environment Variables

Variable Description Required
DATABASE_URL PostgreSQL connection string Yes
POSTGRES_PASSWORD Password for Docker PostgreSQL Yes
OPENROUTER_API_KEY OpenRouter API key for LLM analysis No
OPENROUTER_MODEL LLM model ID (default: moonshotai/kimi-k2.5) No
ALPHA_VANTAGE_API_KEY Alpha Vantage key for market news No
PORT Backend server port (default: 3001) No
NODE_ENV Environment (development / production) No
VITE_API_URL Backend URL for frontend proxy (default: http://localhost:3001) No

Broker Integration

Zerodha — Session-based auth via MCP. Sessions expire daily around 6 AM IST and require re-authentication through the Kite login flow.

Groww — OAuth 2.0 + PKCE via MCP SDK. Token is cached locally and refreshed automatically.

License

MIT - AppGambitStudio

About

AI-powered personal investment portfolio manager for Indian markets

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors