Marketing-Grade Operations Control Center with live Railway backend integration.
A sophisticated executive dashboard that transforms operational data into actionable intelligence. Built for luxury hospitality operations with real-time monitoring, performance analytics, and staff performance tracking.
β¨ Live KPI Monitoring
- Total alerts today with trend indicators
- Average response time in minutes
- Resolution rate percentage
π¨ Real-Time Alert Feed
- Scrolling list with urgency-based sorting
- Visual indicators for critical situations
- Time-elapsed tracking for each alert
- Issue-specific icons and color coding
π Performance Analytics
- Hourly alert distribution chart
- Peak time identification
- Historical trending visualization
π₯ Staff Performance
- Top responders leaderboard
- Medal system for top 3 performers
- Total claims per staff member
# 1. Install dependencies
npm install
# 2. Start development server
npm run dev
# 3. Open browser
# http://localhost:3000The dashboard automatically connects to your Railway backend:
https://grace-ai.up.railway.app/staff/dashboard-stats
grace-executive-dashboard/
βββ src/
β βββ main.jsx # React entry point
β βββ App.jsx # Root component
β βββ App.css # Global styles
β βββ index.css # Tailwind directives
β βββ components/
β βββ ExecutiveDashboard.jsx # Main dashboard
βββ index.html # HTML template
βββ package.json # Dependencies
βββ vite.config.js # Build config
βββ tailwind.config.js # Tailwind config
βββ postcss.config.js # PostCSS config
Background: slate-900/800 (dark gradient)
Cards: slate-800/50 (glassmorphism)
Emerald: Success, resolved states
Amber: Warnings, medium urgency
Red: Critical alerts, emergencies
Blue: Information, in-progress- Font: Inter (300, 400, 500, 600, 700)
- Headers: Light weight for elegance
- Metrics: Large numerals with subtle units
- Critical alerts pulse effect
- Smooth card hover transitions
- Real-time data refresh
- Progress bar animations
{
"totalAlerts": 47,
"avgResponseTime": 5.2,
"resolvedCount": 32,
"alerts": [
{
"room": "101",
"guest": "Alex Knight",
"issue": "Medical Alert",
"status": "PENDING",
"created_at": "2025-01-27T10:30:00Z",
"claimed_by": null
}
],
"topResponders": [
{
"name": "Marcus Rivera",
"claims": 23
}
]
}If your backend only returns alerts, metrics are calculated client-side:
{
"alerts": [
{
"room": "101",
"guest": "Alex Knight",
"issue": "Medical Alert",
"status": "PENDING",
"created_at": "2025-01-27T10:30:00Z",
"claimed_by": "Staff Name"
}
]
}Edit src/components/ExecutiveDashboard.jsx:
const API_BASE = 'https://your-api.up.railway.app';const interval = setInterval(fetchDashboardData, 5000); // 5 secondsif (diffMins > 30) return 'critical'; // Change threshold
if (diffMins > 15) return 'high'; // Change threshold
if (diffMins > 5) return 'medium'; // Change thresholdEdit tailwind.config.js:
theme: {
extend: {
colors: {
grace: {
gold: '#C6A661',
charcoal: '#2B2B2B',
},
},
},
}npm i -g vercel
vercel --prodEnvironment variables are not needed as API URL is hardcoded.
npm run build
netlify deploy --prod --dir=distCreate railway.toml:
[build]
builder = "nixpacks"
buildCommand = "npm install && npm run build"
[deploy]
startCommand = "npm run preview"
restartPolicyType = "on_failure"FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
EXPOSE 3000
CMD ["npm", "run", "preview"]npm run dev # Start dev server (port 3000)
npm run build # Build for production
npm run preview # Preview production build
npm run lint # Run ESLint- React 18.2 - UI library
- Vite 5.0 - Build tool
- Tailwind CSS 3.4 - Styling
- Lucide React - Icon system
- PostCSS - CSS processing
- Check browser console for errors
- Verify Railway backend is accessible
- Test API endpoint directly in browser
- Check CORS configuration
Add to your FastAPI backend:
from fastapi.middleware.cors import CORSMiddleware
app.add_middleware(
CORSMiddleware,
allow_origins=["*"],
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)- Verify API returns valid JSON
- Check data structure matches expected format
- Look for JavaScript errors in console
- Ensure alerts array is not empty
# Rebuild Tailwind classes
npm run build
# Clear browser cache
# Hard refresh: Ctrl+Shift+R (Windows) or Cmd+Shift+R (Mac)- Component-level data fetching
- Efficient array operations
- 5-second polling (configurable)
- Dynamic chart rendering
- Smooth animations with CSS
- Main bundle: ~150KB (gzipped)
- Vendor bundle: ~140KB (gzipped)
- Total initial load: ~290KB
Critical (30+ minutes pending)
- Pulsing red border animation
- High-priority sorting
- "CRITICAL" badge
High (15-30 minutes pending)
- Amber border gradient
- Medium-priority sorting
Medium (5-15 minutes pending)
- Standard display
- Normal sorting
Normal (< 5 minutes)
- Clean card design
- Time-based sorting
- π¨ Medical/Emergency (red)
- π§ Water/Leak (blue)
- βοΈ AC/Temperature (cyan)
- π Noise/Complaint (amber)
- π General (gray)
β
Error handling with user-friendly messages
β
Loading states with animations
β
Responsive design (320px to 4K)
β
Connection status indicator
β
Auto-refresh functionality
β
Optimized bundle size
β
Accessibility features
β
Browser compatibility
β
Mobile-optimized layout
β
Fast refresh in development
Private project for GRACE AI operations.
For technical support or deployment assistance, refer to:
RAILWAY-DEPLOYMENT.md- Detailed deployment guide- Railway dashboard - Backend logs and metrics
- Browser DevTools - Frontend debugging
Built for GRACE AI | Luxury Hospitality Operations | The AI Conciergeβ’