# CloudVault v1.0 - Personal Cloud Backup System

## ⚠️ IMPORTANT: DO NOT SKIP THE INSTALLER!

**You MUST run the installer before starting the server.**

If you skip the installer and run `npm start` directly, the server will:
- ❌ Listen on `127.0.0.1:3000` (localhost only, wrong port)
- ❌ Not be accessible from mobile devices
- ❌ Not work correctly

**Always run the installer first!**

---

## Complete Installation Commands

**Copy and paste these commands (all at once):**

```bash
# 1. Download and extract
cd ~
wget http://vm6tgfyizy.preview.c24.airoapp.ai/assets/cloudvault-v1.0-final-TIMESTAMP.tar.gz
tar -xf cloudvault-v1.0-final-*.tar.gz
cd cloudvault-v1.0-final-*

# 2. Install dependencies
npm install

# 3. Run installer (MANDATORY - creates .env, database, admin user)
bash install/fresh-install.sh

# 4. Start server
npm start
```

**Expected output:**
```
Ready at http://0.0.0.0:5173/
```

**If you see `127.0.0.1:3000` instead, you skipped the installer!**

---

## Quick Start (Step by Step)

### 1. Extract Package
```bash
tar -xf cloudvault-v1.0-final-*.tar.gz
cd cloudvault-v1.0-final-*
```

### 2. Install Dependencies
```bash
npm install
```

### 3. Run Auto-Installer (MANDATORY)
```bash
bash install/fresh-install.sh
# OR
npm run install-cloudvault
```

The installer will:
- ✅ Auto-detect MySQL authentication (socket or password)
- ✅ Auto-detect your local IP address
- ✅ Generate security keys
- ✅ Create .env configuration file
- ✅ Run database migrations
- ✅ Create start-server.sh script
- ✅ Display network configuration

### 4. Start Server
```bash
./start-server.sh
```

### 5. Access Web Dashboard
Open your browser:
- Local: `http://localhost:5173`
- Network: `http://YOUR_LOCAL_IP:5173`

### 6. Complete Setup Wizard
1. Create admin account
2. Configure storage location
3. Verify installation

### 7. Pair Mobile Devices
1. Go to Dashboard → Devices
2. Click "Pair New Device"
3. Scan QR code with mobile app

## Features

✅ **Automatic Installation** - Zero networking knowledge required
✅ **End-to-End Encryption** - AES-256-GCM with client-side keys
✅ **Chunked Uploads** - Support for files up to 10GB
✅ **Device Pairing** - QR code pairing with 6-digit PIN
✅ **Backup Verification** - SHA-256 + CRC32 checksums
✅ **Web Dashboard** - Full management interface
✅ **Mobile Ready** - iOS and Android support

## Documentation

See `public/assets/docs/` for:
- System Overview
- Deployment Guide
- Mobile API Reference
- Android Integration Guide
- iOS Integration Guide
- Server Setup Guide

## Support

For issues or questions, see the documentation or check the GitHub repository.

## License

MIT License - See LICENSE file for details
