File size: 1,714 Bytes
4f163ba
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/bash

echo "🌱 Database Seeding Helper"
echo "=========================="
echo ""
echo "This script will help you seed your deployed backend database."
echo ""

# Check if backend is responding
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. Upload the seed-database.js file to your backend Space"
echo "5. Go to the Space's terminal and run:"
echo "   npm run seed"
echo ""
echo "5. Or if you prefer, you can run it directly:"
echo "   node seed-database.js"
echo ""
echo "πŸ“Š This will create:"
echo "  πŸ‘€ Admin user: admin@example.com / admin123"
echo "  πŸ‘€ Student user: student@example.com / student123"
echo "  πŸ“š Tutorial tasks: 3 tasks for Week 1"
echo "  πŸ“ Weekly practice: 6 tasks for Week 1"
echo "  πŸ“– Practice examples: 4 examples"
echo ""
echo "πŸ”— After seeding, you can:"
echo "  1. Log in with admin@example.com / admin123"
echo "  2. Log in with student@example.com / student123"
echo "  3. View tutorial tasks and weekly practice"
echo "  4. Create submissions and test the voting system"
echo ""
echo "⚠️  Note: Make sure your MONGODB_URI environment variable is set correctly in your Space settings."