OpenStock is an open-source alternative to expensive market platforms. Track real-time prices, set personalized alerts, and explore detailed company insights —
OpenStock is an open-source alternative to expensive market platforms. Track real-time prices, set personalized alerts, and explore detailed company insights —
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.
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.
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.
Because the future belongs to those who build it openly.
Core
Auth & Data
Automation & Comms
Language composition
Prerequisites
Clone and install
git clone https://github.com/Open-Dev-Society/OpenStock.git
cd OpenStock
# choose one:
pnpm install
# or
npm install
Configure environment
.env file (see Environment Variables).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.
You can run OpenStock and MongoDB easily with Docker Compose.
Ensure Docker and Docker Compose are installed.
docker-compose.yml includes two services:
.env (see examples below). For the Docker setup, use a local connection string like:MONGODB_URI=mongodb://root:example@mongodb:27017/openstock?authSource=admin
# from the repository root
docker compose up -d mongodb && docker compose up -d --build
Notes
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:
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
NEXT_PUBLIC_ variables, remember they are exposed to the browser..env and Compose.…
Finnhub
NEXT_PUBLIC_FINNHUB_API_KEY and FINNHUB_BASE_URL (default: https://finnhub.io/api/v1).Adanos sentiment insights (optional)
ADANOS_API_KEY; optionally override the API host with ADANOS_API_BASE_URL.TradingView
i.ibb.co are allowlisted in next.config.ts.Better Auth + MongoDB
sign-in, sign-up, assets and Next internals.Inngest
app/user.created → AI-personalized Welcome Email0 12 * * * → Daily News Summary per usernpx inngest-cli@latest dev.Email (Nodemailer)
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:
See MARKET_SUPPORT.md for:
For the latest supported symbols and exchanges, see Finnhub's exchange list.
Package scripts
dev: Next.js dev server with Turbopackbuild: Production build (Turbopack)start: Run production serverlint: ESLinttest:db: Validate DB connectivityDeveloper experience
You belong here. Whether you’re a student, a self-taught dev, or a seasoned engineer — contributions are welcome.
If you discover a vulnerability:
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.
— 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