forked from the-mayankjha/hashtribe
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·67 lines (55 loc) · 1.57 KB
/
setup.sh
File metadata and controls
executable file
·67 lines (55 loc) · 1.57 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/bin/bash
# HashTribe Quick Setup Script
# This script automates the initial setup process
set -e
echo "🔷 HashTribe Setup Script"
echo "=========================="
echo ""
# Check prerequisites
echo "📋 Checking prerequisites..."
if ! command -v node &> /dev/null; then
echo "❌ Node.js is not installed. Please install Node.js 18+ first."
exit 1
fi
if ! command -v pnpm &> /dev/null; then
echo "❌ pnpm is not installed. Installing pnpm..."
npm install -g pnpm
fi
if ! command -v supabase &> /dev/null; then
echo "⚠️ Supabase CLI is not installed."
echo " Install it with: brew install supabase/tap/supabase (macOS)"
echo " Or visit: https://supabase.com/docs/guides/cli"
exit 1
fi
echo "✅ All prerequisites are installed"
echo ""
# Install dependencies
echo "📦 Installing dependencies..."
pnpm install
echo "✅ Dependencies installed"
echo ""
# Setup environment
if [ ! -f .env ]; then
echo "🔧 Creating .env file..."
cp .env.example .env
echo "✅ .env file created"
echo "⚠️ Please edit .env and add your Supabase credentials"
else
echo "✅ .env file already exists"
fi
echo ""
# Start Supabase
echo "🚀 Starting Supabase..."
echo " This will start a local Supabase instance with Docker"
echo ""
pnpm supabase:start
echo ""
echo "✅ Setup complete!"
echo ""
echo "📝 Next steps:"
echo " 1. Copy the Supabase credentials from above"
echo " 2. Edit .env and paste your credentials"
echo " 3. Configure GitHub OAuth (see README.md)"
echo " 4. Run: pnpm dev"
echo ""
echo "🎉 Happy coding!"