# Clean SamCloud Music App Setup Guide

This guide explains how to set up a clean version of the SamCloud Music App for deployment on a new server.

## Essential Files and Directories

These files and directories are required for the application to function:

### Core Application
- `src/` - Frontend source code
- `server/` - Backend server code
- `public/` - Static assets
- `package.json` - Frontend dependencies and scripts
- `server/requirements.txt` - Backend dependencies
- `index.html` - Main HTML file
- `vite.config.ts` - Frontend build configuration
- `tsconfig*.json` - TypeScript configuration files

### Docker Configuration
- `docker-compose.yml` - Main Docker configuration
- `Dockerfile` - Backend Docker configuration
- `Dockerfile.ui` - Frontend Docker configuration

### Environment Configuration
- `.env` - Main environment variables
- `.env.production` - Production environment variables

## Files That Can Be Removed for Clean Deployment

These files are development/test related and can be removed for a clean production setup:

### Test Files
- `test_*.py` - Various test scripts
- `test_*.js` - Test scripts

### Deployment Scripts (GitHub Pages Specific)
- `deploy.sh` - GitHub Pages deployment script
- `deploy-production.sh` - Production deployment script
- `verify-production.sh` - Production verification script
- `copy404.js` - GitHub Pages 404 page setup

### Desktop Application Files
- `src-tauri/` - Tauri desktop application code
- Desktop packaging scripts in `scripts/` directory

### Development Artifacts
- `node_modules/` - Will be recreated with `yarn install`
- `dist/` - Will be recreated with `yarn build`
- `.cache/` - Cache directories
- `.vite/` - Vite cache
- `yarn.lock` - Can be regenerated

### Nginx Configuration (if not using custom nginx)
- `nginx.conf` - Custom nginx configuration
- `nginx.prod.conf` - Production nginx configuration
- `nginx-proxy-config.json` - Nginx proxy configuration

## Clean Setup Instructions

1. Copy the essential files listed above to your new server
2. Remove the files in the "Can Be Removed" section
3. Install dependencies:
   ```bash
   # Frontend dependencies
   yarn install
   
   # Backend dependencies
   pip install -r server/requirements.txt
   ```
4. Configure environment variables in `.env` and `.env.production`
5. Build the frontend:
   ```bash
   yarn build
   ```
6. Start the application with Docker:
   ```bash
   docker-compose up -d
   ```

## Girlfriend's Testing Setup

For your girlfriend's separate testing environment:

1. Use the files in `setup/` directory:
   - `docker-compose.girlfriend.yml` - Separate Docker configuration
   - `.env.girlfriend` - Separate environment variables

2. Follow the instructions in `docs/girlfriend-setup/GIRLFRIEND_TESTING.md`
