- An open-source stock market dashboard built with Next.js 15 + MongoDB + Finnhub + TradingView widgets, licensed under AGPL-3.0 and forever free.
- Core features: Better Auth login, personal watchlist, Cmd+K global search, TradingView charts, and AI-personalized email.
- Self-hosting requires Node 20+, MongoDB, and a Finnhub API key; real-time quotes may require a paid Finnhub plan — it's not a brokerage and has no trading functionality.
Table of Contents
Paid market terminals (commercial platforms like Bloomberg) lock real-time quotes, company data, and market news behind a subscription wall. OpenStock proposes a different path: an open-source, self-hostable, forever-free stock market dashboard that, in its own words, is “built openly, for everyone, forever free.”
The project is maintained by Open Dev Society and licensed under AGPL-3.0 — which means that if you modify, redistribute, or deploy it as a network service, you must release the source code under the same license and credit the original authors. The README also spells it out plainly: OpenStock is not a brokerage, market data may be delayed depending on provider rules and your configuration, and nothing on the site constitutes investment advice.
What Kind of Project This Is
Open Dev Society includes a Manifesto in the README, whose core belief is that “technology should belong to everyone, knowledge should be open, free, and accessible, and communities should welcome newcomers with trust rather than gatekeeping.” Their commitment: don’t lock away knowledge, don’t charge for access, and operate on transparency and donations rather than profit.
In other words, OpenStock’s character is defined less by its tech stack than by this stance of “refusing commercialization and welcoming beginner contributions.”
Technical Architecture
graph LR
User["User"] --> Next["Next.js 15 App Router / React 19"]
Next --> Auth["Better Auth + MongoDB adapter"]
Next --> Mongo["MongoDB / Mongoose"]
Next --> Finnhub["Finnhub API prices・company data・news"]
Next --> TV["TradingView widgets candlesticks・heatmap"]
Next --> Inngest["Inngest events / cron / AI"]
Inngest --> Gemini["Gemini personalized email"]
Inngest --> Mail["Nodemailer / Gmail"]
Core layer: Next.js 15 (App Router), React 19, TypeScript, with styling handled by Tailwind CSS v4 (via @tailwindcss/postcss) paired with shadcn/ui and Radix UI primitives, and Lucide for icons. The repo’s language composition is roughly TypeScript 93.4%, CSS 6%, JavaScript 0.6% — essentially a pure-TypeScript frontend and backend.
Auth and data layer: Better Auth provides email/password login, paired with a MongoDB adapter; data persistence uses MongoDB + Mongoose. Market data comes from the Finnhub API (symbols, company profiles, market news), while charts are embedded directly via TradingView widgets.
Automation and communication layer: Inngest handles events, cron scheduling, and AI inference; Nodemailer sends email through a Gmail transport; and next-themes, cmdk (command palette), and react-hook-form are also in the mix.
Features
- Auth: email/password login via Better Auth + MongoDB adapter, with protected routes enforced by Next.js middleware.
- Global search and Cmd + K palette: Finnhub-backed stock search that shows popular stocks when idle and debounces queries.
- Watchlist: a per-user watchlist stored in MongoDB (unique symbols per user).
- Individual stock detail: TradingView’s symbol info, candlestick/advanced charts, baseline, technical indicators, plus company profile and financials widgets; with optional cross-source sentiment insights covering Reddit, X.com, news, and the Polymarket prediction market.
- Market overview: heatmap, quotes, and top stories, likewise rendered with TradingView widgets.
- Personalized onboarding: collects country, investment goals, risk tolerance, and preferred sectors.
- Email and automation: AI-personalized welcome emails generated with Gemini via Inngest, plus a cron job that sends daily news digest emails based on each user’s watchlist.
- Interface: shadcn/ui + Radix + Tailwind v4 design tokens, dark theme by default; Cmd/Ctrl + K for quick actions.
Notably, the AI provider is swappable: it defaults to gemini but also supports minimax and siray, switchable via the AI_PROVIDER environment variable, avoiding lock-in to a single vendor. Sentiment analysis is an optional integration requiring ADANOS_API_KEY — not a core dependency.
Self-Hosting and Setup
Prerequisites: Node.js 20+ with pnpm or npm, a MongoDB connection string (MongoDB Atlas or local Docker), a Finnhub API key (the free tier is supported, but real-time data may require a paid plan), a Gmail account for sending email, and an optional Gemini API key.
The basic flow is clone → pnpm install → create .env → pnpm test:db to verify the database connection → pnpm dev (Next.js dev runs on Turbopack). To exercise workflows, cron, and AI, additionally start Inngest locally with npx inngest-cli@latest dev. For production, it’s pnpm build && pnpm start, defaulting to http://localhost:3000.
You can also bring up the app and MongoDB together directly with Docker Compose:
docker compose up -d mongodb && docker compose up -d --build
The compose file contains two services — openstock (the app) and mongodb (mongo:7, with a persistent volume and healthcheck). In this case the MongoDB connection string uses the host on the Docker network:
MONGODB_URI=mongodb://root:example@mongodb:27017/openstock?authSource=admin
As for environment variables, beyond MONGODB_URI, you also need BETTER_AUTH_SECRET/BETTER_AUTH_URL, NEXT_PUBLIC_FINNHUB_API_KEY (required when deploying to Vercel), and FINNHUB_BASE_URL. To use AI and email, there’s also GEMINI_API_KEY, INNGEST_SIGNING_KEY (required for Vercel deployment), and NODEMAILER_EMAIL/NODEMAILER_PASSWORD (Gmail is best paired with an App Password). ADANOS_API_KEY and MINIMAX_API_KEY are optional.
Positioning and Limitations
Two limitations are worth thinking through up front:
First, data latency. Stock market data doesn’t come from OpenStock’s own database but from the upstream Finnhub. The free tier is typically delayed data, and real-time quotes may require upgrading to a paid plan; actual latency depends on the provider’s terms and your configuration.
Second, it’s not a trading platform. OpenStock has no order placement and no brokerage functionality; the README clearly positions it as a market-intelligence tool, and the content on the site is not investment advice.
Given those two premises, OpenStock is a fairly complete starting point for retail investors, students, or engineers who want to build on a free, fully controllable foundation — and because it’s AGPL-3.0, any public deployment you build on top of it must give back to the community just as openly.
References
Answers come from this article only. Click any prompt below or open the chat at the bottom right.
🇺🇸 English
Imagine you want real-time stock quotes, company financials, and market news — but every serious tool for that, Bloomberg being the poster child, hides all of it behind a subscription wall that costs a fortune. OpenStock asks a different question: what if that dashboard were open-source, self-hostable, and free forever? Its own tagline says it best — "built openly, for everyone, forever free."
It's maintained by a group called Open Dev Society, and it's released under the AGPL-3.0 license. Now, that license choice matters, so let me unpack it. AGPL basically says: if you modify this, redistribute it, or even just deploy it as a network service that other people use, you have to release your source code under the same license and credit the original authors. There's no taking it private. And the project is upfront about what it is and isn't — it's not a brokerage, the market data can be delayed depending on your provider and setup, and nothing on the site counts as investment advice.
Here's the thing that really defines this project, though. It's not the tech stack — it's the attitude. Open Dev Society ships a manifesto right there in the README, and the core belief is that technology should belong to everyone, knowledge should be open and accessible, and communities should welcome newcomers with trust instead of gatekeeping. Their commitment is to not lock knowledge away, not charge for access, and run on transparency and donations rather than profit. So when you look at OpenStock, understand it less as "here's a clever piece of software" and more as "here's a stance — refuse commercialization, welcome beginner contributions."
Now let's talk about how it's actually built.
At the core, it's Next.js 15 with the App Router, React 19, and TypeScript. Styling is Tailwind CSS version 4, paired with shadcn/ui and Radix primitives, and Lucide for icons. And when I tell you it's a TypeScript project, I mean it — the codebase is roughly ninety-three percent TypeScript, six percent CSS, and a sliver of JavaScript. Essentially pure TypeScript, front to back.
For authentication and data: login is email and password, handled by a library called Better Auth, wired to a MongoDB adapter. The data itself lives in MongoDB, accessed through Mongoose. The actual market data — stock symbols, company profiles, market news — all comes in from the Finnhub API. And the charts? Those are TradingView widgets embedded directly into the page, so you're not reinventing candlestick charts from scratch.
Then there's an automation layer. A tool called Inngest handles background events, cron scheduling, and AI inference. Nodemailer sends email through Gmail. So picture the whole flow: a user hits the Next.js app, which talks to Better Auth for login, MongoDB for storage, Finnhub for prices and news, TradingView for charts — and separately, Inngest fires off scheduled jobs that call an AI model like Gemini to write personalized emails and then send them out through Nodemailer.
So what can it actually do?
You get email-password login with protected routes enforced by Next.js middleware. There's a global search with a Command-K palette — that quick launcher you hit with Cmd or Ctrl plus K — backed by Finnhub, showing popular stocks when it's idle and debouncing your queries as you type. Every user gets a personal watchlist stored in MongoDB, with unique symbols per user.
Drill into a single stock and you get the full TradingView treatment: symbol info, candlestick and advanced charts, baseline views, technical indicators, plus company profile and financials. And optionally — this is a nice touch — cross-source sentiment, pulling from Reddit, X, news, and even the Polymarket prediction market. There's a market overview page too, with a heatmap, quotes, and top stories.
On the personalization side, onboarding asks about your country, your investment goals, your risk tolerance, and the sectors you care about. Then the automation kicks in: an AI-generated welcome email written by Gemini through Inngest, plus a daily cron job that emails you a news digest based on your specific watchlist. The whole interface runs dark theme by default.
Two things worth calling out here. First, the AI provider is swappable — it defaults to Gemini, but you can switch to alternatives called minimax or siray just by changing one environment variable, so you're not locked into a single vendor. Second, that sentiment analysis feature is optional; it needs a separate API key and isn't a core dependency, so the app works fine without it.
If you want to run it yourself, here's the shape of it. You'll need Node 20 or newer, a MongoDB connection — either MongoDB Atlas in the cloud or a local Docker container — a Finnhub API key, a Gmail account for sending mail, and optionally a Gemini key. The basic path is: clone the repo, install dependencies, create your environment file, run a quick database-connection test to make sure Mongo is reachable, and start the dev server. If you want the full workflows, cron jobs, and AI features, you also spin up Inngest locally with its CLI. For production, you build and start, and it defaults to localhost port 3000.
The easier route, honestly, is Docker Compose — it brings up two services together, the app itself and a MongoDB 7 container with a persistent volume and a healthcheck. One thing to watch: inside Docker, your MongoDB connection string points to the container's network hostname, not localhost. And on the environment-variable front, beyond the Mongo URI you'll set an auth secret and URL, your Finnhub key, and — if you want AI and email — a Gemini key, an Inngest signing key, and Gmail credentials. Pro tip on that last one: Gmail works best with an app-specific password rather than your real password.
Before you get too excited, two limitations you should sit with. One — data latency. The stock data doesn't live in OpenStock's own database; it's pulled live from Finnhub. On Finnhub's free tier, that data is typically delayed, and real-time quotes may mean paying for an upgrade. Two — and this is important — it is not a trading platform. There's no order placement, no brokerage function. It's a market-intelligence tool, full stop, and nothing on it is investment advice.
So let me leave you with the three things that matter most.
First, OpenStock is a genuinely complete, self-hostable market dashboard built on a modern stack — Next.js 15, MongoDB, Finnhub, TradingView — and it costs nothing to run.
Second, that AGPL license is the whole philosophy in legal form: you can build on it freely, but any public deployment you create has to give back to the community just as openly. That's a feature, not a restriction, if you buy into the mission.
And third, know what you're getting. This is intelligence, not execution — delayed data unless you pay upstream, and no trading whatsoever. But as a free, fully controllable foundation for a retail investor, a student, or an engineer who wants to build their own market tool, it's a remarkably solid place to start.
🇹🇼 中文
付費的市場終端機,像 Bloomberg 那類商業平台,把即時行情、公司資料跟市場新聞全鎖在訂閱牆後面。OpenStock 想走的是另一條路——一個開源、可以自己架設、而且永久免費的股市儀表板。用它自己的標語來說,就是「built openly, for everyone, forever free」,為所有人打造,永遠免費。
這個專案由 Open Dev Society 維護,採用 AGPL-3.0 授權。這個授權有個關鍵點:如果你修改它、再散布它,或是把它部署成一個網路服務,你就必須用同樣的授權把原始碼放出來,並且標註原作者。README 裡也把醜話講在前頭——OpenStock 不是券商,市場數據可能因為資料來源的規則跟你的設定而有延遲,站上任何內容都不構成投資建議。
先講講這是個怎樣的專案。Open Dev Society 在 README 放了一份宣言,核心信念是:技術應該屬於所有人,知識應該是開放、免費、可取得的;社群應該用信任來迎接新人,而不是用門檻把人擋在外面。他們的承諾是不把知識上鎖、不對存取收費、靠透明度跟捐款來運作,而不是靠利潤。所以某種程度上,OpenStock 的性格與其說是被技術棧定義的,不如說是被這份「拒絕商業化、歡迎初學者貢獻」的立場定義的。
接著看技術架構。整個資料流大概是這樣:使用者面對的是 Next.js 15 的 App Router 加上 React 19;往後走,登入交給 Better Auth 搭配 MongoDB adapter,資料則持久化在 MongoDB 加 Mongoose;市場數據來自 Finnhub API,包含股價、公司資料跟新聞;圖表直接嵌入 TradingView 的 widget,像 K 線圖跟熱力圖;然後自動化的部分交給 Inngest,負責事件、排程跟 AI 推論,AI 那端接 Gemini 做個人化 Email,寄信則走 Nodemailer 跟 Gmail。
技術棧細看,核心層是 Next.js 15、React 19、TypeScript,樣式用 Tailwind CSS v4 搭配 shadcn/ui 跟 Radix UI,圖示用 Lucide。整個 repo 幾乎是純 TypeScript,佔了九成三,剩下就是一點 CSS 跟 JavaScript。驗證跟資料層剛剛講過了,是 Better Auth 加 MongoDB。自動化跟通訊層則是 Inngest 加 Nodemailer,另外還用了 next-themes、cmdk 做命令面板,還有 react-hook-form。
功能面向蠻完整的。驗證是 email 加密碼登入,受保護的路由由 Next.js 的 middleware 強制。搜尋有全域搜尋跟 Cmd + K 面板,背後由 Finnhub 支撐,閒置的時候會顯示熱門股,查詢也做了 debounce。每個使用者有自己的 watchlist 追蹤清單,存在 MongoDB,同一個使用者不會有重複的股票代號。個股詳情頁塞了 TradingView 的一整套 widget——K 線、進階圖表、技術指標、公司財務資料,還可以選擇性接入跨來源的情緒分析,涵蓋 Reddit、X、新聞,還有 Polymarket 這種預測市場。市場總覽則是熱力圖、報價跟頭條新聞。另外還有個人化的 onboarding,會問你所在國家、投資目標、風險承受度跟偏好產業,然後用 Inngest 加 Gemini 產生一封 AI 個人化的歡迎信,並且用排程按照你的 watchlist 寄每日新聞摘要。
這裡有個值得注意的設計:AI provider 是可替換的。預設用 Gemini,但也支援 minimax 跟 siray,透過一個 AI_PROVIDER 環境變數就能切換,不綁死在單一廠商。情緒分析也只是選配的整合,需要另外的 API key,不是核心依賴。
自架的部分。前置需求是 Node.js 20 以上、pnpm 或 npm、一組 MongoDB 連線字串、一把 Finnhub API key——免費方案可以用,但即時行情可能要付費——還有一個寄信用的 Gmail 帳號,以及選配的 Gemini key。基本流程就是 clone 下來、裝套件、建 .env、跑一個測試指令驗證資料庫連線,然後啟動 dev server。如果你要跑到完整的 workflow、排程跟 AI,還要另外用 inngest-cli 在本地啟動 Inngest。如果嫌麻煩,也可以直接用 Docker Compose 一次拉起 app 跟 MongoDB,Compose 檔裡就兩個服務,一個是 app、一個是帶了持久化 volume 跟健康檢查的 Mongo 7。
最後講定位跟限制,有兩點要先想清楚。第一是數據延遲——股市數據不是來自 OpenStock 自己的資料庫,而是上游的 Finnhub,免費方案通常是延遲數據,要即時報價可能得升級付費。第二,它不是交易平台——沒有下單、沒有券商功能,README 明白定位它是一個市場情報工具。
好,收尾幫大家抓三個重點。第一,OpenStock 是一個 AGPL-3.0 授權、可自架、永久免費的股市儀表板,它的核心不是技術,而是「知識開放、拒絕商業化」的立場。第二,技術上它是一套幾乎純 TypeScript 的 Next.js 15 全端,市場數據靠 Finnhub、圖表靠 TradingView,AI 跟自動化靠 Inngest,而且 AI 供應商可以自由替換、不鎖廠商。第三,記得它的定位——這是市場情報工具,不是交易平台,數據會延遲,內容不是投資建議。對散戶、學生,或想在一個完全可掌控的基礎上做二次開發的工程師來說,它是個相當完整的起點,只是別忘了 AGPL 的約束——你在它之上做的任何公開部署,也得同樣開放回饋社群。
Tags
Related Articles
Dexter: An Autonomous Financial Research Agent That Plans and Self-Validates
Dexter breaks complex financial research questions into structured steps, automatically calls tools to fetch real-time financial data, then self-checks its results until the answer is complete enough—conceptually, it's 'Claude Code built specifically for financial research.'
10 Weird OSS Projects You Actually Need
From Carbon (code-to-image), nektos/act (run GitHub Actions locally), to Ink (React-based terminal UI) — 10 OSS projects that each solve one specific problem really well.
The Forgotten Developer Who Saved JavaScript: Douglas Crockford and the Story of JSON
Douglas Crockford didn't create JavaScript, but he may be the single most important reason it went from a mocked scripting language to the foundation of the modern web: he formalized JSON, created JSLint, and wrote JavaScript: The Good Parts — a book that showed developers JavaScript actually had a good side.