-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup_supabase.sh
More file actions
executable file
·50 lines (38 loc) · 1.86 KB
/
Copy pathsetup_supabase.sh
File metadata and controls
executable file
·50 lines (38 loc) · 1.86 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
49
50
#!/bin/bash
echo "Welcome to the Psychologist Web App Supabase Setup Assistant"
echo "Step 1: Create a Supabase Project"
echo "1. Go to https://supabase.com/ and sign up if you haven't already"
echo "2. Create a new project"
echo "3. Copy the Project URL and API Key"
echo "\nStep 2: Create a .env file"
cp .env.example .env
# Ask for Supabase credentials
read -p "Enter your Supabase Project URL: " SUPABASE_URL
read -p "Enter your Supabase API Key: " SUPABASE_KEY
# Update .env file
sed -i "" "s/your-supabase-url/$SUPABASE_URL/" .env
sed -i "" "s/your-supabase-key/$SUPABASE_KEY/" .env
echo "\nStep 3: Set up email credentials"
echo "Note: For Gmail, you'll need to generate an App Password"
echo "1. Go to your Google Account > Security > 2-Step Verification"
echo "2. Generate an App Password"
read -p "Enter your Gmail email address: " MAIL_USERNAME
read -s -p "Enter your Gmail App Password: " MAIL_PASSWORD
echo "\nStep 4: Set up OpenAI and ElevenLabs credentials"
echo "Note: You'll need API keys from OpenAI and ElevenLabs"
read -p "Enter your OpenAI API Key: " OPENAI_API_KEY
read -p "Enter your ElevenLabs API Key: " ELEVENLABS_API_KEY
# Update email and API credentials
sed -i "" "s/your-email@gmail.com/$MAIL_USERNAME/" .env
sed -i "" "s/your-email-app-password/$MAIL_PASSWORD/" .env
sed -i "" "s/your-openai-api-key/$OPENAI_API_KEY/" .env
sed -i "" "s/your-elevenlabs-api-key/$ELEVENLABS_API_KEY/" .env
# Generate a secure secret key
SECRET_KEY=$(openssl rand -hex 32)
sed -i "" "s/your-secret-key-here/$SECRET_KEY/" .env
echo "\nSetup complete! Your .env file has been configured."
echo "Next steps:"
echo "1. Install Python dependencies: pip install -r requirements.txt"
echo "2. Run the database migrations (if needed)"
echo "3. Start the backend server: uvicorn app.main:app --reload"
echo "4. Start the frontend development server: cd frontend && npm install && npm start"