This project consists of two main parts: a Dashboard and a Tracker.
- Dashboard: A Next.js server that visualizes Node.js metrics.
- Tracker: A reusable package that sends Node.js metrics to the Dashboard.
The dashboard is a Next.js server that runs on port 9090 and exposes APIs to collect metrics.
-
Navigate to the
dashboardfolder:cd dashboard -
Install dependencies:
npm install
-
Start the development server:
npm run dev
-
The server will be accessible at: http://localhost:9090
The tracker is a Node.js package that can be installed in any project to send metrics to the dashboard.
-
Move the tracker package(tracker-1.0.0.tgz) to the root of the project you want to monitor. For example, if your project runs on localhost:3000:
-
Install the package:
npm install ./tracker-1.0.0.tgz
-
Import and activate the tracker in your project. For example, in your Next.js layout.tsx:
import { activateMetrics } from "tracker"; activateMetrics(); -
Once activated, metrics from this project will be sent to the dashboard for visualization:
Important: Do not call
activateMetricsin client-side code, as it only works in Node.js.
Note:
This is a test prototype. Currently, it uses setTimeout for sending metrics, but in the future it will be replaced with a proper socket server.
The dashboard uses Chart.js ("chart.js": "^4.5.1") — special thanks to this cool library!
This project is mainly for learning purposes.



