A web-based tool for planning and visualizing server rack layouts with real-time power and HVAC capacity tracking.
- Interactive Rack Visualization: Drag and drop devices into rack positions
- Device Library: Pre-configured devices organized by category (Power, Network, Servers, Storage, Specialized)
- Unracked Devices Panel: Temporary holding area for devices without rack assignments
- Multi-Rack Support: Configure and manage multiple racks
- Real-Time Calculations:
- Power consumption tracking (includes unracked devices)
- HVAC heat load calculation (1W = 3.41 BTU/hr)
- Color-coded utilization warnings
- Import/Export: Save and load rack configurations as JSON
- Persistent Storage: Configurations automatically saved to browser localStorage
- REST API: POST endpoint to programmatically load configurations with automatic unracked device handling
- Frontend: Vue 3 (Composition API) + Vite
- Styling: Tailwind CSS
- Backend: Django + Django REST Framework
- Database: MySQL
- Drag & Drop: VueUse composables
- Node.js (v20 or higher)
- npm
- Python 3.8 or higher
- MySQL server
- Clone or navigate to the project directory:
cd racker- Install Node.js dependencies:
npm install- Set up Python virtual environment and install dependencies:
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt- Configure environment variables:
cp .env.example .env
# Edit .env to set your MySQL database credentials- Run database migrations:
npm run db:initRun the development server with hot-reload:
npm run devThe application will be available at http://localhost:5173
- Build the Vue application:
npm run build- Start the Django server:
npm run serverOr use the combined command:
npm startThe application will be available at http://localhost:3000
Note: Make sure your Python virtual environment is activated before running the server.
-
Configure Your Environment:
- Click "Configure" button
- Set number of racks, RU per rack, power capacity, and HVAC capacity
- Click "Save"
-
Add Devices:
- Browse the device library on the left sidebar
- Drag a device from the library
- Drop it into a rack at your desired position
- Devices automatically snap to RU boundaries
-
Unracked Devices (Right Panel):
- Devices without rack assignments appear in the "Unracked Devices" panel
- Useful when importing configurations via POST API without position data
- Drag devices from this panel into racks to assign positions
- View power consumption of unracked devices in utilization stats
-
Monitor Resources:
- View real-time power and HVAC utilization in the bottom-right panel
- Color indicators: Green (<70%), Yellow (70-90%), Red (>90%)
-
Save/Load Configurations:
- Click "Import/Export" button
- Export: Copy JSON or download as file
- Import: Paste JSON or upload a file
Load a configuration programmatically via POST:
curl -X POST http://localhost:3000/api/load \
-H "Content-Type: application/json" \
-d @your-config.jsonAutomatic Unracked Device Handling: When POSTing configurations, devices can be handled in three ways:
- In Racks: Devices with
positionandrackIdare placed directly in racks - Explicitly Unracked: Devices in the
unrackedDevicesarray appear in the Unracked Devices panel - Auto-Unracked: Devices in a top-level
devicesarray without position data automatically go to Unracked Devices
This makes it easy to import device lists where rack positions haven't been determined yet!
{
"configId": "unique-id",
"metadata": {
"createdAt": "2024-01-15T10:30:00Z",
"lastModified": "2024-01-15T14:22:00Z",
"description": "Optional description"
},
"settings": {
"totalPowerCapacity": 10000,
"hvacCapacity": 34100,
"ruPerRack": 42
},
"racks": [
{
"id": "rack-1",
"name": "Rack A1",
"devices": [
{
"deviceId": "cisco-c9300-48p",
"id": "cisco-c9300-48p",
"name": "Cisco Catalyst 9300 48-port",
"category": "network",
"ruSize": 1,
"powerDraw": 750,
"color": "#3498DB",
"position": 1,
"instanceId": "switch-1",
"customName": "Core Switch 1"
}
]
}
],
"unrackedDevices": [
{
"id": "dell-r750-2u",
"name": "Dell PowerEdge R750",
"category": "servers",
"ruSize": 2,
"powerDraw": 1400,
"color": "#8E44AD",
"instanceId": "server-unassigned-1",
"customName": "New Server - Needs Placement"
}
],
"devices": [
{
"id": "device-without-position",
"name": "Some Device",
"ruSize": 1,
"powerDraw": 100
}
]
}{
"id": "unique-device-id",
"name": "Device Name",
"category": "network|power|servers|storage|specialized",
"ruSize": 1,
"powerDraw": 750,
"color": "#3498DB",
"description": "Device description"
}Edit src/data/devices.json to add your own devices:
{
"categories": [
{
"id": "custom",
"name": "Custom Devices",
"devices": [
{
"id": "my-device",
"name": "My Custom Device",
"category": "custom",
"ruSize": 2,
"powerDraw": 500,
"color": "#FF5733",
"description": "Custom device description"
}
]
}
]
}Heat load is calculated 1:1 with power draw, converted to BTU/hr:
Heat Load (BTU/hr) = Power Draw (W) × 3.41
Utilization % = (Used / Capacity) × 100
- Green: < 70% capacity
- Yellow: 70-90% capacity
- Red: > 90% capacity
- VPS/Cloud Server: Copy files and run
npm start - Docker: (Add Dockerfile if needed)
- Production WSGI Server (recommended for production):
# Install gunicorn
pip install gunicorn
# Run with gunicorn
cd backend
gunicorn backend.wsgi:application --bind 0.0.0.0:3000Alternatively, use the provided startup script:
chmod +x start_server.sh
./start_server.shracker/
├── backend/ # Django backend
│ ├── manage.py # Django management script
│ ├── backend/ # Django project settings
│ └── api/ # REST API app
│ ├── models.py # Database models
│ ├── views.py # API views
│ └── urls.py # API routing
├── src/
│ ├── main.js # Vue entry point
│ ├── App.vue # Root component
│ ├── components/ # Vue components
│ ├── composables/ # State management
│ ├── data/ # Device library JSON
│ ├── utils/ # Utility functions
│ └── assets/ # Styles
├── public/ # Static assets
└── dist/ # Build output
- Ensure port 5173 is not in use
- Check Node.js version:
node --version(should be v20+)
- Ensure you ran
npm run buildfirst - Check that
dist/directory exists - Verify port 3000 is available
- Ensure Python virtual environment is activated
- Check Django is installed:
python -m django --version - Verify database connection in
.envfile
- Check browser console for errors
- Verify
src/data/devices.jsonis valid JSON - Check API endpoint:
http://localhost:3000/api/devices - Ensure Django server is running
- Verify MySQL server is running
- Check database credentials in
.envfile - Ensure database exists:
mysql -u root -p -e "CREATE DATABASE IF NOT EXISTS racker;" - Run migrations:
npm run db:init
ISC
For issues and questions, please refer to the documentation in claude.md and TODO.md.