Initial scaffold: full-stack RackMapper application

Complete project scaffold with working auth, REST API, Prisma/SQLite
schema, Docker config, and React frontend for both Rack Planner and
Service Mapper modules. Both server and client pass TypeScript strict
mode with zero errors. Initial migration applied.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-21 21:48:56 -05:00
parent 61a4d37d94
commit 231de3d005
79 changed files with 12983 additions and 0 deletions

View File

@@ -0,0 +1,76 @@
import type { ModuleType } from '../types';
// ---- Port count defaults per module type ----
export const MODULE_PORT_DEFAULTS: Record<ModuleType, number> = {
SWITCH: 24,
AGGREGATE_SWITCH: 8,
ROUTER: 4,
FIREWALL: 8,
PATCH_PANEL: 24,
AP: 1,
MODEM: 2,
SERVER: 2,
NAS: 1,
PDU: 12,
BLANK: 0,
OTHER: 0,
};
// ---- U-height defaults per module type ----
export const MODULE_U_DEFAULTS: Record<ModuleType, number> = {
SWITCH: 1,
AGGREGATE_SWITCH: 2,
ROUTER: 1,
FIREWALL: 1,
PATCH_PANEL: 1,
AP: 1,
MODEM: 1,
SERVER: 2,
NAS: 4,
PDU: 1,
BLANK: 1,
OTHER: 1,
};
// ---- Module type display labels ----
export const MODULE_TYPE_LABELS: Record<ModuleType, string> = {
SWITCH: 'Switch',
AGGREGATE_SWITCH: 'Agg Switch',
MODEM: 'Modem',
ROUTER: 'Router',
NAS: 'NAS',
PDU: 'PDU',
PATCH_PANEL: 'Patch Panel',
SERVER: 'Server',
FIREWALL: 'Firewall',
AP: 'Access Point',
BLANK: 'Blank',
OTHER: 'Other',
};
// ---- Tailwind bg+border color per module type ----
export const MODULE_TYPE_COLORS: Record<ModuleType, { bg: string; border: string; text: string }> =
{
SWITCH: { bg: 'bg-blue-700', border: 'border-blue-500', text: 'text-blue-100' },
AGGREGATE_SWITCH: {
bg: 'bg-indigo-700',
border: 'border-indigo-500',
text: 'text-indigo-100',
},
MODEM: { bg: 'bg-green-700', border: 'border-green-500', text: 'text-green-100' },
ROUTER: { bg: 'bg-teal-700', border: 'border-teal-500', text: 'text-teal-100' },
NAS: { bg: 'bg-purple-700', border: 'border-purple-500', text: 'text-purple-100' },
PDU: { bg: 'bg-yellow-700', border: 'border-yellow-500', text: 'text-yellow-100' },
PATCH_PANEL: { bg: 'bg-slate-600', border: 'border-slate-400', text: 'text-slate-100' },
SERVER: { bg: 'bg-slate-700', border: 'border-slate-500', text: 'text-slate-100' },
FIREWALL: { bg: 'bg-red-700', border: 'border-red-500', text: 'text-red-100' },
AP: { bg: 'bg-cyan-700', border: 'border-cyan-500', text: 'text-cyan-100' },
BLANK: { bg: 'bg-slate-800', border: 'border-slate-700', text: 'text-slate-500' },
OTHER: { bg: 'bg-slate-600', border: 'border-slate-500', text: 'text-slate-100' },
};
// ---- U-slot height in px (used for layout calculations) ----
export const U_HEIGHT_PX = 28;
// ---- Default rack size ----
export const DEFAULT_RACK_U = 42;