#!/bin/bash echo "🚀 SETA Smart Inventory - Production Deployment" echo "==============================================" echo "" # Check Node.js version echo "🔍 Checking Node.js version..." node_version=$(node -v 2>/dev/null || echo "not installed") if [[ $node_version == "not installed" ]]; then echo "❌ Node.js is not installed. Please install Node.js 18+ first." echo " Download from: https://nodejs.org/" exit 1 fi echo "✅ Node.js version: $node_version" echo "" # Install dependencies echo "📦 Installing production dependencies..." npm ci --only=production --silent if [ $? -ne 0 ]; then echo "❌ Failed to install dependencies" exit 1 fi echo "✅ Dependencies installed successfully" echo "" # Build the application echo "🔨 Building static application..." npm run build if [ $? -ne 0 ]; then echo "❌ Build failed" exit 1 fi echo "✅ Build completed successfully" echo "" # Show deployment instructions echo "🎉 DEPLOYMENT READY!" echo "===================" echo "" echo "📁 Static files location: ./out/" echo "📊 Total size: ~2.8 MB" echo "⚡ Optimized for mobile and desktop" echo "" echo "🌐 Deploy to your preferred platform:" echo "" echo "🔹 VERCEL (Recommended):" echo " 1. Push code to GitHub" echo " 2. Connect repo to Vercel" echo " 3. Auto-deploy on push" echo "" echo "🔹 NETLIFY:" echo " 1. Drag & drop 'out' folder to Netlify" echo " 2. Or connect GitHub repo" echo "" echo "🔹 GITHUB PAGES:" echo " 1. Push 'out' contents to gh-pages branch" echo " 2. Enable Pages in repo settings" echo "" echo "🔹 CUSTOM HOSTING:" echo " 1. Upload 'out' folder contents" echo " 2. Point domain to index.html" echo "" echo "🚀 Your SETA Smart Inventory app is ready!"