{"id":48813311,"url":"https://github.com/ditectrev/open-source-stock-application","last_synced_at":"2026-05-26T09:01:37.851Z","repository":{"id":342579388,"uuid":"1170835426","full_name":"Ditectrev/Open-Source-Stock-Application","owner":"Ditectrev","description":"Open Source Stock Application developed by Ditectrev's Community.","archived":false,"fork":false,"pushed_at":"2026-05-18T07:33:23.000Z","size":1478,"stargazers_count":3,"open_issues_count":3,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-18T09:41:07.319Z","etag":null,"topics":["cursor","ditectrev","kiro","nextjs","stock-market","stock-prediction","stocks"],"latest_commit_sha":null,"homepage":"https://theopenstock.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ditectrev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-02T15:20:11.000Z","updated_at":"2026-05-18T07:32:59.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Ditectrev/Open-Source-Stock-Application","commit_stats":null,"previous_names":["ditectrev/stock-app","ditectrev/open-source-stock-application"],"tags_count":58,"template":false,"template_full_name":null,"purl":"pkg:github/Ditectrev/Open-Source-Stock-Application","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ditectrev%2FOpen-Source-Stock-Application","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ditectrev%2FOpen-Source-Stock-Application/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ditectrev%2FOpen-Source-Stock-Application/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ditectrev%2FOpen-Source-Stock-Application/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ditectrev","download_url":"https://codeload.github.com/Ditectrev/Open-Source-Stock-Application/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ditectrev%2FOpen-Source-Stock-Application/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33512327,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T03:12:49.672Z","status":"ssl_error","status_checked_at":"2026-05-26T03:12:47.976Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cursor","ditectrev","kiro","nextjs","stock-market","stock-prediction","stocks"],"created_at":"2026-04-14T10:00:58.822Z","updated_at":"2026-05-26T09:01:37.797Z","avatar_url":"https://github.com/Ditectrev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# The Open Stock — Free Stock Market Analysis Platform\n\n**Live app:** [https://theopenstock.com](https://theopenstock.com)\n\nThe Open Stock is a free, open source stock market application for individual long-term investors. Search any ticker, study interactive charts and technical indicators, review financials and analyst forecasts, scan sectors and heatmaps, follow economic and earnings calendars, and optionally use AI (local Ollama, your own API keys, or hosted plans) for predictions and daily stock ideas.\n\nBuilt with **Next.js**, **TypeScript**, and **Tailwind CSS**. Self-hostable on **Vercel**.\n\n## What you get\n\n| Area                   | Features                                                                      |\n| ---------------------- | ----------------------------------------------------------------------------- |\n| **Charts \u0026 quotes**    | Live prices, historical charts, key metrics, 52-week range                    |\n| **Technical analysis** | RSI, MACD, SMA/EMA, Bollinger Bands, sentiment labels                         |\n| **Fundamentals**       | Income statement, balance sheet, cash flow, valuation metrics                 |\n| **Forecasts**          | Analyst price targets and rating breakdowns                                   |\n| **Market tools**       | Sector hub, stock/ETF/crypto heatmaps, asset screener with presets            |\n| **Calendars**          | Economic events, earnings, dividends, IPOs                                    |\n| **Sentiment**          | CNN Fear \u0026 Greed Index, world markets overview                                |\n| **AI (optional)**      | Per-symbol AI prediction, daily stock-of-the-day buy/sell ideas, local Ollama |\n\n## Why this stock app?\n\nMost stock tools are expensive, ad-heavy, or locked behind paywalls. The Open Stock keeps core market data and charts free, with optional paid tiers for ads-free use and AI:\n\n- Real-time stock quotes and market data\n- Interactive charts with technical indicators (SMA, EMA, RSI, MACD, Bollinger Bands)\n- Financial statements: income, balance sheet, cash flow\n- Analyst forecasts and price targets\n- Seasonal performance heatmaps\n- Economic calendar with country flags and day-grouped events\n- Sector performance overview\n- World markets at a glance\n- Fear \u0026 Greed Index\n- Stock screener with built-in and custom presets\n- AI stock-of-the-day (buy + sell) and symbol-level AI predictions\n- Dark mode and mobile-friendly layout\n\nNo paywall for core features. No forced tracking. Run it yourself or use [theopenstock.com](https://theopenstock.com).\n\n## Screenshots\n\n\u003c!-- Add screenshots here --\u003e\n\n## Tech stack\n\n| Layer       | Technology                          |\n| ----------- | ----------------------------------- |\n| Framework   | Next.js 15 (App Router)             |\n| Language    | TypeScript                          |\n| Runtime     | Bun (or Node.js 18+)                |\n| Styling     | Tailwind CSS                        |\n| Auth        | Appwrite                            |\n| Database    | Appwrite                            |\n| Market Data | Yahoo Finance, Finnhub, FairEconomy |\n| Deployment  | Vercel                              |\n| Testing     | Vitest, Playwright                  |\n\n## Getting started\n\n### Prerequisites\n\n- Bun 1.0+ (or Node.js 18+)\n- Appwrite account and project (for auth)\n\n### Installation\n\n```bash\ngit clone https://github.com/Ditectrev/Open-Source-Stock-Application.git\ncd Open-Source-Stock-Application\n\nbun install\n\ncp .env.example .env.local\n# Edit .env.local — set NEXT_PUBLIC_SITE_URL for correct SEO canonical URLs\n\nbun dev\n```\n\nOpen [http://localhost:3000](http://localhost:3000).\n\n### Local Ollama from a deployed site\n\nThe Local AI tier uses Ollama at `http://localhost:11434`. When you run this app locally, the Next.js server can call Ollama directly. When you open a deployed URL, the browser must call Ollama on the user's machine, so Ollama must allow that site origin.\n\nInstall Ollama from [webinstall.dev/ollama](https://webinstall.dev/ollama/). Set `OLLAMA_ORIGINS` to your site origin (for production, `https://theopenstock.com`), then start Ollama with `ollama serve`:\n\n```bash\nOLLAMA_ORIGINS=\"https://theopenstock.com\" ollama serve\n```\n\n```bash\n# macOS Ollama desktop app\nlaunchctl setenv OLLAMA_ORIGINS \"https://theopenstock.com\"\n# Fully quit and restart Ollama after setting this.\n```\n\n```bash\n# Linux systemd service\nsudo systemctl edit ollama\n# Add:\n# [Service]\n# Environment=\"OLLAMA_ORIGINS=https://theopenstock.com\"\nsudo systemctl daemon-reload\nsudo systemctl restart ollama\n```\n\n```powershell\n# Windows PowerShell\nsetx OLLAMA_ORIGINS \"https://theopenstock.com\"\n# Restart Ollama after setting this.\n```\n\n```bash\n# Docker\ndocker run -e OLLAMA_ORIGINS=\"https://theopenstock.com\" -p 11434:11434 ollama/ollama\n```\n\nUse the exact origin from your browser address bar (scheme + host, no trailing slash).\n\nThe app asks Ollama for the locally installed model list and uses the most recently modified model. If no models are installed, run e.g. `ollama pull llama3.2`.\n\nIf `ollama serve` shows `127.0.0.1:11434: bind: address already in use`, Ollama is already running. Quit the existing process or see [ollama/ollama#707](https://github.com/ollama/ollama/issues/707).\n\n## Environment variables\n\n### Required\n\n| Variable                               | Description                           |\n| -------------------------------------- | ------------------------------------- |\n| `NEXT_PUBLIC_APPWRITE_ENDPOINT`        | Appwrite API endpoint                 |\n| `NEXT_PUBLIC_APPWRITE_PROJECT_ID`      | Appwrite project ID                   |\n| `APPWRITE_API_KEY`                     | Appwrite server-side API key          |\n| `APPWRITE_DATABASE_ID`                 | Appwrite DB for app data              |\n| `APPWRITE_COLLECTION_ID_AI_KEYS`       | Appwrite collection for keys          |\n| `APPWRITE_COLLECTION_ID_SUBSCRIPTIONS` | Appwrite collection for subscriptions |\n\nAlso required for trial features: `APPWRITE_COLLECTION_ID_TRIAL_SESSIONS`.\n\n### SEO \u0026 analytics (recommended for production)\n\n| Variable               | Description                                                                               |\n| ---------------------- | ----------------------------------------------------------------------------------------- |\n| `NEXT_PUBLIC_SITE_URL` | Canonical site URL for sitemap, Open Graph, and JSON-LD (e.g. `https://theopenstock.com`) |\n| `NEXT_PUBLIC_GTM_ID`   | Google Tag Manager container ID (optional)                                                |\n\n### Optional\n\n| Variable                             | Description                                                                     | Default                            |\n| ------------------------------------ | ------------------------------------------------------------------------------- | ---------------------------------- |\n| `FINNHUB_API_KEY`                    | Finnhub API key for higher-quality live quotes/search/candles                   | unset                              |\n| `FINNHUB_BASE_URL`                   | Finnhub API base URL                                                            | `https://finnhub.io/api/v1`        |\n| `YAHOO_FINANCE_API_URL`              | Yahoo Finance API base URL                                                      | `https://query1.finance.yahoo.com` |\n| `CACHE_TTL_SECONDS`                  | Cache TTL in seconds                                                            | `300`                              |\n| `RATE_LIMIT_MAX_REQUESTS`            | Max API requests per window                                                     | `100`                              |\n| `RATE_LIMIT_WINDOW_SECONDS`          | Rate limit window in seconds                                                    | `60`                               |\n| `LOG_LEVEL`                          | Logging level                                                                   | `info`                             |\n| `DEV_OVERRIDE_PRICING_TIER`          | Temporary non-prod tier override (`FREE`,`ADS_FREE`,`LOCAL`,`BYOK`,`HOSTED_AI`) | unset                              |\n| `DEV_OVERRIDE_PRICING_TIER_USER_IDS` | Optional comma-separated user IDs for scoped override                           | unset                              |\n| `STRIPE_SECRET_KEY`                  | Stripe secret API key (`sk_*`)                                                  | unset                              |\n| `STRIPE_WEBHOOK_SECRET`              | Stripe webhook signing secret (`whsec_*`)                                       | unset                              |\n| `STRIPE_PRICE_ADS_FREE`              | Stripe recurring price id for Ads-free tier                                     | unset                              |\n| `STRIPE_PRICE_LOCAL`                 | Stripe recurring price id for Local tier                                        | unset                              |\n| `STRIPE_PRICE_BYOK`                  | Stripe recurring price id for BYOK tier                                         | unset                              |\n| `STRIPE_PRICE_HOSTED_AI`             | Stripe recurring price id for Hosted AI tier                                    | unset                              |\n\nSee `.env.example` for the full list.\n\n### Appwrite AI keys database setup\n\n```bash\nbun run setup:appwrite:ai-keys\nbun run setup:appwrite:subscriptions\n```\n\n## Project structure\n\n```text\n├── app/            # Next.js App Router pages, metadata, sitemap, robots\n├── components/     # React components\n├── lib/            # Utilities, SEO helpers, caching\n├── services/       # API service layer\n├── types/          # TypeScript types\n├── e2e/            # Playwright end-to-end tests\n└── public/         # Static assets\n```\n\n## Features in detail\n\n### Stock analysis\n\nSearch any symbol (e.g. `AAPL`, `MSFT`) for overview, financials, technicals, forecasts, and seasonals. URL format: `/?symbol=TICKER`.\n\n### Economic calendar\n\nLive economic events grouped by day with country flags and importance filters (FairEconomy / ForexFactory feed).\n\n### Technical indicators\n\nSMA, EMA, RSI, MACD, and Bollinger Bands on interactive price charts.\n\n### Sector performance \u0026 heatmaps\n\nSector returns and visual heatmaps for stocks, ETFs, and crypto.\n\n### Stock screener\n\nPreset screens (growth, value, momentum, dividends) plus custom filters.\n\n### AI features\n\n- **AI prediction** on symbol pages (buy / sell / hold stance with context bullets)\n- **Stock of the day** — daily AI buy and sell ideas validated against market data\n- **Local AI** via [Ollama](https://ollama.com) on your machine\n\n## Scripts\n\n```bash\nbun dev              # Development server\nbun run build        # Production build\nbun start            # Production server\nbun run lint         # ESLint\nbun run format       # Prettier\nbun run test         # Unit tests (Vitest)\nbun run test:e2e     # E2E tests (Playwright)\n```\n\n## SEO\n\nProduction builds expose:\n\n- Page titles and meta descriptions (per route and per `/?symbol=` ticker)\n- Open Graph and Twitter Card tags\n- `robots.txt` and `sitemap.xml`\n- JSON-LD (`WebSite`, `Organization`, `WebApplication`)\n\nSet `NEXT_PUBLIC_SITE_URL=https://theopenstock.com` on Vercel so canonical URLs and the sitemap match your live domain.\n\nFor **GitHub Actions → Vercel** (`.github/workflows/deploy.yml`), add the same value as a **repository variable** `NEXT_PUBLIC_SITE_URL` so the deploy job can sync it to Vercel (optional for Preview if you prefer `VERCEL_URL` at build time—leave the variable empty for that environment).\n\n**Naming:** This product is **The Open Stock** at **theopenstock.com**. It is not affiliated with other projects named `OpenStock.` Meta keywords and the default description include phrases such as `OpenStock alternative` so people comparing open-source stock tools can find this repo—always use honest wording on landing pages and docs.\n\n## Contributing\n\nContributions are welcome. Please open an issue first to discuss what you'd like to change.\n\n## Keywords\n\nThe Open Stock, free stock app, stock market dashboard, stock charts, stock screener, technical analysis, RSI MACD Bollinger Bands, economic calendar, earnings calendar, sector heatmap, Fear and Greed Index, analyst forecasts, open source stock platform, AI stock prediction, Ollama investing, long term investing, self-hosted stock app, Next.js finance app, OpenStock alternative, OpenStock alternative free, openstock, free open source stock tracker, open source stock market app like OpenStock\n\n## License\n\nPrivate - All rights reserved\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fditectrev%2Fopen-source-stock-application","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fditectrev%2Fopen-source-stock-application","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fditectrev%2Fopen-source-stock-application/lists"}