-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsetup-supabase.sh
More file actions
executable file
Β·49 lines (43 loc) Β· 1.58 KB
/
setup-supabase.sh
File metadata and controls
executable file
Β·49 lines (43 loc) Β· 1.58 KB
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
47
48
#!/bin/bash
# Supabase Setup Script for ReBin Pro
echo "π Setting up Supabase for ReBin Pro..."
# Check if .env file exists
if [ -f "frontend/.env" ]; then
echo "β οΈ .env file already exists. Backing up to .env.backup"
cp frontend/.env frontend/.env.backup
fi
# Create .env file
echo "π Creating .env file..."
cat > frontend/.env << 'EOF'
# Supabase Configuration
VITE_SUPABASE_URL=your_supabase_url_here
VITE_SUPABASE_ANON_KEY=your_supabase_anon_key_here
# API Configuration
VITE_API_BASE_URL=http://localhost:8000
EOF
echo "β
.env file created!"
echo ""
echo "π§ Next steps:"
echo "1. Go to your Supabase dashboard (https://supabase.com)"
echo "2. Create a new project or select existing project"
echo "3. Go to Settings β API"
echo "4. Copy your Project URL and anon public key"
echo "5. Update the .env file with your actual values:"
echo " - Replace 'your_supabase_url_here' with your Project URL"
echo " - Replace 'your_supabase_anon_key_here' with your anon key"
echo ""
echo "6. Set up the database schema:"
echo " - Go to SQL Editor in Supabase dashboard"
echo " - Copy and paste the contents of database/schema.sql"
echo " - Click Run to create all tables"
echo ""
echo "7. Configure authentication:"
echo " - Go to Authentication β Settings"
echo " - Set Site URL to: http://localhost:5179"
echo " - Add Redirect URL: http://localhost:5179/**"
echo " - Turn OFF email confirmations for development"
echo ""
echo "8. Restart your development server:"
echo " cd frontend && npm run dev"
echo ""
echo "π For detailed instructions, see SUPABASE_SETUP.md"