AI & Finance #Open Source #FinTech #Database

OpenStock Open-Source Stock Market Backtesting System Installation and AI Strategy Integration Guide

OpenStock is a community-driven open-source stock platform, an alternative to expensive market tools.

8 min read/ Medium

Introduction

Today, a lot of financial information is locked behind paid subscriptions, so the arrival of OpenStock feels well timed. It is an open-source stock market platform released by Open Dev Society, built to break away from the lock-in of expensive tools.

OpenStock is more than just a price dashboard. It brings together Next.js 15, TradingView charts, Finnhub real-time data, and even AI-driven sentiment analysis plus personalized daily news briefings through Google Gemini. Most importantly, it is fully open-source and free. You can deploy it locally and keep control of your own financial data.


UI Demo

OpenStock core interface and real-time data display


Installation Guide: Deploy Your Own Finance Hub Locally

OpenStock supports quick startup with Docker, and it also supports manual installation. Choose whichever approach fits you best:

1. Use the Official Website (quick option)

Official demo

If you want a clean environment and a fast startup, Docker is the best choice.

bash
# Clone the project
git clone https://github.com/Open-Dev-Society/OpenStock.git
cd OpenStock

# Start the database and application
docker compose up -d mongodb && docker compose up -d --build
  • Access URL: http://localhost:3000
  • Tip: Docker will automatically start a MongoDB container for you, so you do not have to configure the database manually.

If you want to do secondary development, you can use pnpm or npm.

StepCommandDescription
Install dependenciespnpm installNode.js 20+ is recommended
Environment variablescp .env.example .envFill in your API keys (see the table below)
Verify DBpnpm test:dbConfirm that the MongoDB connection works
Start development versionpnpm devSupports fast startup with Turbopack

Core Setup: API Keys Configuration

To make OpenStock work fully, you need to prepare the following keys:

Variable NameSourcePurpose
NEXT_PUBLIC_FINNHUB_API_KEYFinnhubCore market data, news, company information
MONGODB_URILocal or AtlasData storage, user lists, authentication
GEMINI_API_KEYGoogle AIAI personalized emails and news summaries (optional)
BETTER_AUTH_SECRETCustomKeeps user login secure

Note: Variables with the NEXT_PUBLIC_ prefix are exposed to the browser. Make sure this type of API key, such as Finnhub, has a domain allowlist configured on the official platform.


Core Feature Guide

Step 1: Create Your Watchlist

  1. After registering and logging in, use Cmd + K to open the global search box.
  2. Search for the stocks you want to follow, such as AAPL, TSLA, or NVDA.
  3. Open the detail page, then click the star in the top-right corner to add it to your list.

Step 2: Go Deeper with Technical Analysis

OpenStock integrates cleanly with TradingView components:

  • Advanced charts: Supports candlesticks and technical indicators such as RSI, MACD, and more.
  • Heatmap: Quickly understand same-day market capital flows.
  • Company financials: View quarterly revenue and profitability directly on the page.

Step 3: AI Sentiment Analysis (Advanced)

If you configure ADANOS_API_KEY, OpenStock will analyze:

  • Social media: Tracks discussion momentum on Reddit and X.com.
  • News sentiment: Automatically judges whether current news is positive or negative for the stock price.
  • Prediction markets: References data from platforms such as Polymarket.

Step 4: Automated Workflows (Inngest)

OpenStock uses Inngest to handle background tasks:

  • Welcome emails: Automatically sends AI-generated personalized welcome content after registration.
  • Daily summary: Based on your Watchlist, it automatically compiles news every day at 12:00 noon and sends it to your inbox.

Why Choose OpenStock? (Our Manifesto)

We believe technology should belong to everyone. Knowledge should not be locked behind paywalls, and tools should not be trapped inside subscription models.

“OpenStock will always be free and open-source. We do not run ads, we do not sell data, and we run only on transparency and the strength of the community.” —— Open Dev Society Manifesto


FAQ and Troubleshooting

  • Delayed data display: Finnhub free-tier data may have a 15-minute delay. This is a limitation of the API provider.
  • AI features are not responding: Confirm that GEMINI_API_KEY is valid, and make sure the Inngest service is running (npx inngest-cli@latest dev).
  • Docker startup failed: Check whether port 27017 (MongoDB) or port 3000 is already being used by another program.

Related Links:


Disclaimer: OpenStock is a community-developed project, not a securities broker. All data is for reference only and does not constitute investment advice.