Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

feat(03-01): rename system health routes to free /api/health namespace

Adam Eivy7c2a592ac238
diff --git a/client/src/services/api.js b/client/src/services/api.js
index 25a39e9a93..24aedbfe0b 100644
--- a/client/src/services/api.js
+++ b/client/src/services/api.js
@@ -41,8 +41,8 @@ async function request(endpoint, options = {}) {
}
// Health
-export const checkHealth = () => request('/health');
-export const getSystemHealth = (options) => request('/health/system', options);
+export const checkHealth = () => request('/system/health');
+export const getSystemHealth = (options) => request('/system/health/details', options);
// Apps
export const getApps = () => request('/apps');
diff --git a/server/index.js b/server/index.js
index f2bb75e54e..55ff680c7f 100644
--- a/server/index.js
+++ b/server/index.js
@@ -5,7 +5,7 @@ import { Server } from 'socket.io';
import { fileURLToPath } from 'url';
import { dirname, join } from 'path';
-import healthRoutes from './routes/health.js';
+import systemHealthRoutes from './routes/systemHealth.js';
import appsRoutes from './routes/apps.js';
import portsRoutes from './routes/ports.js';
import logsRoutes from './routes/logs.js';
@@ -171,7 +171,7 @@ app.use(express.urlencoded({ limit: '50mb', extended: true }));
app.set('io', io);
// API Routes
-app.use('/api', healthRoutes);
+app.use('/api/system', systemHealthRoutes);
app.use('/api/apps', appsRoutes);
app.use('/api/ports', portsRoutes);
app.use('/api/logs', logsRoutes);
diff --git a/server/routes/health.test.js b/server/routes/health.test.js
index 54b172ed81..43f436c2e2 100644
--- a/server/routes/health.test.js
+++ b/server/routes/health.test.js
@@ -1,14 +1,14 @@
import { describe, it, expect } from 'vitest';
import express from 'express';
import request from 'supertest';
-import healthRoutes from './health.js';
+import systemHealthRoutes from './systemHealth.js';
-describe('Health Routes', () => {
+describe('System Health Routes', () => {
const app = express();
- app.use('/api', healthRoutes);
+ app.use('/api/system', systemHealthRoutes);
it('should return health status', async () => {
- const response = await request(app).get('/api/health');
+ const response = await request(app).get('/api/system/health');
expect(response.status).toBe(200);
expect(response.body.status).toBe('ok');
diff --git a/server/routes/health.js b/server/routes/systemHealth.js
similarity index 97%
rename from server/routes/health.js
rename to server/routes/systemHealth.js
index b02f1261c8..0b20a20cd7 100644
--- a/server/routes/health.js
+++ b/server/routes/systemHealth.js
@@ -20,10 +20,10 @@ router.get('/health', async (req, res) => {
});
/**
- * GET /api/health/system - Comprehensive system health summary
+ * GET /api/system/health/details - Comprehensive system health summary
* Returns system metrics, app status, and CoS status for dashboard display
*/
-router.get('/health/system', async (req, res) => {
+router.get('/health/details', async (req, res) => {
const startTime = Date.now();
// Gather data in parallel