Open-Dev-Society/OpenStockPublic

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.

AI summary: An open-source alternative to expensive stock market platforms for tracking real-time prices.

Stars
19.6K
+110 today
Forks
2.4K
Watchers
105
Open issues
27
Open PRs
9
Contributors
~16
Commits
170
Branches
4

TypeScriptAGPL-3.0Created Sep 28, 2025Last push 3d ago+425 stars this week+3.7K this month

Quick answers

What is OpenStock?
An open-source alternative to expensive stock market platforms for tracking real-time prices.
What does OpenStock do?
OpenStock is a free and open-source platform designed to track real-time stock market prices and company insights. It serves as an accessible alternative to expensive, proprietary market analysis tools. Users can set personalized alerts to stay informed about market movements without paying subscription fees. The project is built openly to ensure financial data and market tracking tools are available to everyone forever.
Who is OpenStock for?
Retail investors, day traders, and financial enthusiasts looking for a free alternative to premium stock market platforms. Users must be comfortable navigating web-based financial dashboards.
How popular is OpenStock on GitHub?
Open-Dev-Society/OpenStock has 19,634 stars and 2,404 forks on GitHub, and gained 425 stars in the last 7 days.
What license does OpenStock use?
Open-Dev-Society/OpenStock is released under the AGPL-3.0 license.

Star history

since Sep 19, 2026
05K10K15KSep 2026Sep 2026Sep 2026Oct 2026
19.6K stars as of Oct 4, 2026. Measured daily since Sep 19, 2026; GitHub no longer exposes earlier star timestamps.

Contribution activity

commits per day, last 52 weeks
OctNovDecJanFebMarAprMayJunJulAugSepMonWedFri2025-10-05: 0 commits2025-10-06: 2 commits2025-10-07: 1 commit2025-10-08: 2 commits2025-10-09: 0 commits2025-10-10: 0 commits2025-10-11: 2 commits2025-10-12: 5 commits2025-10-13: 0 commits2025-10-14: 0 commits2025-10-15: 0 commits2025-10-16: 3 commits2025-10-17: 0 commits2025-10-18: 1 commit2025-10-19: 0 commits2025-10-20: 0 commits2025-10-21: 0 commits2025-10-22: 1 commit2025-10-23: 0 commits2025-10-24: 1 commit2025-10-25: 0 commits2025-10-26: 0 commits2025-10-27: 0 commits2025-10-28: 0 commits2025-10-29: 0 commits2025-10-30: 0 commits2025-10-31: 0 commits2025-11-01: 0 commits2025-11-02: 0 commits2025-11-03: 0 commits2025-11-04: 0 commits2025-11-05: 0 commits2025-11-06: 0 commits2025-11-07: 0 commits2025-11-08: 0 commits2025-11-09: 0 commits2025-11-10: 0 commits2025-11-11: 0 commits2025-11-12: 0 commits2025-11-13: 0 commits2025-11-14: 0 commits2025-11-15: 0 commits2025-11-16: 0 commits2025-11-17: 0 commits2025-11-18: 0 commits2025-11-19: 0 commits2025-11-20: 0 commits2025-11-21: 0 commits2025-11-22: 0 commits2025-11-23: 0 commits2025-11-24: 0 commits2025-11-25: 0 commits2025-11-26: 0 commits2025-11-27: 0 commits2025-11-28: 0 commits2025-11-29: 0 commits2025-11-30: 0 commits2025-12-01: 0 commits2025-12-02: 0 commits2025-12-03: 0 commits2025-12-04: 0 commits2025-12-05: 0 commits2025-12-06: 0 commits2025-12-07: 0 commits2025-12-08: 0 commits2025-12-09: 0 commits2025-12-10: 1 commit2025-12-11: 0 commits2025-12-12: 3 commits2025-12-13: 1 commit2025-12-14: 0 commits2025-12-15: 0 commits2025-12-16: 0 commits2025-12-17: 0 commits2025-12-18: 0 commits2025-12-19: 0 commits2025-12-20: 0 commits2025-12-21: 0 commits2025-12-22: 0 commits2025-12-23: 0 commits2025-12-24: 0 commits2025-12-25: 0 commits2025-12-26: 0 commits2025-12-27: 0 commits2025-12-28: 0 commits2025-12-29: 0 commits2025-12-30: 0 commits2025-12-31: 0 commits2026-01-01: 0 commits2026-01-02: 0 commits2026-01-03: 0 commits2026-01-04: 0 commits2026-01-05: 0 commits2026-01-06: 0 commits2026-01-07: 0 commits2026-01-08: 0 commits2026-01-09: 0 commits2026-01-10: 0 commits2026-01-11: 0 commits2026-01-12: 0 commits2026-01-13: 0 commits2026-01-14: 0 commits2026-01-15: 0 commits2026-01-16: 0 commits2026-01-17: 0 commits2026-01-18: 0 commits2026-01-19: 0 commits2026-01-20: 0 commits2026-01-21: 0 commits2026-01-22: 0 commits2026-01-23: 0 commits2026-01-24: 0 commits2026-01-25: 0 commits2026-01-26: 0 commits2026-01-27: 0 commits2026-01-28: 0 commits2026-01-29: 0 commits2026-01-30: 1 commit2026-01-31: 2 commits2026-02-01: 5 commits2026-02-02: 1 commit2026-02-03: 0 commits2026-02-04: 0 commits2026-02-05: 0 commits2026-02-06: 0 commits2026-02-07: 0 commits2026-02-08: 0 commits2026-02-09: 0 commits2026-02-10: 0 commits2026-02-11: 0 commits2026-02-12: 2 commits2026-02-13: 2 commits2026-02-14: 0 commits2026-02-15: 0 commits2026-02-16: 0 commits2026-02-17: 0 commits2026-02-18: 0 commits2026-02-19: 0 commits2026-02-20: 0 commits2026-02-21: 0 commits2026-02-22: 0 commits2026-02-23: 0 commits2026-02-24: 0 commits2026-02-25: 0 commits2026-02-26: 0 commits2026-02-27: 0 commits2026-02-28: 0 commits2026-03-01: 0 commits2026-03-02: 0 commits2026-03-03: 0 commits2026-03-04: 0 commits2026-03-05: 0 commits2026-03-06: 0 commits2026-03-07: 0 commits2026-03-08: 0 commits2026-03-09: 0 commits2026-03-10: 0 commits2026-03-11: 0 commits2026-03-12: 0 commits2026-03-13: 0 commits2026-03-14: 0 commits2026-03-15: 0 commits2026-03-16: 0 commits2026-03-17: 0 commits2026-03-18: 0 commits2026-03-19: 0 commits2026-03-20: 1 commit2026-03-21: 1 commit2026-03-22: 0 commits2026-03-23: 0 commits2026-03-24: 0 commits2026-03-25: 2 commits2026-03-26: 0 commits2026-03-27: 0 commits2026-03-28: 1 commit2026-03-29: 1 commit2026-03-30: 0 commits2026-03-31: 0 commits2026-04-01: 0 commits2026-04-02: 0 commits2026-04-03: 0 commits2026-04-04: 0 commits2026-04-05: 0 commits2026-04-06: 0 commits2026-04-07: 0 commits2026-04-08: 0 commits2026-04-09: 0 commits2026-04-10: 0 commits2026-04-11: 0 commits2026-04-12: 0 commits2026-04-13: 0 commits2026-04-14: 0 commits2026-04-15: 0 commits2026-04-16: 0 commits2026-04-17: 0 commits2026-04-18: 0 commits2026-04-19: 0 commits2026-04-20: 0 commits2026-04-21: 0 commits2026-04-22: 8 commits2026-04-23: 1 commit2026-04-24: 0 commits2026-04-25: 0 commits2026-04-26: 0 commits2026-04-27: 0 commits2026-04-28: 0 commits2026-04-29: 0 commits2026-04-30: 0 commits2026-05-01: 0 commits2026-05-02: 0 commits2026-05-03: 0 commits2026-05-04: 0 commits2026-05-05: 0 commits2026-05-06: 0 commits2026-05-07: 0 commits2026-05-08: 0 commits2026-05-09: 0 commits2026-05-10: 0 commits2026-05-11: 0 commits2026-05-12: 0 commits2026-05-13: 0 commits2026-05-14: 0 commits2026-05-15: 0 commits2026-05-16: 0 commits2026-05-17: 0 commits2026-05-18: 0 commits2026-05-19: 0 commits2026-05-20: 0 commits2026-05-21: 0 commits2026-05-22: 0 commits2026-05-23: 0 commits2026-05-24: 0 commits2026-05-25: 0 commits2026-05-26: 1 commit2026-05-27: 0 commits2026-05-28: 0 commits2026-05-29: 1 commit2026-05-30: 0 commits2026-05-31: 0 commits2026-06-01: 0 commits2026-06-02: 0 commits2026-06-03: 0 commits2026-06-04: 0 commits2026-06-05: 0 commits2026-06-06: 1 commit2026-06-07: 0 commits2026-06-08: 0 commits2026-06-09: 0 commits2026-06-10: 0 commits2026-06-11: 0 commits2026-06-12: 0 commits2026-06-13: 0 commits2026-06-14: 0 commits2026-06-15: 0 commits2026-06-16: 0 commits2026-06-17: 0 commits2026-06-18: 0 commits2026-06-19: 0 commits2026-06-20: 0 commits2026-06-21: 0 commits2026-06-22: 0 commits2026-06-23: 0 commits2026-06-24: 0 commits2026-06-25: 0 commits2026-06-26: 0 commits2026-06-27: 0 commits2026-06-28: 0 commits2026-06-29: 0 commits2026-06-30: 0 commits2026-07-01: 1 commit2026-07-02: 0 commits2026-07-03: 0 commits2026-07-04: 4 commits2026-07-05: 0 commits2026-07-06: 0 commits2026-07-07: 0 commits2026-07-08: 0 commits2026-07-09: 0 commits2026-07-10: 0 commits2026-07-11: 0 commits2026-07-12: 0 commits2026-07-13: 0 commits2026-07-14: 0 commits2026-07-15: 0 commits2026-07-16: 0 commits2026-07-17: 0 commits2026-07-18: 0 commits2026-07-19: 0 commits2026-07-20: 0 commits2026-07-21: 0 commits2026-07-22: 0 commits2026-07-23: 0 commits2026-07-24: 0 commits2026-07-25: 0 commits2026-07-26: 0 commits2026-07-27: 0 commits2026-07-28: 0 commits2026-07-29: 1 commit2026-07-30: 0 commits2026-07-31: 0 commits2026-08-01: 0 commits2026-08-02: 0 commits2026-08-03: 0 commits2026-08-04: 0 commits2026-08-05: 0 commits2026-08-06: 0 commits2026-08-07: 0 commits2026-08-08: 0 commits2026-08-09: 0 commits2026-08-10: 0 commits2026-08-11: 0 commits2026-08-12: 0 commits2026-08-13: 0 commits2026-08-14: 0 commits2026-08-15: 0 commits2026-08-16: 0 commits2026-08-17: 0 commits2026-08-18: 0 commits2026-08-19: 0 commits2026-08-20: 0 commits2026-08-21: 0 commits2026-08-22: 0 commits2026-08-23: 0 commits2026-08-24: 0 commits2026-08-25: 0 commits2026-08-26: 0 commits2026-08-27: 0 commits2026-08-28: 0 commits2026-08-29: 0 commits2026-08-30: 0 commits2026-08-31: 0 commits2026-09-01: 0 commits2026-09-02: 0 commits2026-09-03: 0 commits2026-09-04: 0 commits2026-09-05: 0 commits2026-09-06: 0 commits2026-09-07: 0 commits2026-09-08: 0 commits2026-09-09: 0 commits2026-09-10: 0 commits2026-09-11: 0 commits2026-09-12: 0 commits2026-09-13: 0 commits2026-09-14: 0 commits2026-09-15: 0 commits2026-09-16: 0 commits2026-09-17: 0 commits2026-09-18: 1 commit2026-09-19: 1 commit2026-09-20: 0 commits2026-09-21: 1 commit2026-09-22: 1 commit2026-09-23: 1 commit2026-09-24: 1 commit2026-09-25: 23 commits2026-09-26: 1 commit2026-09-27: 0 commits2026-09-28: 0 commits2026-09-29: 0 commits2026-09-30: 0 commits2026-10-01: 0 commits2026-10-02: 0 commits2026-10-03: 0 commits
90 commits in the last yearLessMore

Signals and awards

derived from tracked data
  • Widely adopted

    19,634 stars

  • Continuous integration

    Automated checks passing

  • Repeat trending

    8 trending appearances

What OpenStock does

OpenStock is a free and open-source platform designed to track real-time stock market prices and company insights. It serves as an accessible alternative to expensive, proprietary market analysis tools. Users can set personalized alerts to stay informed about market movements without paying subscription fees. The project is built openly to ensure financial data and market tracking tools are available to everyone forever.

Retail investors, day traders, and financial enthusiasts looking for a free alternative to premium stock market platforms. Users must be comfortable navigating web-based financial dashboards.

  • Real-time tracking: Monitors live stock market prices and updates seamlessly.
  • Personalized alerts: Allows users to set custom notifications for specific price movements.
  • Company insights: Provides detailed analytics and metrics for publicly traded companies.
  • Open source: Built openly to provide a free alternative to costly financial platforms.
  • Web interface: Offers a comprehensive dashboard for managing portfolios and tracking trends.

Where teams use it

Tracking personal portfolios

Monitor real-time prices of personal investments without needing a paid service.

Setting price alerts

Configure notifications to buy or sell when a stock hits a specific target price.

Researching companies

Explore detailed financial insights to make informed trading decisions.

Self-hosting financial tools

Deploy an open-source market tracker for private, independent financial analysis.

README

main branch

New from the OpenStock team: Onto is live on Product Hunt. It makes your website readable to AI agents. Upvote it here ▲

New from Open Dev Society: kitbash. Before you build, find out which parts already exist on GitHub. Borrow them, adapt them, or write the rest.

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


Project Banner © Open Dev Society. This project is licensed under AGPL-3.0; if you modify, redistribute, or deploy it (including as a web service), you must release your source code under the same license and credit the original authors.

Next.js badge

OpenStock

OpenStock is an open-source alternative to expensive market platforms. Track real-time prices, watch the whole market, and explore detailed company insights — built openly, for everyone, forever free.

❤️ 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 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
  16. ❤️ Sponsor OpenStock

✨ 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)
    • Weekly news summary email (cron) sent as a Kit broadcast
  • 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)
  • Optional: Gmail account for email (or update Nodemailer transport) if you want welcome and news summary emails
  • 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

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:

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.
  • NODEMAILER_EMAIL and NODEMAILER_PASSWORD are optional for local Docker runs. If they are omitted, the app still starts but email features stay disabled.

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):

# Core
NODE_ENV=development

# Database (Atlas)
MONGODB_URI=mongodb+srv://<user>:<pass>@<cluster>/<db>?retryWrites=true&w=majority

# Better Auth
BETTER_AUTH_SECRET=your_better_auth_secret
BETTER_AUTH_URL=http://localhost:3000

# Finnhub
# Note: NEXT_PUBLIC_FINNHUB_API_KEY is required for Vercel deployment
NEXT_PUBLIC_FINNHUB_API_KEY=your_finnhub_key
FINNHUB_BASE_URL=https://finnhub.io/api/v1

# Sentiment insights (optional)
ADANOS_API_KEY=your_adanos_api_key
# ADANOS_API_BASE_URL=https://api.adanos.org

# AI Provider (optional, default: "gemini")
# Supported: "gemini", "minimax", "siray"
# AI_PROVIDER=gemini

# Gemini
GEMINI_API_KEY=your_gemini_api_key

# MiniMax (optional, used when AI_PROVIDER=minimax or as fallback)
# Get your key at https://platform.minimaxi.com
# MINIMAX_API_KEY=your_minimax_api_key

# Inngest Signing Key (required for Vercel deployment)
# Get this from your Inngest dashboard: https://app.inngest.com/env/settings/keys
INNGEST_SIGNING_KEY=your_inngest_signing_key
# Required in production so sign-up can send the welcome-email event
INNGEST_EVENT_KEY=your_inngest_event_key

# Market data (optional)
# Several free Finnhub keys, rotated per request: each adds 60 requests/min.
# FINNHUB_API_KEYS=key_one,key_two
# "cached" (default) refreshes quotes hourly for everyone; "realtime" refreshes every 15s
# and turns on email price alerts (an OpenStock Cloud feature).
# NEXT_PUBLIC_OPENSTOCK_DATA_MODE=cached

# Social sign-in (optional; each provider is hidden server-side until set)
# Callback URLs: <BETTER_AUTH_URL>/api/auth/callback/google and /api/auth/callback/github
# Leave these commented out until you have real credentials: any value turns the provider on
# GOOGLE_CLIENT_ID=your_google_client_id
# GOOGLE_CLIENT_SECRET=your_google_client_secret
# GITHUB_CLIENT_ID=your_github_client_id
# GITHUB_CLIENT_SECRET=your_github_client_secret

# Email (optional; Nodemailer via Gmail, consider App Passwords if 2FA)
# NODEMAILER_EMAIL=youraddress@gmail.com
# NODEMAILER_PASSWORD=your_gmail_app_password

Local (Docker Compose) MongoDB:

# Core
NODE_ENV=development

# Database (Docker)
MONGODB_URI=mongodb://root:example@mongodb:27017/openstock?authSource=admin

# Better Auth
BETTER_AUTH_SECRET=your_better_auth_secret
BETTER_AUTH_URL=http://localhost:3000

# Finnhub
# Note: NEXT_PUBLIC_FINNHUB_API_KEY is required for Vercel deployment
NEXT_PUBLIC_FINNHUB_API_KEY=your_finnhub_key
FINNHUB_BASE_URL=https://finnhub.io/api/v1

# Sentiment insights (optional)
ADANOS_API_KEY=your_adanos_api_key
# ADANOS_API_BASE_URL=https://api.adanos.org

# AI Provider (optional, default: "gemini")
# Supported: "gemini", "minimax", "siray"
# AI_PROVIDER=gemini

# Gemini
GEMINI_API_KEY=your_gemini_api_key

# MiniMax (optional, used when AI_PROVIDER=minimax or as fallback)
# Get your key at https://platform.minimaxi.com
# MINIMAX_API_KEY=your_minimax_api_key

# Inngest Signing Key (required for Vercel deployment)
# Get this from your Inngest dashboard: https://app.inngest.com/env/settings/keys
INNGEST_SIGNING_KEY=your_inngest_signing_key
# Required in production so sign-up can send the welcome-email event
INNGEST_EVENT_KEY=your_inngest_event_key

# Market data (optional)
# Several free Finnhub keys, rotated per request: each adds 60 requests/min.
# FINNHUB_API_KEYS=key_one,key_two
# "cached" (default) refreshes quotes hourly for everyone; "realtime" refreshes every 15s
# and turns on email price alerts (an OpenStock Cloud feature).
# NEXT_PUBLIC_OPENSTOCK_DATA_MODE=cached

# Social sign-in (optional; each provider is hidden server-side until set)
# Callback URLs: <BETTER_AUTH_URL>/api/auth/callback/google and /api/auth/callback/github
# Leave these commented out until you have real credentials: any value turns the provider on
# GOOGLE_CLIENT_ID=your_google_client_id
# GOOGLE_CLIENT_SECRET=your_google_client_secret
# GITHUB_CLIENT_ID=your_github_client_id
# GITHUB_CLIENT_SECRET=your_github_client_secret

# Email (optional; Nodemailer via Gmail, consider App Passwords if 2FA)
# NODEMAILER_EMAIL=youraddress@gmail.com
# NODEMAILER_PASSWORD=your_gmail_app_password

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.
  • If the Nodemailer credentials are omitted, the app still runs but welcome and news summary emails are disabled.
  • Do not hardcode secrets in the Dockerfile; use .env and Compose.

🧱 Project Structure

app/
  (auth)/
    layout.tsx
    sign-in/page.tsx
    sign-up/page.tsx
  (root)/
    layout.tsx
    page.tsx
    help/page.tsx
    stocks/[symbol]/page.tsx
  api/inngest/route.ts
  globals.css
  layout.tsx
components/
  ui/…          # shadcn/radix primitives (button, dialog, command, input, etc.)
  forms/…       # InputField, SelectField, CountrySelectField, FooterLink
  Header.tsx, Footer.tsx, SearchCommand.tsx, WatchlistButton.tsx, …
database/
  models/watchlist.model.ts
  mongoose.ts
lib/
  actions/…     # server actions (auth, finnhub, user, watchlist)
  better-auth/…
  inngest/…     # client, functions, prompts
  nodemailer/…  # transporter, email templates
  constants.ts, utils.ts
scripts/
  test-db.mjs
types/
  global.d.ts
next.config.ts          # i.ibb.co image domain allowlist
postcss.config.mjs      # Tailwind v4 postcss setup
components.json         # shadcn config
public/assets/images/   # logos and screenshots

📡 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 9 * * 1 → Weekly News Summary (every Monday at 9 AM, Kit broadcast)
    • 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: opendevsociety@cc.cc
  • 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 service), you must release your source code under the same license and credit the original authors.

Our Honourable Contributors

  • ravixalgorithm - Developed the entire application from the ground up, including authentication, UI design, API and AI integration, and deployment.
  • Priyanshuu00007 - Created the official OpenStock logo and contributed to the project’s visual identity.
  • chinnsenn - Set up Docker configuration for the repository, ensuring a smooth development and deployment process.
  • koevoet1221 - Resolved MongoDB Docker build issues, improving the project’s overall stability and reliability.
  • ettoreciolli1 - updated Readme

❤️ Sponsor OpenStock

OpenStock is free, open source and used by 13,000+ registered people. Keeping it that way costs money every month: hosting, the database, market data keys, AI and email, and the hours that go into reviewing pull requests and shipping fixes.

How OpenStock is funded

  • OpenStock Cloud will pay for hosting. Cloud ($5 a month, coming soon) adds live quotes and email price alerts. Its subscribers will cover the servers, database and market data the hosted app needs, so the free site stays online without depending on donations.
  • Sponsors keep the community moving. Sponsorships pay for the time behind OpenStock: reviewing community pull requests, fixing bugs and shipping features at the pace 13,000+ people expect, with the core free for everyone. Self-hosting stays free, with every feature.

Pick a tier. Each link opens GitHub Sponsors with the amount already selected. Cancel any time.

Tier Monthly What you get
Backer $5 Your name in this README
Supporter $25 Name and avatar on the sponsor wall and the sponsor page
Company $100 Your logo in the footer of every public page, in this README and on the sponsor page
Partner $500 One of three sponsor slots in the app sidebar, seen by 13,000+ registered users, plus your logo on the landing page

Rather give once? Make a one-time gift. Want an invoice or a custom partnership? Talk with us. Everything, including where the money goes, is on the sponsor page.

Sponsorships are paid through GitHub Sponsors to @ravixalgorithm (Ravi Pratap Singh, founder of Open Dev Society).

Can't sponsor right now? Pick a good first issue, star the repo, or share OpenStock with someone who pays too much for a terminal.

Current sponsors: your logo here. Previously backed by: Siray.ai (2026)

Special thanks

Huge thanks to Adrian Hajdin (JavaScript Mastery) — his excellent Stock Market App tutorial was instrumental in building OpenStock for the open-source community under the Open Dev Society.

GitHub: adrianhajdin YouTube tutorial: Stock Market App Tutorial YouTube channel: JavaScript Mastery

View on GitHub

Recent activity

commits and pull requests

Recent open issues

view all

Discussions

all 1

Code frequency

additions and deletions
+6.7K-6.7KWeek of 2025-10-05: +739 linesWeek of 2025-10-05: -35 linesWeek of 2025-10-12: +151 linesWeek of 2025-10-12: -32 linesWeek of 2025-10-19: +4 linesWeek of 2025-10-19: -1 linesWeek of 2025-10-26: +0 linesWeek of 2025-10-26: -0 linesWeek of 2025-11-02: +0 linesWeek of 2025-11-02: -0 linesWeek of 2025-11-09: +0 linesWeek of 2025-11-09: -0 linesWeek of 2025-11-16: +0 linesWeek of 2025-11-16: -0 linesWeek of 2025-11-23: +0 linesWeek of 2025-11-23: -0 linesWeek of 2025-11-30: +0 linesWeek of 2025-11-30: -0 linesWeek of 2025-12-07: +1,196 linesWeek of 2025-12-07: -739 linesWeek of 2025-12-14: +0 linesWeek of 2025-12-14: -0 linesWeek of 2025-12-21: +0 linesWeek of 2025-12-21: -0 linesWeek of 2025-12-28: +0 linesWeek of 2025-12-28: -0 linesWeek of 2026-01-04: +0 linesWeek of 2026-01-04: -0 linesWeek of 2026-01-11: +0 linesWeek of 2026-01-11: -0 linesWeek of 2026-01-18: +0 linesWeek of 2026-01-18: -0 linesWeek of 2026-01-25: +2,877 linesWeek of 2026-01-25: -506 linesWeek of 2026-02-01: +233 linesWeek of 2026-02-01: -75 linesWeek of 2026-02-08: +38 linesWeek of 2026-02-08: -14 linesWeek of 2026-02-15: +0 linesWeek of 2026-02-15: -0 linesWeek of 2026-02-22: +0 linesWeek of 2026-02-22: -0 linesWeek of 2026-03-01: +0 linesWeek of 2026-03-01: -0 linesWeek of 2026-03-08: +0 linesWeek of 2026-03-08: -0 linesWeek of 2026-03-15: +1,765 linesWeek of 2026-03-15: -154 linesWeek of 2026-03-22: +1,100 linesWeek of 2026-03-22: -198 linesWeek of 2026-03-29: +1 linesWeek of 2026-03-29: -1 linesWeek of 2026-04-05: +0 linesWeek of 2026-04-05: -0 linesWeek of 2026-04-12: +0 linesWeek of 2026-04-12: -0 linesWeek of 2026-04-19: +586 linesWeek of 2026-04-19: -153 linesWeek of 2026-04-26: +0 linesWeek of 2026-04-26: -0 linesWeek of 2026-05-03: +0 linesWeek of 2026-05-03: -0 linesWeek of 2026-05-10: +0 linesWeek of 2026-05-10: -0 linesWeek of 2026-05-17: +0 linesWeek of 2026-05-17: -0 linesWeek of 2026-05-24: +66 linesWeek of 2026-05-24: -3 linesWeek of 2026-05-31: +179 linesWeek of 2026-05-31: -5 linesWeek of 2026-06-07: +0 linesWeek of 2026-06-07: -0 linesWeek of 2026-06-14: +0 linesWeek of 2026-06-14: -0 linesWeek of 2026-06-21: +0 linesWeek of 2026-06-21: -0 linesWeek of 2026-06-28: +50 linesWeek of 2026-06-28: -44 linesWeek of 2026-07-05: +0 linesWeek of 2026-07-05: -0 linesWeek of 2026-07-12: +0 linesWeek of 2026-07-12: -0 linesWeek of 2026-07-19: +0 linesWeek of 2026-07-19: -0 linesWeek of 2026-07-26: +6 linesWeek of 2026-07-26: -4 linesWeek of 2026-08-02: +0 linesWeek of 2026-08-02: -0 linesWeek of 2026-08-09: +0 linesWeek of 2026-08-09: -0 linesWeek of 2026-08-16: +0 linesWeek of 2026-08-16: -0 linesWeek of 2026-08-23: +0 linesWeek of 2026-08-23: -0 linesWeek of 2026-08-30: +0 linesWeek of 2026-08-30: -0 linesWeek of 2026-09-06: +0 linesWeek of 2026-09-06: -0 linesWeek of 2026-09-13: +15 linesWeek of 2026-09-13: -6 linesWeek of 2026-09-20: +6,749 linesWeek of 2026-09-20: -4,352 linesWeek of 2026-09-27: +0 linesWeek of 2026-09-27: -0 linesOct 5, 2025Sep 27, 2026
+15.8K lines added, -6.3K removed over the last year.

Commits per week

last 52 weeks
280Week of 2025-10-05: 7 commitsWeek of 2025-10-12: 9 commitsWeek of 2025-10-19: 2 commitsWeek of 2025-10-26: 0 commitsWeek of 2025-11-02: 0 commitsWeek of 2025-11-09: 0 commitsWeek of 2025-11-16: 0 commitsWeek of 2025-11-23: 0 commitsWeek of 2025-11-30: 0 commitsWeek of 2025-12-07: 5 commitsWeek of 2025-12-14: 0 commitsWeek of 2025-12-21: 0 commitsWeek of 2025-12-28: 0 commitsWeek of 2026-01-04: 0 commitsWeek of 2026-01-11: 0 commitsWeek of 2026-01-18: 0 commitsWeek of 2026-01-25: 3 commitsWeek of 2026-02-01: 6 commitsWeek of 2026-02-08: 4 commitsWeek of 2026-02-15: 0 commitsWeek of 2026-02-22: 0 commitsWeek of 2026-03-01: 0 commitsWeek of 2026-03-08: 0 commitsWeek of 2026-03-15: 2 commitsWeek of 2026-03-22: 3 commitsWeek of 2026-03-29: 1 commitsWeek of 2026-04-05: 0 commitsWeek of 2026-04-12: 0 commitsWeek of 2026-04-19: 9 commitsWeek of 2026-04-26: 0 commitsWeek of 2026-05-03: 0 commitsWeek of 2026-05-10: 0 commitsWeek of 2026-05-17: 0 commitsWeek of 2026-05-24: 2 commitsWeek of 2026-05-31: 1 commitsWeek of 2026-06-07: 0 commitsWeek of 2026-06-14: 0 commitsWeek of 2026-06-21: 0 commitsWeek of 2026-06-28: 5 commitsWeek of 2026-07-05: 0 commitsWeek of 2026-07-12: 0 commitsWeek of 2026-07-19: 0 commitsWeek of 2026-07-26: 1 commitsWeek of 2026-08-02: 0 commitsWeek of 2026-08-09: 0 commitsWeek of 2026-08-16: 0 commitsWeek of 2026-08-23: 0 commitsWeek of 2026-08-30: 0 commitsWeek of 2026-09-06: 0 commitsWeek of 2026-09-13: 2 commitsWeek of 2026-09-20: 28 commitsWeek of 2026-09-27: 0 commitsOct 5, 2025Sep 27, 2026
90 commits in the last 52 weeks.

When work happens

weekday and hour
SunMonTueWedThuFriSat036912151821Sun 0:00 — 0 commitsSun 1:00 — 0 commitsSun 2:00 — 1 commitsSun 3:00 — 1 commitsSun 4:00 — 3 commitsSun 5:00 — 0 commitsSun 6:00 — 0 commitsSun 7:00 — 0 commitsSun 8:00 — 0 commitsSun 9:00 — 0 commitsSun 10:00 — 1 commitsSun 11:00 — 0 commitsSun 12:00 — 0 commitsSun 13:00 — 0 commitsSun 14:00 — 0 commitsSun 15:00 — 0 commitsSun 16:00 — 0 commitsSun 17:00 — 0 commitsSun 18:00 — 6 commitsSun 19:00 — 0 commitsSun 20:00 — 0 commitsSun 21:00 — 0 commitsSun 22:00 — 0 commitsSun 23:00 — 1 commitsMon 0:00 — 6 commitsMon 1:00 — 0 commitsMon 2:00 — 0 commitsMon 3:00 — 0 commitsMon 4:00 — 0 commitsMon 5:00 — 0 commitsMon 6:00 — 0 commitsMon 7:00 — 0 commitsMon 8:00 — 0 commitsMon 9:00 — 0 commitsMon 10:00 — 0 commitsMon 11:00 — 0 commitsMon 12:00 — 0 commitsMon 13:00 — 1 commitsMon 14:00 — 1 commitsMon 15:00 — 0 commitsMon 16:00 — 0 commitsMon 17:00 — 0 commitsMon 18:00 — 0 commitsMon 19:00 — 0 commitsMon 20:00 — 0 commitsMon 21:00 — 0 commitsMon 22:00 — 2 commitsMon 23:00 — 0 commitsTue 0:00 — 0 commitsTue 1:00 — 1 commitsTue 2:00 — 0 commitsTue 3:00 — 0 commitsTue 4:00 — 0 commitsTue 5:00 — 0 commitsTue 6:00 — 0 commitsTue 7:00 — 0 commitsTue 8:00 — 0 commitsTue 9:00 — 0 commitsTue 10:00 — 1 commitsTue 11:00 — 0 commitsTue 12:00 — 0 commitsTue 13:00 — 0 commitsTue 14:00 — 1 commitsTue 15:00 — 0 commitsTue 16:00 — 1 commitsTue 17:00 — 0 commitsTue 18:00 — 0 commitsTue 19:00 — 0 commitsTue 20:00 — 0 commitsTue 21:00 — 0 commitsTue 22:00 — 0 commitsTue 23:00 — 0 commitsWed 0:00 — 0 commitsWed 1:00 — 0 commitsWed 2:00 — 0 commitsWed 3:00 — 0 commitsWed 4:00 — 0 commitsWed 5:00 — 0 commitsWed 6:00 — 0 commitsWed 7:00 — 0 commitsWed 8:00 — 0 commitsWed 9:00 — 0 commitsWed 10:00 — 1 commitsWed 11:00 — 1 commitsWed 12:00 — 0 commitsWed 13:00 — 0 commitsWed 14:00 — 1 commitsWed 15:00 — 0 commitsWed 16:00 — 1 commitsWed 17:00 — 0 commitsWed 18:00 — 0 commitsWed 19:00 — 0 commitsWed 20:00 — 1 commitsWed 21:00 — 3 commitsWed 22:00 — 1 commitsWed 23:00 — 8 commitsThu 0:00 — 1 commitsThu 1:00 — 0 commitsThu 2:00 — 0 commitsThu 3:00 — 0 commitsThu 4:00 — 0 commitsThu 5:00 — 1 commitsThu 6:00 — 0 commitsThu 7:00 — 0 commitsThu 8:00 — 0 commitsThu 9:00 — 0 commitsThu 10:00 — 0 commitsThu 11:00 — 0 commitsThu 12:00 — 2 commitsThu 13:00 — 0 commitsThu 14:00 — 0 commitsThu 15:00 — 0 commitsThu 16:00 — 0 commitsThu 17:00 — 2 commitsThu 18:00 — 1 commitsThu 19:00 — 0 commitsThu 20:00 — 0 commitsThu 21:00 — 0 commitsThu 22:00 — 0 commitsThu 23:00 — 1 commitsFri 0:00 — 3 commitsFri 1:00 — 0 commitsFri 2:00 — 0 commitsFri 3:00 — 0 commitsFri 4:00 — 0 commitsFri 5:00 — 0 commitsFri 6:00 — 0 commitsFri 7:00 — 0 commitsFri 8:00 — 0 commitsFri 9:00 — 0 commitsFri 10:00 — 1 commitsFri 11:00 — 0 commitsFri 12:00 — 1 commitsFri 13:00 — 0 commitsFri 14:00 — 0 commitsFri 15:00 — 15 commitsFri 16:00 — 9 commitsFri 17:00 — 2 commitsFri 18:00 — 1 commitsFri 19:00 — 0 commitsFri 20:00 — 0 commitsFri 21:00 — 1 commitsFri 22:00 — 0 commitsFri 23:00 — 2 commitsSat 0:00 — 2 commitsSat 1:00 — 5 commitsSat 2:00 — 0 commitsSat 3:00 — 0 commitsSat 4:00 — 0 commitsSat 5:00 — 0 commitsSat 6:00 — 0 commitsSat 7:00 — 0 commitsSat 8:00 — 0 commitsSat 9:00 — 0 commitsSat 10:00 — 4 commitsSat 11:00 — 0 commitsSat 12:00 — 3 commitsSat 13:00 — 2 commitsSat 14:00 — 0 commitsSat 15:00 — 1 commitsSat 16:00 — 0 commitsSat 17:00 — 1 commitsSat 18:00 — 2 commitsSat 19:00 — 6 commitsSat 20:00 — 0 commitsSat 21:00 — 7 commitsSat 22:00 — 5 commitsSat 23:00 — 0 commits
Commit volume by weekday and hour (UTC). Larger dots mean more commits.
DateListRankStars gained
Sep 24, 2026daily#5+832
Sep 23, 2026weekly#17+3,261
Sep 23, 2026daily#5+832
Sep 22, 2026daily#2+843
Sep 22, 2026weekly#17+3,261
Sep 21, 2026daily#2+843
Sep 20, 2026daily#8+472
Sep 19, 2026daily#5+477
  • freeCodeCamp/freeCodeCamp

    freeCodeCamp.org's open-source codebase and curriculum. Learn math, programming, and computer science for free.

    456.7K stars · TypeScript

  • openclaw/openclaw

    The AI that really does things. Any OS. Any Platform. The lobster way. 🦞

    391.3K stars · TypeScript

  • anomalyco/opencode

    The open source coding agent.

    211.7K stars · TypeScript

  • n8n-io/n8n

    Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

    206.7K stars · TypeScript

  • microsoft/vscode

    Visual Studio Code

    193.5K stars · TypeScript

  • firecrawl/firecrawl

    Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥

    188.6K stars · TypeScript