Skip to content

jhawkins11/stocks-dashboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stocks Dashboard

This project consists of a Next.js frontend and an Express.js backend. The frontend displays stock data that is updated in real-time via a WebSocket connection to the backend.

View Demo

Prerequisites

  • Node.js
  • npm

Getting Started

Backend

  1. Navigate to the server directory:
cd server
  1. Install dependencies:
npm install
  1. Create a .env file in the server directory with the following content:
MYSQL_HOST=*your_mysql_host*
MYSQL_USER=*your_mysql_user*
MYSQL_PASSWORD=*your_mysql_password*
MYSQL_DATABASE=*your_mysql_database*
  1. Start the server:
npm run dev

The server will start on port 5000.

Frontend

  1. Navigate to the client directory:
cd client
  1. Install dependencies:
npm install
  1. Start the frontend:
npm run dev

The frontend will start on port 3000.

Testing

Backend

  1. Navigate to the server directory:
cd server
  1. Run tests:
npm test

Features

  • Simulated real-time stock data updates
  • Add stocks to a watchlist
  • Remove stocks from the watchlist
  • Filter stocks by watchlist

Technologies

Frontend

  • Next.js
  • React
  • Shadcn/ui
  • React Query
  • TypeScript
  • JavaScript

Backend

  • Express
  • MySQL
  • WebSocket
  • TypeScript
  • JavaScript

Screenshots

Home Page

License

Distributed under the MIT License. See LICENSE for more information.