Project 13
Investment Home
A private portfolio tracker that turns my investing rules into a daily routine, a weekly valuation schedule and automatic framework checks.
Who uses it
Me, as a single user behind a login. I open it once a day for the checklist and once a week for that week's company valuation, on whichever device I have.
Why it was built
My investing framework lived in a spreadsheet workbook and a checklist PDF, which made it easy to skip steps or act on one day's move. I wanted the rules enforced by the tool itself: the checklist walks me through each step, the checks flag drift from target weights, and a company only earns a place after a full valuation passes a fixed gate.
What it does
The Today view shows value, money in, gain, return and today's move, then a guided eight step daily checklist with the inputs for each step inline, followed by five framework checks such as index weight within five points of target and every holding with a finished valuation. The Universe tab ranks 40 researched companies; changing a rank reorders the list and ticking In portfolio makes a company a holding. Trades logs planned and filled buys and sells, the Daily Log charts account value against money deposited, and Settings holds the target return, drift limit, backup and restore. The weekly DCF section schedules one company a week in rank order, tracks a nine step valuation, scores it against twelve pass or fail tests, accepts a pasted JSON block from my AI analysis prompt, and proposes position sizes from expected return and volatility within a floor and cap.
What it serves
It exists to make rule based investing the path of least resistance, so the daily and weekly work happens the same way every time and decisions come from the framework, not the day's price move. Success is that the checklist gets done, the framework checks stay green, and no company is held without a finished valuation behind it.
Under the hood
Next.js 14 App Router with React 18 and TypeScript, with no other runtime dependencies. Two API routes do the server work: /api/quotes fetches Finnhub quotes in batches of ten with a five minute revalidate, and /api/state reads and writes the whole app state as one JSON document in Upstash Redis over its REST API. Middleware puts HTTP Basic auth in front of every route when the login env vars are set. The client keeps state in React, saves to localStorage on every change and debounces a cloud save by 700 ms, and a versioned migrate function upgrades older saved data one version at a time. It deploys on Vercel, and a small shell script checks the live site returns 401 without credentials, 200 with them, and real quotes and state.
Flow
- Login
- Load state from Redis or browser
- Live quotes every 5 minutes
- Daily checklist
- Framework checks
- Weekly DCF gate
Built with
- Next.js 14
- React 18
- TypeScript
- Vercel
- Upstash Redis
- Finnhub API
- HTTP Basic auth middleware
- localStorage
How I built it
- I modeled the app on my existing workbook: universe, portfolio, trade log, daily log, checklist and framework checks, with typed Company, Trade and AppState shapes in a small core library.
- I shipped the first version with live quotes, optional login and optional cloud sync, each one degrading cleanly when its env vars are missing so the app still runs on typed prices in one browser.
- I rebuilt the daily checklist to match my checklist PDF step for step, with each step opening in turn, showing its own inputs and leaving a one line record of what was done.
- I updated the seed data to the real opening trades and wrote a versioned migration so data already saved on my devices was brought forward instead of reset.
- I added the weekly DCF section: a fixed schedule for the first five weeks then one company a week by rank, the nine step valuation, the twelve test gate, the JSON import from my analysis prompt, and proposed position sizing.
- I wrote a verification script that checks the deployed site end to end, reading credentials privately and never printing them.
Key decisions
- I kept dependencies to Next, React and TypeScript only. The chart, inputs and Redis calls are hand written, which keeps the app small and easy to reason about.
- The entire state is one JSON document under one Redis key. For a single user app this avoids a schema and makes backup and restore a single file download.
- Every integration is optional. Without a Finnhub key it uses saved prices, without Redis it saves in the browser, and the UI says which mode it is in so a failed save never loses work.
- The valuation gate is strict by design: all twelve tests must pass for YES, and a blank test counts as a fail once the valuation is finalized.
- Position sizing scales weights by score with a bisection search that respects a floor and a cap, sends anything it cannot place to the index fund, and writes nothing until I apply the proposal.
- Saved data carries a version number and migrate runs one step at a time, so changes to the data model never wipe what is already stored.
