📦Open-Dev-Society / OpenStock
← 返回首页
OpenStock is an open-source alternative to expensive market platforms. Track real-time prices, set personalized alerts, and explore detailed company insights — built openly, for everyone, forever free.
⚖️ AGPL-3.0#coderabbit#inngest#nextjs#shadcn-ui#stock-market🌐 openstock-ods.vercel.app📅 创建于 2025-09-28🔄 更新于 2026-10-25
🔗 GitHub TypeScript

📄 仓库 README

在 GitHub 查看 ↗
来自 GitHub 仓库自述文件 · 版权归原作者所有

SPONSORED BY

RapidProxy: try for free, 90M+ clean residential IPs

Orbit. Free, open-source macOS screen recorder, screenshot tool and video editor: auto-zoom, smooth cursor, backgrounds, web recordings and AI agent recording.

Star History Rank GitHub Trending Repository of the Day

Open-Dev-Society%2FOpenStock | Trendshift Open-Dev-Society%2FOpenStock | Trendshift Open-Dev-Society%2FOpenStock | Trendshift Open-Dev-Society%2FOpenStock | Trendshift


OpenStock: the landing page with the market hours dial, index pulse and live charts

**[Open OpenStock](https://openstock-ods.vercel.app)** · [Changelog](https://openstock-ods.vercel.app/changelog) · [Self-host it](#self-hosting) · [Sponsor](#sponsors) · [Discord](https://discord.gg/JkJ8kfxgxB)
Latest release Next.js badge

OpenStock

Markets, minus the paywall. OpenStock is a free, open-source alternative to expensive market platforms: track prices, watch the whole market and dig into company insights. Use it at openstock-ods.vercel.app, or run your own copy with every feature.

❤️ 13,000+ people use OpenStock for free. Help keep it that way: sponsor from $5 a month, or read how OpenStock is funded.

[!NOTE] OpenStock is community-built and not a brokerage. Market data may be delayed depending on the provider and your setup. Nothing here is financial advice.

📋 Table of Contents

  1. 🔋 Features
  2. ⏱️ How fresh is the data
  3. ⚙️ Tech stack
  4. 🤸 Quick start
  5. 🔐 Environment variables
  6. 🐳 Self-hosting: Docker, prebuilt image, one-click deploys, Vercel
  7. 🧱 Project structure
  8. 📡 How it works
  9. 🌍 Market support
  10. 🧪 Scripts and tests
  11. 🤝 Contributing
  12. 🏆 Contributors
  13. 🛡️ Security
  14. 📜 License
  15. 🌱 Open Dev Society manifesto
  16. 🙏 Acknowledgements
  17. ❤️ Sponsor OpenStock

🔋 Features

Markets - A dashboard for seven markets: US, India, Germany, Canada, Australia, Crypto and Forex, with an index pulse, a sector heatmap, market leaders and top stories. - Search every exchange Finnhub covers with ⌘K, and keep stocks open as browser-style tabs.

Stock pages - TradingView candles with drawing tools (trend lines, Fibonacci, shapes, text) and fullscreen. - Pick indicators once (SMA, EMA, Bollinger Bands, VWAP, RSI, MACD, Stochastic, ATR) and they stay on every chart. - Financials, technicals and the company profile. - Sentiment from Reddit, X, news and Polymarket (with an Adanos key).

Watchlist and alerts - A watchlist of up to 50 stocks, saved to your account. - Price alerts above or below a target, checked every 5 minutes and emailed to you (in realtime mode). - A weekly, AI-written news digest by email every Monday.

Accounts - Email and password, plus Google and GitHub sign-in when configured; password reset and a profile page. - Rate-limited sign-in, sign-up and password reset; resetting your password signs out your other devices.

Community - A changelog that credits everyone who contributed, a Wall of love, and an update banner in the app.

⏱️ How fresh is the data

Charts always stream live from TradingView. Quotes, watchlist prices and alerts come from Finnhub:

Quotes Price alerts Cost
Community: openstock-ods.vercel.app Every hour, shared by everyone No Free
OpenStock Cloud (coming soon) Every 15 seconds By email $5 a month
Self-hosted Every hour, or every 15 seconds with NEXT_PUBLIC_OPENSTOCK_DATA_MODE=realtime and your own Finnhub keys By email, in realtime mode Free

⚙️ Tech stack

App Next.js 15 (App Router), React 19, TypeScript, Tailwind CSS v4, shadcn/ui and Radix
Accounts and data Better Auth, MongoDB with Mongoose
Market data Finnhub, TradingView widgets, Adanos (sentiment)
Background jobs Inngest
Email Nodemailer (Gmail), Kit for the newsletter
AI Gemini, MiniMax or Siray
Hosting Vercel; a Docker image on GitHub Container Registry for self-hosting

🤸 Quick start

You need Node.js 22 LTS, a MongoDB database (a free Atlas cluster, or the Docker setup) and a free Finnhub key.

git clone https://github.com/Open-Dev-Society/OpenStock.git
cd OpenStock
npm ci
cp .env.example .env         # fill in MONGODB_URI, BETTER_AUTH_SECRET and FINNHUB_API_KEY
node scripts/check-env.mjs   # checks your .env
npm run test:db              # checks the MongoDB connection
npm run dev                  # http://localhost:3000

Welcome emails, price alerts and the weekly digest run as Inngest jobs. Locally, start Inngest's dev server alongside the app: npx inngest-cli@latest dev.

For production: npm run build && npm start.

🔐 Environment variables

Every variable is listed with comments in .env.example. The ones that matter:

Variable Needed What it's for
MONGODB_URI Yes Your MongoDB database
BETTER_AUTH_SECRET Yes Signs sessions. Generate it with openssl rand -hex 32. Auth refuses to run in production without it
BETTER_AUTH_URL Yes The app's public URL, used for auth callbacks and links in emails
FINNHUB_API_KEY Yes Market data. Or put several free keys, comma-separated, in FINNHUB_API_KEYS: they're rotated, and each adds 60 requests a minute
NEXT_PUBLIC_OPENSTOCK_DATA_MODE No cached (hourly, the default) or realtime (every 15 seconds, with price alerts). Fixed when the app is built: rebuild after changing it
INNGEST_SIGNING_KEY, INNGEST_EVENT_KEY In production Background jobs: welcome emails, price alerts

📈 近 7 天 Star 趋势

每日新增 Star(柱)与累计 Star(线)· 数据来自 GitHub

🏆 排名变化趋势

在各榜单中的排名历史(数字越小越靠前)

📋 历史上榜记录

每次快照的详细数据
日期 榜单 排名 周期新增 总 STAR