Repository navigation
Expand file tree
/
Copy pathsetup_local.sh
More file actions
executable file
·66 lines (53 loc) · 2.23 KB
/
Copy pathsetup_local.sh
File metadata and controls
executable file
·66 lines (53 loc) · 2.23 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
#!/bin/bash
# Webtoon Hub - Local Setup Script
echo "🎯 Setting up Webtoon Hub locally..."
# Create project structure
echo "📁 Creating project structure..."
mkdir -p webtoon-hub/backend
mkdir -p webtoon-hub/frontend
# Setup Backend
echo "🐍 Setting up backend..."
cd webtoon-hub/backend
# Create requirements.txt
cat > requirements.txt << 'EOF'
fastapi==0.110.1
uvicorn==0.25.0
motor==3.3.1
python-dotenv>=1.0.1
pymongo==4.5.0
pydantic>=2.6.4
python-multipart>=0.0.9
EOF
# Create backend .env
cat > .env << 'EOF'
MONGO_URL=mongodb://127.0.0.1:27017
DB_NAME=webtoon_hub
CORS_ORIGINS=http://localhost:3000,http://127.0.0.1:3000
EOF
echo "Installing Python dependencies..."
pip install -r requirements.txt
# Setup Frontend
echo "⚛️ Setting up frontend..."
cd ../
npx create-react-app frontend
cd frontend
# Create frontend .env
cat > .env << 'EOF'
REACT_APP_BACKEND_URL=http://localhost:8001
EOF
echo "Installing Node.js dependencies..."
yarn add axios react-router-dom lucide-react tailwindcss class-variance-authority clsx tailwind-merge react-hook-form @hookform/resolvers zod sonner @craco/craco
# Install Radix UI components
yarn add @radix-ui/react-dialog @radix-ui/react-select @radix-ui/react-tabs @radix-ui/react-accordion @radix-ui/react-alert-dialog @radix-ui/react-aspect-ratio @radix-ui/react-avatar @radix-ui/react-checkbox @radix-ui/react-collapsible @radix-ui/react-context-menu @radix-ui/react-dropdown-menu @radix-ui/react-hover-card @radix-ui/react-label @radix-ui/react-menubar @radix-ui/react-navigation-menu @radix-ui/react-popover @radix-ui/react-progress @radix-ui/react-radio-group @radix-ui/react-scroll-area @radix-ui/react-separator @radix-ui/react-slider @radix-ui/react-slot @radix-ui/react-switch @radix-ui/react-toggle @radix-ui/react-toggle-group @radix-ui/react-tooltip
# Install dev dependencies
yarn add -D @craco/craco autoprefixer postcss tailwindcss
# Initialize Tailwind
npx tailwindcss init -p
echo "✅ Basic setup complete!"
echo ""
echo "📋 Next steps:"
echo "1. Copy the source files from the running app"
echo "2. Start MongoDB: mongod"
echo "3. Start backend: cd backend && uvicorn server:app --host 0.0.0.0 --port 8001 --reload"
echo "4. Start frontend: cd frontend && yarn start"
echo "5. Open http://localhost:3000"