OpenStock is a community-built, open-source alternative to commercial stock market platforms like Bloomberg or Yahoo Finance. It provides real-time price tracking, personalized watchlists, detailed company profiles, and automated email summaries — all without subscription fees. Built with Next.js 15, TypeScript, and Tailwind CSS, it’s designed for individual investors, students, and developers who want full control over their financial data without vendor lock-in. The project aligns with the Open Dev Society’s manifesto: technology should be free, open, and accessible to everyone. Note that market data is sourced via Finnhub’s free tier (which may have delays) and this tool is not a brokerage or financial advisor.
What You Get
- Real-time stock tracking - Monitor live prices and historical charts using TradingView widgets integrated directly into the app, with support for technical indicators and candlestick patterns.
- Personalized watchlists - Users can create and save custom lists of stocks, with data stored securely in MongoDB and synced across sessions.
- Global search and Command+K palette - Instantly find stocks via a debounced, Finnhub-backed search bar with keyboard shortcut (Cmd/Ctrl + K) for fast navigation.
- AI-powered email automation - Receive personalized welcome emails and daily market summaries using Inngest and Google Gemini to analyze user watchlists and generate tailored content.
- Protected routes & authentication - Secure user sessions via Better Auth with email/password login, enforced through Next.js middleware to restrict access to dashboard features.
- Market overview dashboard - View heatmaps, top quotes, and trending news via embedded TradingView widgets for high-level market sentiment at a glance.
- Onboarding flow - Collect user preferences like country, risk tolerance, and investment goals to tailor the experience without requiring third-party sign-ins.
Common Use Cases
- Building a personal investment dashboard - Individual investors use OpenStock to track their portfolio without paying for premium financial services, leveraging free Finnhub data and custom alerts.
- Educational tool for finance students - Students learning market analysis use OpenStock to explore real-world stock data, charting tools, and financial metrics without licensing costs.
- Problem: Expensive market data → Solution: OpenStock - Users frustrated by subscription fees for platforms like Bloomberg Terminal or Alpha Vantage switch to OpenStock’s free, self-hosted alternative with comparable features.
- DevOps teams managing financial tools - Teams deploying open-source alternatives in-house use Docker Compose to run OpenStock alongside MongoDB and Inngest for automated reporting workflows.
Under The Hood
OpenStock is a Next.js-powered financial dashboard application designed to provide real-time stock market data, user watchlists, and customizable alerts. It combines modern web development practices with cloud-native deployment patterns to deliver a scalable and user-focused solution for financial tracking.
Architecture
OpenStock adopts a layered architecture that emphasizes separation of concerns and modular design to support its diverse feature set.
- Follows a monolithic structure with well-defined modules for authentication, data handling, and business logic
- Implements a service-oriented approach where core features like alerts and user management are encapsulated in dedicated components
- Uses Next.js App Router with nested layouts and server actions for efficient data fetching and updates
- Organizes code into clear UI, server action, and database layers with distinct responsibilities
Tech Stack
The project leverages a modern JavaScript/TypeScript ecosystem with a focus on developer experience and extensibility.
- Built with Next.js 15 and TypeScript for type safety, enhanced developer tooling, and scalable architecture
- Integrates MongoDB via Mongoose for data persistence and better-auth for authentication workflows
- Employs Inngest for workflow automation and background job processing to handle asynchronous tasks
- Utilizes Radix UI, Tailwind CSS, and TradingView widgets for rich UI components and visualization
Code Quality
OpenStock demonstrates solid code organization, consistent patterns, and effective error handling practices.
- Implements robust server actions with proper error handling and database revalidation to ensure data integrity
- Maintains consistent naming conventions and follows TypeScript best practices with strict typing
- Includes utility functions for data processing, API interactions, and formatting to reduce redundancy
- Organizes UI components separately from business logic with clear module boundaries
What Makes It Unique
OpenStock distinguishes itself through its integration of automation, AI-powered features, and community-driven development.
- Combines real-time financial data with AI-driven email automation using Inngest and Gemini API for intelligent notifications
- Implements sophisticated user re-engagement workflows that detect inactive users and trigger personalized emails
- Features a multi-provider fallback system for AI services, supporting both Gemini and Siray.ai for resilience
- Integrates comprehensive stock alerting with automatic trigger detection and notification systems for proactive monitoring