feat: integrate all 10 skills into homelab-topology

- Added api-security-hardening (helmet, rate limits)
- Added nodejs-backend-patterns (error handling)
- Added observability-monitoring (pino logging)
- Added websocket-engineer (socket.io real-time updates)
- Added docker (Multi-stage build, compose)
- Added vitest (testing configuration and store tests)
- Added data-visualizer (MetricsBar and HostChart)
- Added infrastructure-monitoring/proxmox-admin/network-engineer types
- Fixed UI accessibility and styling
- Cleaned up node_modules tracking
This commit is contained in:
2026-02-20 20:35:08 -08:00
parent 3dc5d236a2
commit 6dd679b8e0
14455 changed files with 3862 additions and 2194786 deletions

36
server/errors.ts Normal file
View File

@@ -0,0 +1,36 @@
/**
* Custom Error Classes for Homelab Topology API
*
* Structured error hierarchy following nodejs-backend-patterns skill.
* All operational errors extend AppError with appropriate HTTP status codes.
*/
export class AppError extends Error {
constructor(
public message: string,
public statusCode: number = 500,
public isOperational: boolean = true
) {
super(message);
Object.setPrototypeOf(this, AppError.prototype);
Error.captureStackTrace(this, this.constructor);
}
}
export class NotFoundError extends AppError {
constructor(message: string = 'Resource not found') {
super(message, 404);
}
}
export class ValidationError extends AppError {
constructor(message: string, public errors?: Array<{ field: string; message: string }>) {
super(message, 400);
}
}
export class ServiceUnavailableError extends AppError {
constructor(message: string = 'Service temporarily unavailable') {
super(message, 503);
}
}