-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathquickstart.sh
More file actions
87 lines (78 loc) · 2.21 KB
/
quickstart.sh
File metadata and controls
87 lines (78 loc) · 2.21 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#!/bin/bash
# GitHub Insights Generator - Quick Start Script
# This script helps you get started with the project
echo "🚀 GitHub Insights Generator - Quick Start"
echo "=========================================="
echo ""
# Check Node.js
echo "✓ Checking Node.js..."
if ! command -v node &> /dev/null; then
echo "❌ Node.js is not installed. Please install Node.js 18+ from https://nodejs.org"
exit 1
fi
echo "✓ Node.js $(node --version) is installed"
echo ""
# Check npm
echo "✓ Checking npm..."
if ! command -v npm &> /dev/null; then
echo "❌ npm is not installed."
exit 1
fi
echo "✓ npm $(npm --version) is installed"
echo ""
# Install dependencies if not already installed
if [ ! -d "node_modules" ]; then
echo "📦 Installing dependencies..."
npm install
echo "✓ Dependencies installed"
echo ""
fi
# Create .env.local if it doesn't exist
if [ ! -f ".env.local" ]; then
echo "📝 Creating .env.local..."
cat > .env.local << EOF
# GitHub API Token (optional but recommended for higher rate limits)
# Get your token from: https://github.com/settings/tokens
# GITHUB_TOKEN=your_token_here
# Application URL
NEXT_PUBLIC_APP_URL=http://localhost:3000
EOF
echo "✓ .env.local created"
echo ""
fi
# Build check
echo "🏗️ Building project..."
npm run build > /dev/null 2>&1
if [ $? -eq 0 ]; then
echo "✓ Build successful!"
echo ""
else
echo "⚠️ Build had issues, but you can still run the dev server"
echo ""
fi
# Show next steps
echo "=========================================="
echo "✅ Setup Complete!"
echo ""
echo "📌 Next Steps:"
echo ""
echo "1. Start the development server:"
echo " npm run dev"
echo ""
echo "2. Open your browser:"
echo " http://localhost:3000"
echo ""
echo "3. Test with a GitHub username (e.g., 'octocat')"
echo ""
echo "=========================================="
echo ""
echo "📚 Documentation:"
echo " - README.md - Full documentation"
echo " - IMPLEMENTATION_GUIDE.md - Implementation details"
echo ""
echo "🔗 Quick Links:"
echo " - GitHub Docs: https://docs.github.com"
echo " - Next.js Docs: https://nextjs.org/docs"
echo " - Tailwind CSS: https://tailwindcss.com/docs"
echo ""
echo "Happy coding! 🎉"