# 🚀 Bio Page Deployment Instructions

## ✅ **What's Included**
- `server.js` - Main application server
- `package.json` - Production dependencies only
- `data.json` - Your bio data
- `build/` - Built React application
- `uploads/` - Your uploaded images
- `.env.example` - Environment configuration template

## 🌐 **Deployment Steps**

### **Step 1: Upload Files**
Upload ALL files to your web host's public directory (usually `public_html` or `htdocs`)

### **Step 2: Install Dependencies**
SSH into your server and run:
```bash
npm install
```

### **Step 3: Configure Environment**
```bash
# Copy and edit environment file
cp .env.example .env
nano .env
```

**IMPORTANT**: Change these values in `.env`:
- `ADMIN_USERNAME` - Your admin username
- `ADMIN_PASSWORD_HASH` - Generate new hash (see below)
- `JWT_SECRET` - Random secret key

### **Step 4: Generate Password Hash**
```bash
# Install bcryptjs globally
npm install -g bcryptjs

# Generate hash for your password
node -e "console.log(require('bcryptjs').hashSync('YOUR_PASSWORD', 10))"
```

### **Step 5: Start Application**
```bash
# For hosts with PM2
pm2 start server.js --name "bio-page"

# For hosts with forever
forever start server.js

# For simple hosts
nohup node server.js > app.log 2>&1 &
```

## 🔧 **Web Host Specific Setup**

### **Shared Hosting (cPanel)**
1. Upload files via File Manager
2. Use Terminal (if available) for npm install
3. Set up Node.js app in cPanel
4. Point to `server.js` as entry point

### **VPS/Cloud (DigitalOcean, AWS, etc.)**
1. SSH into server
2. Upload files via scp/rsync
3. Install Node.js if not installed
4. Follow steps above
5. Use PM2 for process management

### **Heroku**
1. Create new Heroku app
2. Set environment variables in dashboard
3. Deploy via Git or GitHub integration

## 🌍 **Domain Setup**
Your bio page will be available at:
- **Bio Page**: `https://yourdomain.com`
- **Admin**: `https://yourdomain.com/admin`

## 🔒 **Security Notes**
- ✅ Change default admin credentials
- ✅ Use strong JWT secret
- ✅ Keep uploads folder writable
- ✅ Regular backups of `data.json`

## 📱 **Features Working**
- ✅ Responsive mobile design
- ✅ Auto-save admin interface
- ✅ Image uploads
- ✅ Social media links
- ✅ YouTube video section
- ✅ Products showcase
- ✅ SEO optimization

## 🆘 **Troubleshooting**
- **Port issues**: Most hosts use port 3000 or 8080
- **File permissions**: Ensure uploads folder is writable (755)
- **Node version**: Requires Node.js 14+
- **Memory**: App uses ~50MB RAM

## 📞 **Support**
- Check `app.log` for errors
- Verify all files uploaded correctly
- Test with curl: `curl http://yourdomain.com/api/bio` 