Baike.dev
All toolsTrendingOpen sourceNewsSubmit
Log in
< 返回工具列表
O

OpenStock

> 前端框架
开源

OpenStock is an open-source alternative to expensive market platforms. Track real-time prices, set personalized alerts, and explore detailed company insights —

14.0K stars0 点赞1 次浏览
访问官网GitHub

工具介绍

OpenStock is an open-source alternative to expensive market platforms. Track real-time prices, set personalized alerts, and explore detailed company insights —

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.

Note: OpenStock is community-built and not a brokerage. Market data may be delayed based on provider rules and your configuration. Nothing here is financial advice.

📋 Table of Contents

  1. ✨ Introduction
  2. 🌍 Open Dev Society Manifesto
  3. ⚙️ Tech Stack
  4. 🔋 Features
  5. 🤸 Quick Start
  6. 🐳 Docker Setup
  7. 🔐 Environment Variables
  8. 🧱 Project Structure
  9. 📡 Data & Integrations
  10. 🌍 Market Support
  11. 🧪 Scripts & Tooling
  12. 🤝 Contributing
  13. 🛡️ Security
  14. 📜 License
  15. 🙏 Acknowledgements

✨ Introduction

OpenStock is a modern stock market app powered by Next.js (App Router), shadcn/ui and Tailwind CSS, Better Auth for authentication, MongoDB for persistence, Finnhub for market data, and TradingView widgets for charts and market views.

🌍 Open Dev Society Manifesto

We live in a world where knowledge is hidden behind paywalls. Where tools are locked in subscriptions. Where information is twisted by bias. Where newcomers are told they’re not “good enough” to build.

We believe there’s a better way.

  • Our Belief: Technology should belong to everyone. Knowledge should be open, free, and accessible. Communities should welcome newcomers with trust, not gatekeeping.
  • Our Mission: Build free, open-source projects that make a real difference:
    • Tools that professionals and students can use without barriers.
    • Knowledge platforms where learning is free, forever.
    • Communities where every beginner is guided, not judged.
    • Resources that run on trust, not profit.
  • Our Promise: We will never lock knowledge. We will never charge for access. We will never trade trust for money. We run on transparency, donations, and the strength of our community.
  • Our Call: If you’ve ever felt you didn’t belong, struggled to find free resources, or wanted to build something meaningful — you belong here.

Because the future belongs to those who build it openly.

⚙️ Tech Stack

Core

  • Next.js 15 (App Router), React 19
  • TypeScript
  • Tailwind CSS v4 (via @tailwindcss/postcss)
  • shadcn/ui + Radix UI primitives
  • Lucide icons

Auth & Data

  • Better Auth (email/password) with MongoDB adapter
  • MongoDB + Mongoose
  • Finnhub API for symbols, profiles, and market news
  • TradingView embeddable widgets

Automation & Comms

  • Inngest (events, cron, AI inference via Gemini)
  • Nodemailer (Gmail transport)
  • next-themes, cmdk (command palette), react-hook-form

Language composition

  • TypeScript (~93.4%), CSS (~6%), JavaScript (~0.6%)

🔋 Features

  • Authentication
    • Email/password auth with Better Auth + MongoDB adapter
    • Protected routes enforced via Next.js middleware
  • Global search and Command + K palette
    • Fast stock search backed by Finnhub
    • Popular stocks when idle; debounced querying
  • Watchlist
    • Per-user watchlist stored in MongoDB (unique symbol per user)
  • Stock details
    • TradingView symbol info, candlestick/advanced charts, baseline, technicals
    • Company profile and financials widgets
    • Optional cross-source sentiment insights for Reddit, X.com, news, and Polymarket
  • Market overview
    • Heatmap, quotes, and top stories (TradingView widgets)
  • Personalized onboarding
    • Collects country, investment goals, risk tolerance, preferred industry
  • Email & automation
    • AI-personalized welcome email (Gemini via Inngest)
    • Daily news summary emails (cron) personalized using user watchlists
  • Polished UI
    • shadcn/ui components, Radix primitives, Tailwind v4 design tokens
    • Dark theme by default
  • Keyboard shortcut
    • Cmd/Ctrl + K for quick actions/search

🤸 Quick Start

Prerequisites

  • Node.js 20+ and pnpm or npm
  • MongoDB connection string (MongoDB Atlas or local via Docker Compose)
  • Finnhub API key (free tier supported; real-time may require paid)
  • Gmail account for email (or update Nodemailer transport)
  • Optional: Google Gemini API key (for AI-generated welcome intros)

Clone and install

git clone https://github.com/Open-Dev-Society/OpenStock.git
cd OpenStock

# choose one:
pnpm install
# or
npm install

Configure environment

  • Create a .env file (see Environment Variables).
  • Verify DB connectivity:
pnpm test:db
# or
npm run test:db

Run development

# Next.js dev (Turbopack)
pnpm dev
# or
npm run dev

Run Inngest locally (workflows, cron, AI)

npx inngest-cli@latest dev

Build & start (production)

pnpm build && pnpm start
# or
npm run build && npm start

Open http://localhost:3000 to view the app.

🐳 Docker Setup

You can run OpenStock and MongoDB easily with Docker Compose.

  1. Ensure Docker and Docker Compose are installed.

  2. docker-compose.yml includes two services:

  • openstock (this app)
  • mongodb (MongoDB database with a persistent volume)
  1. Create your .env (see examples below). For the Docker setup, use a local connection string like:
MONGODB_URI=mongodb://root:example@mongodb:27017/openstock?authSource=admin
  1. Start the stack:
# from the repository root
docker compose up -d mongodb && docker compose up -d --build
  1. Access the app:
  • App: http://localhost:3000
  • MongoDB is available inside the Docker network at host mongodb:27017

Notes

  • The app service depends_on the mongodb service.
  • Credentials are defined in Compose for the MongoDB root user; authSource=admin is required on the connection string for root.
  • Data persists across restarts via the docker volume.

Optional: Example MongoDB service definition used in this project:

services:
  mongodb:
    image: mongo:7
    container_name: mongodb
    restart: unless-stopped
    environment:
      MONGO_INITDB_ROOT_USERNAME: root
      MONGO_INITDB_ROOT_PASSWORD: example
    ports:
      - "27017:27017"
    volumes:
      - mongo-data:/data/db
    healthcheck:
      test: ["CMD", "mongosh", "--eval", "db.adminCommand('ping')"]
      interval: 10s
      timeout: 5s
      retries: 5

volumes:
  mongo-data:

🔐 Environment Variables

Create .env at the project root. Choose either a hosted MongoDB (Atlas) URI or the local Docker URI.

Hosted (MongoDB Atlas):

…

Local (Docker Compose) MongoDB:

…

Notes

  • Keep private keys server-side whenever possible.
  • If using NEXT_PUBLIC_ variables, remember they are exposed to the browser.
  • In production, prefer a dedicated SMTP provider over a personal Gmail.
  • Do not hardcode secrets in the Dockerfile; use .env and Compose.

🧱 Project Structure

…

📡 Data & Integrations

  • Finnhub

    • Stock search, company profiles, and market news.
    • Set NEXT_PUBLIC_FINNHUB_API_KEY and FINNHUB_BASE_URL (default: https://finnhub.io/api/v1).
    • Free tiers may return delayed quotes; respect rate limits and terms.
  • Adanos sentiment insights (optional)

    • Structured stock sentiment snapshots across Reddit, X.com, news, and Polymarket.
    • Set ADANOS_API_KEY; optionally override the API host with ADANOS_API_BASE_URL.
    • Used only for the stock detail sentiment card and does not replace Finnhub or TradingView.
  • TradingView

    • Embeddable widgets used for charts, heatmap, quotes, and timelines.
    • External images from i.ibb.co are allowlisted in next.config.ts.
  • Better Auth + MongoDB

    • Email/password with MongoDB adapter.
    • Session validation via middleware; most routes are protected, with public exceptions for sign-in, sign-up, assets and Next internals.
  • Inngest

    • Workflows:
      • app/user.created → AI-personalized Welcome Email
      • Cron 0 12 * * * → Daily News Summary per user
    • Local dev: npx inngest-cli@latest dev.
  • Email (Nodemailer)

    • Gmail transport. Update credentials or switch to your SMTP provider.
    • Templates for welcome and news summary emails.

🌍 Market Support

OpenStock supports 30+ international stock exchanges including NSE, LSE, TSX, and more. However, please be aware of important limitations based on our data providers.

Quick Facts:

  • ✅ Finnhub supports most global exchanges
  • ⚠️ TradingView free tier has restrictions on emerging markets (India NSE, Vietnam, etc.)
  • 📊 Real-time data for non-US stocks is delayed by 15+ minutes on free tier

See MARKET_SUPPORT.md for:

  • Complete list of supported exchanges
  • Known limitations and workarounds
  • Why "This symbol is only available on TradingView" appears
  • How to upgrade for broader market coverage
  • Future improvements planned

For the latest supported symbols and exchanges, see Finnhub's exchange list.

🧪 Scripts & Tooling

Package scripts

  • dev: Next.js dev server with Turbopack
  • build: Production build (Turbopack)
  • start: Run production server
  • lint: ESLint
  • test:db: Validate DB connectivity

Developer experience

  • TypeScript strict mode
  • Tailwind CSS v4 (no separate tailwind.config needed)
  • shadcn/ui components with Radix primitives
  • cmdk command palette, next-themes, lucide-react icons

🤝 Contributing

You belong here. Whether you’re a student, a self-taught dev, or a seasoned engineer — contributions are welcome.

  • Open an issue to discuss ideas and bugs
  • Look for “good first issue” or “help wanted”
  • Keep PRs focused; add screenshots for UI changes
  • Be kind, guide beginners, no gatekeeping — that’s the ODS way

🛡️ Security

If you discover a vulnerability:

  • Do not open a public issue
  • Email: [email protected]
  • We'll coordinate responsible disclosure and patch swiftly

📜 License

OpenStock is and will remain free and open for everyone. This project is licensed under the AGPL-3.0 License - see the LICENSE file for details.

🙏 Acknowledgements

  • Finnhub for accessible market data
  • TradingView for embeddable market widgets
  • shadcn/ui, Radix UI, Tailwind CSS, Next.js community
  • Inngest for dependable background jobs and workflows
  • Better Auth for simple and secure authentication
  • All contributors who make open tools possible

— Built openly, for everyone, forever free. Open Dev Society.

© Open Dev Society. This project is licensed under AGPL-3.0; if you modify, redistribute, or deploy it (including as a web

核心特点

  • •Our Belief: Technology should belong to everyone. Knowledge should be open, free, and accessible. Communities should welcome newcomers with trust, not gatekeeping.
  • •Our Mission: Build free, open-source projects that make a real difference:
  • •Tools that professionals and students can use without barriers.
  • •Knowledge platforms where learning is free, forever.
  • •Communities where every beginner is guided, not judged.
  • •Resources that run on trust, not profit.
  • •Our Call: If you’ve ever felt you didn’t belong, struggled to find free resources, or wanted to build something meaningful — you belong here.
  • •Next.js 15 (App Router), React 19
  • •TypeScript
  • •Tailwind CSS v4 (via @tailwindcss/postcss)

> 标签

TypeScriptcoderabbitinngestnextjsshadcn-ui

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月9日
分类前端框架
定价开源

> 相关工具

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架
Baike.dev

baike.dev helps you discover great languages, frameworks, databases, DevOps and cloud-native tools.

Quick links

  • Home
  • All tools
  • Trending
  • Open source

About

  • About us
  • Community
  • News

Contribute

Found a great developer tool? Share it with the community.

Submit a tool
© 2026 baike.dev Developer EncyclopediaUpdated daily · Discover great developer tools