Inspiration When I first started investing, I had no idea what to buy. I didn't understand what any of the terms meant — cost basis, diversification, sector allocation, concentration risk. I didn't know how to go from "I want to grow my money" to "here is what I should research." Most investing apps assume you already know what you're doing. I built PortfolioAI for people who don't.
What it does PortfolioAI is a beginner investment guardrail powered by Gemini 2.5, Google ADK, and MongoDB. It helps users who are starting from zero figure out what to research, enforce personal investment rules, and understand the consequences of a trade before they make it.
Key features:
AI agent — ask questions in plain English, get beginner-friendly answers backed by live market data Risk profile quiz — 4 questions that identify your investor profile and suggest what to research first Goal planner — compound interest calculator for house, retirement, emergency fund, and other goals Pre-trade preview — simulate a trade and see how it affects your diversification score and rules before committing Portfolio rules — set personal guardrails like "no sector above 45%" and the agent enforces them automatically Market radar — groups research ideas into momentum, steady core, and speculative themes MongoDB memory — holdings, watchlist, rules, and snapshots persist across sessions via Atlas How I built it Flask backend, HTML/CSS/JavaScript frontend, deployed on Google Cloud Run. Gemini 2.5 Flash runs through Vertex AI and Google ADK. MongoDB Atlas stores all persistent state. The agent connects to MongoDB through the MongoDB MCP server, giving it direct database access as a tool.
Challenges I ran into Making market data reliable on Cloud Run was harder than expected — Yahoo Finance and yfinance both rate-limit Cloud Run IPs, so I built a multi-source fallback chain with in-process caching. MongoDB Atlas required careful TLS configuration on Cloud Run's OpenSSL 3.x environment. Getting the agent to enforce portfolio rules consistently — not just respond but actually act — took significant prompt engineering and tool design.
What I learned A good agent needs more than a model. It needs persistent memory, clear tools, guardrails, and a workflow that makes sense to a real user. I also learned that the hardest part of building for beginners is removing things — every piece of jargon you strip out makes the product better.
What's next User authentication, brokerage API integration for real trade execution, mobile app, and deeper personalisation based on a user's goals and risk profile.
Log in or sign up for Devpost to join the conversation.