Skip to content

mthinhngn/stocktracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stock Tracker

A real-time stock monitoring dashboard. Enter a stock symbol and polling interval — the app fetches live market data from Finnhub and displays a running history table.

Preview

Stock Tracker UI

Tech Stack

  • Frontend — React, CSS3
  • Backend — Node.js, Express
  • API — Finnhub (real-time stock quotes)
  • DevOps — Docker, Docker Compose

Features

  • Live stock price polling at a user-defined interval (minutes + seconds)
  • Persistent history table with newest entries on top, capped at 20 per symbol
  • Multi-symbol support — monitor NVDA, then switch to AMD; History shows all
  • Manual refresh resets the countdown and fetches immediately
  • Stop, Clear, and History controls
  • Server-side rate limiting, request timeouts, input validation, and concurrency guards
  • API key never exposed to the frontend — all Finnhub calls go through the backend

Getting Started

Prerequisites

Setup

  1. Clone the repo
git clone https://github.com/mthinhngn/stocktracker.git
cd stocktracker
  1. Create a .env file in the backend/ folder
FINNHUB_API_KEY=your_api_key_here
  1. Start both containers
docker-compose up -d --build
  1. Open your browser
Frontend: http://localhost:3000
Backend:  http://localhost:5000

API Endpoints

Method Endpoint Description
POST /start-monitoring Begin polling a stock symbol
GET /history?symbol= Retrieve stored history
POST /refresh Immediate one-time fetch
POST /stop-monitoring Stop polling a symbol
GET /status List all symbols and rate limit usage
GET /health Health check

Environment Variables

Variable Description
FINNHUB_API_KEY Your Finnhub API key
PORT Backend port (default: 5000)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors