#!/bin/bash echo "🌱 Seeding Deployed Database" echo "==============================" echo "" echo "This script will help you seed your deployed backend database with initial data." echo "" # Check if we have the backend URL BACKEND_URL="https://linguabot-transcreation-backend.hf.space" echo "🔍 Testing backend connection..." if curl -s "$BACKEND_URL/health" > /dev/null; then echo "✅ Backend is responding" else echo "❌ Backend is not responding. Please check your backend URL." exit 1 fi echo "" echo "📋 To seed your deployed database, you need to:" echo "" echo "1. Go to your Hugging Face Space: https://huggingface.co/spaces/linguabot/transcreation-backend" echo "2. Go to Settings → Repository secrets" echo "3. Make sure you have MONGODB_URI set with your MongoDB Atlas connection string" echo "" echo "4. Then run this command in your backend Space's terminal:" echo " npm run seed" echo "" echo "5. Or manually run:" echo " node seed-data.js" echo "" echo "📝 This will create:" echo " - Admin user: admin@example.com / admin123" echo " - Student user: student@example.com / student123" echo " - Tutorial tasks for Week 1" echo " - Weekly practice tasks for all 6 weeks" echo "" echo "🔗 After seeding, you can:" echo " - Log in with the test accounts" echo " - See tutorial tasks and weekly practice content" echo " - Create submissions and test the voting system" echo "" echo "Would you like to proceed with the seeding instructions above?"