StockStash: Building a Stock Tracker for the Way I Actually Invest
I invest in Indian stocks. The tools available are mostly either full-fledged trading platforms (too much) or spreadsheets (too manual). I wanted something in between: a clean watchlist with target prices, alerts when stocks enter my buying zone, and a way to track my monthly investment budget.
So I built StockStash.
How It Started
The first version was a React Native app built with Rork, an AI-assisted mobile development tool. I described what I wanted, Rork scaffolded the Expo project, and I built APKs and sideloaded them onto my Android phone.
That lasted until I hit a data corruption issue I couldn't trace. Something was writing bad state silently. I added Firebase to get a proper backend, but the tradeoff was painful — every change meant a full APK build, sideloading, and testing from scratch. The feedback loop was too long for iteration.
I moved to a PWA. Same stack, different delivery — a browser-based app that installs on the home screen without the build cycle. The feedback loop collapsed from minutes to seconds. I should have started there.
The backend was still JavaScript at this point, using an npm package that wrapped Yahoo Finance. It worked, but the prices were unreliable — not obviously wrong, just subtly off in ways I noticed when I cross-checked against on Groww or Google. Wrong enough to distrust. I rewrote the backend in Python using yfinance directly, which is the most widely maintained implementation and gives consistent, accurate data.
That's the version that hit Render. And Render is where things got interesting.
The Rate Limit Problem
Render's shared IPs are flagged by commercial APIs. Yahoo Finance is particularly aggressive — the rate limiting isn't gradual, it just stops responding. I tried a few things. Nothing held.
The fix came from reading about other people with the same problem: residential IPs don't get blocked. I already had a home server (a 12-year-old Sony Vaio running Ubuntu, described in this post). I containerized the Python FastAPI backend with Docker and moved it there.
The requests stopped failing immediately.
There's something satisfying about a problem that has a clean, obvious solution once you know where to look. The infrastructure overhead — Docker, Cloudflare Tunnel, cron jobs — was worth it for reliability I couldn't buy on a free tier.
The Wishlist
The core of the app is simple: add a stock, set a target price, and get notified when the price drops to that level. The NSE/BSE ecosystem doesn't make this trivial — ticker symbols require the .NS or .BO suffix depending on exchange, and Yahoo Finance is inconsistent about which one it recognizes for a given stock. The backend tries .NS first and falls back to .BO automatically. It's invisible to the user but would have been a constant source of silent failures without it.
The wishlist shows current price, change percentage, and how close each stock is to the target. The sort options reflect how I actually use the list: by target reach status (are any in the buying zone right now?), by price change today, or by when I added them.
The Budget Tracker
This is the part of the app I'm most attached to.
The idea: set a monthly investment budget, and have the app tell me how much I can spend each day. Not split evenly — split across trading days only. The NSE doesn't trade on weekends or public holidays, so a month with 22 trading days splits differently than one with 18.
The backend calculates trading days by checking whether the market actually traded on a given date (via Yahoo Finance data) and falls back to weekdays minus a hardcoded holiday list. The budget tracker shows what's left in the budget, the effective daily limit (remaining ÷ remaining trading days), and a log of purchases.
If I go over one day, the system doesn't break — it tracks the overage and adjusts the daily recommendation forward. Carryforward surpluses from previous months roll over with a timestamped audit trail.
Alerts
The app sends a morning email alert at 9:30 AM IST — just before the market opens. The email shows any stocks currently in the buying zone, the three stocks closest to their targets, and a budget snapshot with the day's effective limit.
The email format matters more than I expected. The first version was a plain text list. The revised version has color-coded sections — green for buying zone, blue for close-to-target — which makes it scannable in the two seconds I actually spend reading it while the market opens.
What It Runs On
Frontend is on Netlify. Backend runs on the Vaio, containerized, served via Cloudflare Tunnel. The navigation bar shows a real-time indicator of whether the home server is reachable — if the Vaio goes down, the dot turns red within seconds.
The app is live at stockstash.netlify.app. A residential IP and an old laptop. It's enough.
Note
None of the images are financial advise. Don't end up like me.