# Release Notes - BMC Hub v1.0.0

**Release Date:** 17. december 2025  
**Release Tag:** `v1.0.0`  
**Gitea:** https://g.bmcnetworks.dk/ct/bmc_hub/releases/tag/v1.0.0

## 🎉 Første Production Release

Dette er den første officielle release af BMC Hub klar til production deployment.

## ✅ Hvad Er Inkluderet

### Core Application
- FastAPI backend med PostgreSQL database
- Kunder/companies management system
- Hardware tracking
- Billing integration med e-conomic
- vTiger CRM integration for time tracking
- Email workflow system
- Ticket management system
- Tag system
- Backup system

### Deployment Setup
- ✅ Production-ready Docker Compose konfiguration
- ✅ Automatisk deployment script
- ✅ Gitea integration for version-kontrolleret deployment
- ✅ Database migrations (init.sql)
- ✅ Health check endpoints
- ✅ Logging og monitoring ready

### Dokumentation
- `PRODUCTION_DEPLOYMENT.md` - Komplet deployment guide
- `PRODUCTION_QUICK_START.md` - TL;DR guide
- `DEPLOYMENT_CHECKLIST.md` - Step-by-step checklist
- `.env.prod.example` - Production environment template

## 🔒 Sikkerhed

- Safety switches enabled som default (ECONOMIC_READ_ONLY, DRY_RUN)
- No hardcoded credentials
- Gitea token-based deployment
- Environment-based configuration

## 📦 Deployment Test Resultat

✅ **Test Completed:** 17. december 2025, 16:52

```
Repository: ct/bmc_hub
Version: v1.0.0
Gitea Token: ✅ Verificeret

Downloaded Files:
✅ docker-compose.yml (1.9K)
✅ Dockerfile (1.3K) 
✅ requirements.txt (152B)
✅ migrations/init.sql (1.1K)

Directories Created:
✅ logs/
✅ uploads/
✅ data/invoice_templates/
✅ migrations/
```

## 🚀 Deployment Kommandoer

### På Din Mac (Done ✅)
```bash
git tag v1.0.0
git push origin v1.0.0
```

### På Production Server (Next Steps)
```bash
# 1. SSH til server
ssh user@your-server.com

# 2. Setup deployment directory
mkdir -p /srv/podman/bmc_hub_v1.0 && cd /srv/podman/bmc_hub_v1.0

# 3. Download deployment script
curl -H "Authorization: token 58419ee1f9503a95b58e56448db6f77a6caddff6" \
     https://g.bmcnetworks.dk/api/v1/repos/ct/bmc_hub/raw/scripts/deploy_production.sh?ref=v1.0.0 \
     -o setup.sh
chmod +x setup.sh

# 4. Opret .env fil
cat > .env << 'EOF'
RELEASE_VERSION=v1.0.0
GITEA_URL=https://g.bmcnetworks.dk
GITHUB_TOKEN=58419ee1f9503a95b58e56448db6f77a6caddff6
GITHUB_REPO=ct/bmc_hub

POSTGRES_USER=bmc_hub_prod
POSTGRES_PASSWORD=SKIFT_DENNE_PASSWORD
POSTGRES_DB=bmc_hub_prod

DATABASE_URL=postgresql://bmc_hub_prod:SKIFT_DENNE_PASSWORD@postgres:5432/bmc_hub_prod

SECRET_KEY=$(python3 -c "import secrets; print(secrets.token_urlsafe(32))")

API_PORT=8000
CORS_ORIGINS=http://172.16.31.183:8001

ECONOMIC_READ_ONLY=true
ECONOMIC_DRY_RUN=true

OLLAMA_ENDPOINT=http://ai_direct.cs.blaahund.dk
OLLAMA_MODEL=qwen2.5-coder:7b

VTIGER_URL=https://bmcnetworks.od2.vtiger.com
VTIGER_USERNAME=ct@bmcnetworks.dk
VTIGER_API_KEY=bD8cW8zRFuKpPZ2S

TIMETRACKING_DEFAULT_HOURLY_RATE=1200.00
TIMETRACKING_VTIGER_READ_ONLY=true
TIMETRACKING_ECONOMIC_READ_ONLY=true
EOF

# 5. Kør deployment
./setup.sh

# 6. Start services
podman-compose up -d --build

# 7. Verificer
curl http://localhost:8000/health
```

## 📊 Database Schema

Initial schema inkluderer:
- `customers` - Kunde/company data
- `hardware` - Hardware tracking
- `contacts` - Contact management
- `vendors` - Vendor management
- `settings` - System settings
- `auth_users` - Authentication
- `tickets` - Ticket system
- `tags` - Tag system
- `email_workflows` - Email automation
- `timetracking` - Time tracking
- `backups` - Backup management

## 🔄 Næste Release (v1.1.0)

Planlagte forbedringer:
- [ ] Flere migrations inkluderet i release
- [ ] Extended monitoring setup
- [ ] Performance optimizations
- [ ] Extended API documentation

## 📞 Support

Ved problemer med deployment:
- Email: ct@bmcnetworks.dk
- Gitea Issues: https://g.bmcnetworks.dk/ct/bmc_hub/issues

## 🙏 Credits

Udviklet af Christian Thomas @ BMC Networks
