Open-source project
Open-Dev-Society/OpenStock avatar
Open-Dev-Society/OpenStock

OpenStock: a self-hostable market dashboard whose quote freshness is decided at build time

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.

21,482 stars2,678 forksTypeScriptAGPL-3.0

At a glance

What is it?
OpenStock is an AGPL-3.0 Next.js app that tracks prices, watchlists and company data across eight markets on Finnhub and TradingView. The free community instance refreshes quotes hourly and sends no alerts, so anyone who wants 15-second quotes and email alerts has to self-host and rebuild in realtime mode.
Who is it for?
OpenStock suits individuals and small groups who want a free watchlist, TradingView charts and company pages, and who can run MongoDB, Inngest and a Finnhub key themselves. Anyone who needs alerts from the hosted site, guaranteed fresh quotes or a brokerage connection should not adopt it.
Can I use it commercially?
Yes, with strict conditions. AGPL-3.0 is a network copyleft licence: if people use a modified version over a network, for example as a hosted service, you must offer them its source code under the same licence.
Is it still maintained?
Yes. The repository last received commits 6 days ago.
What is it written in?
Mainly TypeScript, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • Open-Dev-Society/OpenStock21,482 ★ · +3,976
Star history
Repository2026-09-212026-11-15
Open-Dev-Society/OpenStock17.5k21.5k

3,976 Stars in the last 55 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

Hourly shared quotes on the community site, 15-second quotes only on your own copy

OpenStock splits its data into two pipes. Candlestick charts stream live from TradingView widgets in every setup. Quotes, watchlist prices and price alerts come from Finnhub, and how often those refresh depends on where the app runs.

On the public instance at openstock-ods.vercel.app, quotes refresh every hour and are shared by everyone, and price alerts are not offered at all. A self-hosted copy behaves the same way by default. Switching it to NEXT_PUBLIC_OPENSTOCK_DATA_MODE=realtime with your own Finnhub keys moves quotes to every 15 seconds and turns on email price alerts. A third tier, OpenStock Cloud, is listed as coming soon at $5 a month with 15-second quotes and email alerts.

That table is the real decision point. A reader who opens the community site, adds 50 stocks to a watchlist and expects intraday prices will see numbers up to an hour old next to a chart that is live. The README says plainly that OpenStock is not a brokerage, that data may be delayed depending on the provider and setup, and that nothing in it is financial advice. Trading off its quotes on the free tier would be a misuse.

Running OpenStock locally with npm ci and scripts/check-env.mjs

The local setup needs Node.js 22 LTS, a MongoDB database (a free Atlas cluster or the bundled Docker Compose database) and a free Finnhub key. The quick start in the README is short:

bash
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

Two checks run before the dev server. scripts/check-env.mjs validates the .env file, and npm run test:db calls scripts/test-db.mjs to confirm the MongoDB connection, so a bad connection string fails there instead of inside a sign-up form. The dev script is next dev --turbopack, and the app answers on http://localhost:3000.

BETTER_AUTH_SECRET signs sessions, and .env.example says the app refuses to run auth in production without it. The suggested way to generate one:

bash
openssl rand -hex 32

Welcome emails, alerts and the weekly digest are Inngest jobs. Locally, .env.example says to run the Inngest dev server instead of setting production keys:

bash
npx inngest-cli@latest dev

NEXT_PUBLIC_OPENSTOCK_DATA_MODE is frozen into the build

Every variable in .env is read at runtime except the NEXT_PUBLIC_ ones, which Next.js fixes when the app is built. OpenStock has exactly one such setting that matters: the data mode. Its value is either cached (hourly quotes, the default) or realtime (every 15 seconds, with price alerts).

The Dockerfile declares it as a build argument and defaults it to cached, and docker-compose.yml passes it through from .env:

yaml
    build:
      context: .
      args:
        # Fixed into the app at build time; set it in .env, then rebuild
        NEXT_PUBLIC_OPENSTOCK_DATA_MODE: ${NEXT_PUBLIC_OPENSTOCK_DATA_MODE:-cached}

The consequence is easy to miss. Editing .env and restarting the container does not switch an existing image to realtime. You have to rebuild. Someone pulling the prebuilt image from GitHub Container Registry gets whatever mode that image was built with, so a self-hoster who wants alerts should plan to build their own image rather than pull one. The Dockerfile comment also explains why secrets stay out of the build: FINNHUB_API_KEY is passed at runtime because anything under NEXT_PUBLIC_ would be recorded in the image layers.

Without INNGEST_SIGNING_KEY and INNGEST_EVENT_KEY, no alert or digest is sent

Background work in OpenStock runs through Inngest: the welcome email, the price checks every 5 minutes in realtime mode, and the AI-written news digest sent every Monday. In production, .env.example marks both INNGEST_SIGNING_KEY and INNGEST_EVENT_KEY as required, and states that without them no welcome emails, price alerts or weekly digest are sent.

Nothing in the web UI depends on those keys, so a deployment can look healthy while its alerting is dead. A user sets an alert above a target, the price crosses it, and no email arrives. Confirm both keys are present after the first deploy rather than assuming the alerts work because the alert form saved.

Email itself goes through Nodemailer with Gmail, and the newsletter through Kit. The AI text for the welcome email and the digest comes from Gemini by default (GEMINI_MODEL=gemini-2.5-flash-lite in .env.example), with MiniMax or Siray as alternatives selected through AI_PROVIDER. A configured provider is also used as a fallback. That is four external accounts (Finnhub, Inngest, Gmail and an AI provider) before every feature in a self-hosted copy works.

The Compose file keeps MongoDB off the host network

docker-compose.yml defines two services: openstock, built from the local Dockerfile on node:22-alpine and exposed on port 3000, and mongodb on the mongo:7 image with a named volume, mongo-data, mounted at /data/db. The app waits for a mongosh ping healthcheck before it starts.

MongoDB publishes no port. Only the app reaches it, over the Compose network. A comment in the file says that to use mongosh or Compass from your machine you add ports: ["127.0.0.1:27017:27017"], and warns that a bare "27017:27017" exposes it on every interface. That default is the right one for a server on a public IP.

One trap sits in the root password. MONGO_INITDB_ROOT_PASSWORD falls back to example if MONGO_ROOT_PASSWORD is not set in .env, and the comment notes it is only read on the first start. Set it before the first start and use the same password in MONGODB_URI. Changing it afterwards does nothing to the existing mongo-data volume, so a forgotten default stays in place until you reset the database yourself.

Finnhub key rotation and the 50-stock watchlist ceiling

Finnhub is the only quote source, and its free tier is the limit a self-hoster hits first. .env.example accepts several free keys as a comma-separated FINNHUB_API_KEYS value and rotates them, with each key adding 60 requests per minute:

bash
FINNHUB_API_KEY=
# FINNHUB_API_KEYS=key_one,key_two

Realtime mode polls every 15 seconds, so a household instance with a few accounts and full watchlists burns through those requests faster than the hourly cached mode. Each watchlist holds up to 50 stocks and is saved to the account in MongoDB.

Search covers every exchange Finnhub covers, opened with Cmd+K, and stocks stay open as browser-style tabs. The dashboard covers eight markets: US, India, Germany, Canada, Australia, Saudi Arabia, Crypto and Forex. The sentiment card (Reddit, X, news and Polymarket) only appears with an ADANOS_API_KEY, so a minimal install shows stock pages without it.

AGPL-3.0, date-tagged releases and the Next.js 15 stack you inherit

OpenStock is licensed under AGPL-3.0. That licence matters most to anyone who modifies the code and runs it as a service for others, because the AGPL extends source-sharing obligations to network use. A private instance for yourself is a different case from a public fork with changes; read the licence text before launching the second.

Releases are tagged by date rather than by version number: v2026.10.25 on 2026-10-25 and v2026.10.18 (October 2026 update) on 2026-10-18. The last push to main was on 2026-10-31. package.json still says version 0.1.0, so track the release tags and the in-app changelog, not the package version, to see what changed.

The stack is pinned: next 15.5.28, react 19.1.0, better-auth ^1.7.10, mongoose ^8.19.0 and inngest ^4.21.0, with Tailwind CSS v4 and shadcn/ui on the front end. npm ci installs exactly what package-lock.json pins, which keeps builds reproducible but means a fork carries every upstream dependency bump as a merge. Tests run with vitest through npm run test. A railway.json and vercel.json sit at the repository root alongside the Dockerfile for other hosting routes.

Editorial conclusion

OpenStock suits individuals and small groups who want a free watchlist, TradingView charts and company pages, and who can run MongoDB, Inngest and a Finnhub key themselves. Anyone who needs alerts from the hosted site, guaranteed fresh quotes or a brokerage connection should not adopt it. Before deploying, decide on NEXT_PUBLIC_OPENSTOCK_DATA_MODE, because changing it later means a rebuild, and confirm INNGEST_SIGNING_KEY and INNGEST_EVENT_KEY are set, or no alert email will ever leave the server.

Frequently asked questions

How do I install OpenStock?

Clone https://github.com/Open-Dev-Society/OpenStock.git, run npm ci, copy .env.example to .env and fill in MONGODB_URI, BETTER_AUTH_SECRET and FINNHUB_API_KEY, then run npm run dev. You need Node.js 22 LTS, a MongoDB database and a free Finnhub key.

What is OpenStock?

OpenStock is a free, open-source, AGPL-3.0 web app for tracking stock prices, watchlists and company insights across eight markets, using Finnhub quotes and TradingView charts. It is community-built, is not a brokerage, and does not give financial advice.

Does the OpenStock community site send price alerts?

No. The community instance at openstock-ods.vercel.app refreshes quotes hourly and offers no price alerts. Email alerts need a self-hosted copy built with NEXT_PUBLIC_OPENSTOCK_DATA_MODE=realtime, or the OpenStock Cloud tier listed as coming soon.

Official sources

  1. Issues
  2. License: AGPL-3.0
  3. Open-Dev-Society/OpenStock on GitHub
  4. Project website
  5. README
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/open-dev-society-openstock.svg)](https://hysenlabs.com/projects/open-dev-society-openstock)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/open-dev-society-openstock.svg)](https://hysenlabs.com/projects/open-dev-society-openstock)

Was this useful?