AI-powered personal investment portfolio manager for Indian markets.
- 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
- Backend: Hono + Node.js, Drizzle ORM + PostgreSQL 17
- Frontend: React 19 + Vite + Ant Design 5 + Ant Design Charts
- Broker integration: MCP SDK for Zerodha and Groww
- LLM routing: OpenAI SDK via OpenRouter
- Validation: Zod (shared schemas across stack)
- Tooling: pnpm workspaces, Turborepo, Biome
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
- Node.js >= 20
- pnpm >= 10
- Docker (for PostgreSQL)
- Zerodha account (for MF + stocks + gold/silver data)
- Groww account (optional, for additional stock holdings)
# 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| 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 |
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.
MIT - AppGambitStudio