System Operations Guide

This comprehensive guide covers all system operations for the HostingCo management system, including startup, shutdown, monitoring, maintenance, and troubleshooting procedures.

System Startup

Development Environment

Quick Start (Verified)

# 1. Navigate to project root
cd /home/robbie/Desktop/HostingCo

# 2. Install all dependencies (if not already done)
npm run install:all

# 3. Start both frontend and backend servers
npm run dev

# 4. Verify services are running
curl http://localhost:3003/api/health
curl http://localhost:3000

Individual Service Startup

# Backend only (port 3003)
npm run dev:backend

# Frontend only (port 3000)
npm run dev:frontend
Verification: Backend health check should return status 200, and frontend should load at localhost:3000

🛑 System Shutdown

Graceful Shutdown

# Stop development servers
Ctrl+C (in terminal running npm run dev)

# Or stop individual processes
npm run stop:backend
npm run stop:frontend

Force Shutdown

# Kill processes if unresponsive
npm run kill:all

# Find and kill specific processes
lsof -ti:3003 | xargs kill -9  # Backend
lsof -ti:3000 | xargs kill -9  # Frontend

System Monitoring

Health Checks

# Backend health check
curl http://localhost:3003/api/health

# Database connection check
npm run health:db

# System resources check
npm run health:system

Log Monitoring

# View real-time logs
npm run logs:dev

# View specific service logs
npm run logs:backend
npm run logs:frontend

# View error logs only
npm run logs:errors

System Maintenance

Regular Maintenance Tasks

Daily: Check system logs and error rates
Weekly: Update dependencies and security patches
Monthly: Database optimization and cleanup
Quarterly: Security audit and performance review

Database Maintenance

# Database backup
npm run db:backup

# Database optimization
npm run db:optimize

# Clear old logs
npm run logs:cleanup