#!/bin/bash # Pre-deployment checklist echo "🔍 Checking deployment readiness..." echo "" # Check if git initialized if [ ! -d ".git" ]; then echo "❌ Git not initialized. Run: git init" exit 1 fi echo "✅ Git initialized" # Check critical files exist files=( "backend/railway.json" "backend/Procfile" "backend/.env.railway.template" "frontend/vercel.json" "frontend/.env.vercel.template" "DEPLOYMENT.md" ) for file in "${files[@]}"; do if [ ! -f "$file" ]; then echo "❌ Missing: $file" exit 1 fi done echo "✅ All deployment configs present" # Check .gitignore if [ ! -f ".gitignore" ]; then echo "❌ Missing .gitignore" exit 1 fi echo "✅ .gitignore exists" # Check if .env files are gitignored if git check-ignore backend/.env >/dev/null 2>&1; then echo "✅ .env files properly ignored" else echo "⚠️ WARNING: .env files not ignored! Add to .gitignore" fi # Check backend dependencies if [ ! -f "backend/requirements.txt" ]; then echo "❌ Missing backend/requirements.txt" exit 1 fi echo "✅ Backend dependencies defined" # Check frontend dependencies if [ ! -f "frontend/package.json" ]; then echo "❌ Missing frontend/package.json" exit 1 fi echo "✅ Frontend dependencies defined" echo "" echo "🎉 Ready for deployment!" echo "" echo "Next steps:" echo "1. Push to GitHub: git push origin main" echo "2. Deploy backend to Railway" echo "3. Deploy frontend to Vercel" echo "4. Read DEPLOYMENT.md for detailed instructions"