character_forge / DEPLOYMENT_CHECKLIST.md
ghmk's picture
Initial deployment of Character Forge
5b6e956
# Character Forge - Deployment Checklist
## βœ… Pre-Deployment Cleanup Complete
Your project is now clean and ready for deployment!
### What Was Removed:
- βœ… **Output directories** (380 KB of generated images)
- βœ… **Test files** (test_female_tattoos, test_flux_pipeline)
- βœ… **Log files** (generation.log)
- βœ… **User-generated content** (character sheets, compositions)
- βœ… **Cache directories** (.library, __pycache__)
### Current Project Size:
**2.5 MB** - Perfect for HuggingFace deployment!
### Protected by .gitignore:
The following will NEVER be committed:
```
outputs/ # All output directories
*.png, *.jpg, *.jpeg # Generated images
*.log # Log files
.library/ # Cache
__pycache__/ # Python cache
.env, secrets.toml # API keys
```
---
## πŸš€ HuggingFace Deployment Steps
### 1. Create Space on HuggingFace
Go to: https://huggingface.co/spaces
**Settings:**
- Owner: `ghmk` (or your username)
- Space name: `character_forge`
- License: **`agpl-3.0`** ⚠️ IMPORTANT
- SDK: **Docker**
- Template: **Streamlit**
- Hardware: **CPU Basic (Free)**
- Visibility: Public or Private
### 2. Upload Files
**Required files only:**
```
character_forge_release/
β”œβ”€β”€ character_forge_image/ # Main app
β”‚ β”œβ”€β”€ app.py
β”‚ β”œβ”€β”€ config/
β”‚ β”œβ”€β”€ services/
β”‚ └── ui/
β”œβ”€β”€ .streamlit/
β”‚ └── config.toml
β”œβ”€β”€ Dockerfile
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ LICENSE
β”œβ”€β”€ NOTICE
β”œβ”€β”€ README.md
└── .gitignore
```
**DO NOT UPLOAD:**
- ❌ outputs/ directory
- ❌ .log files
- ❌ test files
- ❌ apply_agpl_license.py (utility, not needed)
- ❌ cleanup_for_deployment.py (utility, not needed)
### 3. Add Secret
**CRITICAL:** In Space Settings β†’ Repository Secrets:
- Name: `GEMINI_API_KEY`
- Value: Your actual API key
### 4. Wait for Build (3-5 minutes)
### 5. Test Your Deployment
Visit: `https://huggingface.co/spaces/ghmk/character_forge`
---
## πŸ“¦ GitHub Upload (Optional)
If you want to also put it on GitHub:
### Option A: Create New Repo on GitHub
1. Go to https://github.com/new
2. Repository name: `character-forge`
3. License: **GNU Affero General Public License v3.0**
4. Create repository
### Option B: Push to GitHub
```bash
cd D:/NBBLocal/character_forge_release
# Initialize git (if not already)
git init
# Add files (respects .gitignore)
git add .
# Commit
git commit -m "Initial release of Character Forge
- Multi-angle character sheet generation
- Composition assistant
- Gemini API and ComfyUI backends
- Licensed under GNU AGPL v3.0"
# Add remote
git remote add origin https://github.com/YOUR_USERNAME/character-forge.git
# Push
git branch -M main
git push -u origin main
```
The `.gitignore` file will automatically prevent outputs and generated content from being committed!
---
## πŸ”’ License Compliance
Your project is properly licensed under **GNU AGPL v3.0**:
βœ… LICENSE file contains full AGPL v3.0 text
βœ… NOTICE file explains user content ownership
βœ… README.md has AGPL badge and explanation
βœ… Source files have license headers
**What this means:**
- βœ“ Free for everyone to use
- βœ“ Users own their generated images
- βœ“ Must stay open source if modified
- βœ— Cannot be integrated into proprietary software
---
## 🧹 Running Cleanup Again
If you generate more test content, run the cleanup script again:
```bash
python cleanup_for_deployment.py
```
This script is safe to run anytime - it only removes generated content, never source code.
---
## πŸ“Š Project Statistics
**Before Cleanup:** 2.9 MB
**After Cleanup:** 2.5 MB
**Space Saved:** 0.4 MB
**Files Cleaned:**
- Output directories: 1
- Images: 0 (already clean)
- Logs: 0 (already clean)
- Cache: 0 (already clean)
---
## βœ… Final Checklist
Before deploying, verify:
- [ ] LICENSE file is GNU AGPL v3.0
- [ ] NOTICE file explains content ownership
- [ ] README.md has correct license badge
- [ ] .gitignore is in place
- [ ] No outputs/ directory exists
- [ ] No .log files present
- [ ] No test images remaining
- [ ] Dockerfile is present
- [ ] .streamlit/config.toml is present
- [ ] requirements.txt is present
- [ ] You have your GEMINI_API_KEY ready
**All set? Deploy now!**
See `HUGGINGFACE_DEPLOYMENT.md` for detailed deployment instructions.