Skip to content

Latest commit

 

History

25 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Real-time Trading Dashboard

Real-time crypto trading dashboard with a React + TypeScript frontend and a Node.js + Express backend.

Important: backend market data is mock/simulated (deterministic feed) for this assessment.

Project Overview

This project is a real-time cryptocurrency dashboard built for the frontend/fullstack assessment. It provides a live market view for curated tickers, a protected market workspace with candlestick charts and interval switching, and a protected alerts page for managing price alerts.

The frontend is built with React, TypeScript, Redux Toolkit, React Router, and Socket.IO client. The backend is built with Express, TypeScript, JWT-based mock authentication, REST endpoints, and Socket.IO for real-time quote and candle updates.

Project Structure

  • app: React frontend (Vite, Redux Toolkit, Socket.IO client, Chart.js)
  • server: Express backend (REST + Socket.IO, mock auth, in-memory alerts)
  • docker-compose.yml: deployment for separate frontend and backend images

Local Development

Prerequisites

  • Node.js 20+
  • npm 10+

1) Install dependencies

In one terminal:

cd server
npm install

In another terminal:

cd app
npm install

2) Run backend

cd server
npm run dev

Backend runs at http://localhost:5000.

3) Run frontend

cd app
npm run dev

Frontend runs at http://localhost:5173.

Docker Deployment (Separate FE and BE Images)

The repository includes:

  • app/Dockerfile
  • server/Dockerfile
  • docker-compose.yml

Build and start containers

docker compose up --build

Access services

Stop containers

docker compose down

Unit Tests

Frontend unit tests

cd app
npm test

Current frontend unit test includes format utilities in app/src/tests/unit.

Backend unit tests

cd server
npm test

Current backend unit tests include:

  • market validation logic
  • alerts service behavior

How to Calculate Test Coverage

Frontend coverage

cd app
npm run coverage

Backend coverage

cd server
npm run coverage

Vitest prints coverage summary in terminal and writes a coverage report folder.

Notes and Assumptions

  • Backend uses mocked authentication and in-memory alert storage.
  • Market feed is simulated for deterministic behavior during assessment.
  • Alerts are scoped by authenticated user token.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages