saas/stack-dashboard
  • JavaScript 100%
Find a file
Joseph 54e089975c docs(stack-dashboard): add GDAP status plan 2026-04-02
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 14:19:36 -05:00
config feat(billing): add Other category 2026-04-02 10:53:41 -05:00
docs/superpowers/plans docs(stack-dashboard): add GDAP status plan 2026-04-02 2026-04-11 14:19:36 -05:00
public feat(ui): swap favicon to PCT gear icon (red on transparent) 2026-04-02 10:20:21 -05:00
src feat: add RustDesk device registry 2026-04-09 17:09:13 -05:00
tests feat(gdap): add GroupsAdmin and SharePointAdmin checks to permission audit tool 2026-04-02 09:52:34 -05:00
.env.example feat(k1-stack-dashboard): add pax8 and m365 MCP server integration 2026-03-07 02:30:54 -06:00
.gitignore feat(reconciliation): add seed script for MID spreadsheet import 2026-03-30 13:19:59 -05:00
jest.config.js Add SPEC, src/ modules, tests; fix MCP status panel (int#10) 2026-03-07 08:58:18 -06:00
package-lock.json feat(reconciliation): add seed script for MID spreadsheet import 2026-03-30 13:19:59 -05:00
package.json feat(reconciliation): add seed script for MID spreadsheet import 2026-03-30 13:19:59 -05:00
README.md feat(k1-stack-dashboard): add pax8 and m365 MCP server integration 2026-03-07 02:30:54 -06:00
server.js feat: add RustDesk device registry 2026-04-09 17:09:13 -05:00
server.js.bak Initial commit: import from SharePoint restructure 2026-03-06 23:24:51 -06:00
SPEC.md Add SPEC, src/ modules, tests; fix MCP status panel (int#10) 2026-03-07 08:58:18 -06:00
test_prompts.md chore: add chat tool test prompts 2026-03-12 11:23:48 -05:00

k1-stack-dashboard

Internal MSP stack dashboard. Port 3007. Single-file Express server at server.js.

Two dashboard sections:

Section Refresh rate Trigger
Connectivity 60-second auto-refresh Automatic
Live Metrics 5-minute server-side cache Page load + manual "Refresh Metrics" button

Connectivity section

Polls each platform API to confirm credentials are valid and the service is reachable. One card per platform. Refreshes every 60 seconds automatically.

Live Metrics section

Fetches real operational metrics from 8 platforms in parallel on the server, caches results for 5 minutes. Client receives cached data instantly on page load.

Platform Metrics
Datto RMM Online devices, offline devices, critical alerts, warning alerts
Autotask Open tickets, new this week, SLA response breaches
IT Glue Orgs, configs, passwords, contacts, domains, SSL certs
SaaS Alerts Billing users, total clients, total alerts
Microsoft 365 Licensed users, total users, Secure Score % (MSP tenant only)
Pax8 Company count, active subscriptions, monthly spend
RingCentral Active users, calls today
myITprocess Client count, review meeting count

Note: Inky has no public API and is not included. M365 metrics are single-tenant (MSP tenant). Multi-tenant license data is at port 3000 (pct-license-dashboard).


Environment variables

Copy .env.example to .env and fill in credentials.

Variable Platform Notes
DATTO_RMM_API_URL Datto RMM e.g. https://merlot-api.centrastage.net
DATTO_RMM_API_KEY Datto RMM OAuth2 client ID
DATTO_RMM_API_SECRET Datto RMM OAuth2 client secret
AUTOTASK_USERNAME Autotask API user email
AUTOTASK_SECRET Autotask API user secret
AUTOTASK_TRACKING_ID Autotask Integration tracking identifier
AUTOTASK_ZONE_URL Autotask Base REST URL (zone-specific)
SAAS_ALERTS_API_KEY SaaS Alerts Header: api_key
ITGLUE_API_KEY IT Glue Header: x-api-key
ITGLUE_REGION IT Glue US or EU
MYITPROCESS_API_KEY myITprocess Header: MITP-API-KEY
M365_CLIENT_ID Microsoft 365 App registration client ID (cec32c1c-...)
M365_REFRESH_TOKEN Microsoft 365 Delegated refresh token — copy from license-dashboard .env (REFRESH_TOKEN). Same app reg, public delegated client (device code flow). 90-day rolling; re-sync from license-dashboard if M365 shows auth errors.
M365_TENANT_ID Microsoft 365 MSP AAD tenant GUID
PAX8_CLIENT_ID Pax8 OAuth2 client ID
PAX8_CLIENT_SECRET Pax8 OAuth2 client secret
RC_CLIENT_ID RingCentral Sourced from RC-AT tooling -- do not create a separate app
RC_CLIENT_SECRET RingCentral Sourced from RC-AT tooling
RC_JWT_TOKEN RingCentral JWT bearer token, sourced from RC-AT tooling

API endpoints

Endpoint Description
GET / Renders full dashboard HTML
GET /api/health Readiness probe
GET /api/check Connectivity check for all platforms
GET /api/metrics Returns cached metrics (5-min TTL)
GET /api/metrics/refresh Busts cache, returns fresh metrics

Running locally

npm install
node server.js

Server listens on port 3007 by default.


Deployment

Target: VMID 114 (PCT-NODEJS-PROD-14). Deploy via Runbook 11 in infrastructure/proxmox/runbooks.md.