Skip to content

nirravv/ForeCone

Repository files navigation

Forecone

Know any stock cold.

Open-source stock research with an interactive bull / base / bear valuation workbench — a price target for every year, not just the finish line — plus a Capital Flow map that traces where the giants spend their money and which public companies get paid.

Fundamentals, forward analyst estimates, a transparent fair-value model, a screener, side-by-side comparison, and a watchlist — the research that used to take a dozen browser tabs, on one screen.

▶ Live demo · Report a bug · Request a feature

License: MIT  Next.js  React  TypeScript

Note

The live demo is a product showcase running on fixed sample data — the figures are a captured snapshot, not live, and not investment advice. Run it locally (below) or deploy the live app to get real-time data with your own free API key.


Screenshots

Home

🌊 Capital Flow — follow the money 📈 Stock deep-dive
Capital Flow Stock page
🔎 Screener ⚔️ Compare
Screener Compare

The demo runs on captured sample data; the live app fetches real-time figures.


Why Forecone

Most tools either dump raw financials on you or hide their valuation behind a black box. Forecone is built around two ideas:

  1. A price target for every year. Instead of one DCF number, you get an interactive workbench: set growth, margins, and exit multiples for bull / base / bear cases and watch the per-year price path and probability-weighted target update live. You see what's priced in, not just a verdict.
  2. Follow the money. When a giant ramps spending, someone gets paid. Capital Flow maps each company's capex / R&D / buybacks out to the public companies that benefit — an animated map for generating ideas you won't find on a standard terminal.

Features

🌊 Capital Flow (the flagship)

A "follow the money" capital-flow map. For each covered company, see where its cash goes (capex, R&D, buybacks, dividends) and the public tickers that benefit, each with a relationship note and a source tag (filing / curated / news). An animated, UniFi-style particle map flows from the source company out to its suppliers and partners.

  • /flow/compare overlays several companies to surface the common bets — the names fed by all of them (e.g. the chip and foundry suppliers behind every hyperscaler).
  • Spend figures and fiscal year auto-update from live filings in the running app; the supplier relationships are hand-curated for depth on the trades people actually care about, and are community-extendable via a single entry in lib/flow.ts.

📈 Stock deep-dive

A decade-deep (where available) view per ticker: price chart with intraday, company profile, key stats, a quarter/annual financials table, and charts for revenue, EPS, margins and free cash flow — alongside forward analyst estimates, price targets and the analyst ratings spread. Plus deep-info panels: earnings history, ownership, dividends, insider transactions, analyst actions, balance sheet, and a financial-health read (Piotroski F-Score, Altman Z-Score).

⚖️ Bull · base · bear valuation workbench

An interactive scenario model. Tune revenue growth, margins and exit multiples for three cases and get a price target for each forward year, a probability-weighted fair value, and a clear read on what the current price implies.

✨ Fair value & scorecard

A transparent, rules-based read on quality, value, growth and momentum — every input visible, no black box.

🔎 Screener

Filter the major US names by valuation, yield, growth, market cap and sector to surface ideas fast. The search bar opens any US-listed ticker, not just the screener set.

⚔️ Compare

Put up to six companies head-to-head; the best value in each metric is highlighted.

⭐ Watchlist

Track the names you care about. Stored locally on your device — no account required.


Conservative by design

The fair-value model uses a two-stage fade with mean-reversion of growth and multiples. It is deliberately conservative and will often flag richly-valued mega-caps as expensive — that's the model being honest, not a bug. The constants are tunable in lib/projection.ts. None of this is investment advice.


Tech stack

  • Next.js 16 (App Router, React 19, Server Components)
  • TypeScript, Tailwind CSS v4, shadcn/ui primitives
  • Recharts + lightweight-charts for visualization
  • TanStack Query for client data
  • Yahoo Finance (free, no key) as the default data source; Polygon.io optional as the primary feed
  • Drizzle ORM + Postgres for an optional persistent cache (falls back to in-memory)

Getting started

Forecone is bring-your-own-key and runs with no key at all out of the box (free Yahoo Finance fallback).

Tip

New to this? Follow the step-by-step Getting Started guide — it walks you through everything from installing Node.js to deploying your own copy, no prior experience assumed.

The short version (if you already have Node.js 20+):

# 1. Clone
git clone https://github.com/nirravv/ForeCone.git
cd ForeCone

# 2. Install
npm install

# 3. Configure (optional — works with no keys)
cp .env.example .env.local

# 4. Run
npm run dev

Open http://localhost:3000.

Configuration

Everything in .env.local is optional:

Variable What it does
POLYGON_API_KEY Makes Polygon the primary feed (live prices/charts). Free tier works. Without it, Yahoo serves everything (delayed).
DATA_PROVIDER polygon (default) or yahoo to force the keyless source.
DATABASE_URL Postgres connection string for a persistent cache. Optional — falls back to an in-memory cache.

Deployment (Vercel)

It's one codebase; an environment variable decides whether a deployment is the live app or the demo.

Live app — a normal Next.js deploy:

  1. Import the repo on Vercel.
  2. (Optional) set POLYGON_API_KEY for live prices/charts; without it, Yahoo serves everything.
  3. Deploy.

Demo dashboard — same repo, one extra env var:

  1. Set NEXT_PUBLIC_DEMO=1 in the project's environment variables.
  2. Deploy.

In demo mode the data layer reads the committed JSON fixtures in public/demo/ instead of any live feed, the stock and Capital-Flow pages are pre-rendered from those fixtures at build time, the dashboards read the JSON directly, and a banner makes clear it's a showcase on fixed sample data. No keys, no rate limits, nothing to break.

Refreshing the demo data

The fixtures are captured from a running instance (so they match the app's exact shapes):

npm run dev            # in one terminal (keyless Yahoo is fine)
npm run snapshot:demo  # in another — writes ~70 tickers to public/demo/**

Commit the updated public/demo/ and redeploy.


Project structure

app/                Next.js routes (home, stock, flow, screener, compare, watchlist, api)
components/          UI — charts, valuation workbench, flow canvas, stock panels
lib/
  providers/        Vendor-neutral data layer (Yahoo, Polygon) behind one interface
  stock-service.ts  The composite that combines + degrades gracefully
  flow.ts           Curated Capital Flow graph (extend me!)
  projection.ts     The bull/base/bear scenario + fair-value model
  demo/             Demo-mode fixtures plumbing
scripts/            snapshot-demo / build-demo

Contributing

Contributions are very welcome — especially Capital Flow data. Adding a company is a single entry in lib/flow.ts (its spend themes, beneficiaries, and a logo domain). PRs that extend coverage, fix relationships, or add sources are appreciated.


Disclaimer

Forecone is for informational and educational purposes only and is not investment advice. Data comes from third-party sources (Yahoo Finance, optionally Polygon) and may be delayed, incomplete, or inaccurate. The Capital Flow relationships are hand-curated for idea generation, not a complete or audited supply chain. Do your own research. Nothing here is a recommendation to buy or sell any security.


License

MIT © Forecone contributors

About

Open-source stock research app: bull/base/bear valuation, fundamentals, a screener, and a "follow the money" capital-flow map. Next.js · MIT.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors