# 📁 QBPOS Help Website - Workspace Organization

> **Project**: QuickBooks POS 2019 Help Documentation
>
> **URL**: <https://quickbookposhelp.access.ly>
>
> **Last Updated**: January 10, 2026

---

## 📂 Folder Structure

```
QBPOS_Help_Web/
├── QB_Help_Web/              # 🌐 LIVE WEBSITE (DO NOT MODIFY DIRECTLY)
│   ├── POS_Help.html         # Main entry point (frameset)
│   └── POS_Help/             # All help content (939 pages)
│       ├── ___dtree.js       # Navigation logic
│       ├── ___dtree.css      # Tree styles
│       ├── ___left.htm       # Left navigation panel
│       ├── responsive.css    # Responsive design (NEW)
│       └── qbpos_*/          # Content folders
│
├── scripts/                  # 🔧 Shell Scripts
├── python/                   # 🐍 Python Scripts
├── config/                   # ⚙️  Configuration Files
├── docs/                     # 📚 Documentation
├── backups/                  # 💾 Backup Files
└── archives/                 # 📦 Old/Archive Files
```

---

## 🔧 scripts/ - Shell Scripts

| Script | Purpose | Usage |
|--------|---------|-------|
| **backup_site.sh** | Daily automated backup | Run manually or via cron |
| **monitor_logs.sh** | Security monitoring | `./scripts/monitor_logs.sh` |
| **validate_frontend.sh** | Frontend validation tests | `./scripts/validate_frontend.sh` |
| **deploy_nginx.sh** | Deploy nginx configuration | Setup only |
| **install_service.sh** | Install systemd service | Setup only |
| **setup_https.sh** | SSL/HTTPS setup | Setup only |
| **setup_ssl.sh** | SSL certificate setup | Setup only |
| **check_dns_and_ssl.sh** | DNS/SSL verification | Diagnostics |
| **get_ssl_cert.sh** | Get SSL certificate | Setup only |
| **health_check.sh** | Server health check | Monitoring |
| add_mobile_*.sh | Mobile nav scripts (OLD) | Archived |

**Active Scripts:**

```bash
# Run daily security monitoring
./scripts/monitor_logs.sh

# Validate frontend changes
./scripts/validate_frontend.sh

# Manual backup
./scripts/backup_site.sh
```

---

## 🐍 python/ - Python Scripts

| Script | Purpose | Status |
|--------|---------|--------|
| **fix_inline_styles.py** | Force 13pt fonts on all pages | ✅ Used (one-time) |
| **inject_style.py** | Inject CSS into HTML files | ✅ Used (one-time) |
| **move_styles.py** | CSS organization | ✅ Used (one-time) |
| **production_server.py** | Python HTTP server | 🗄️ Archived (using nginx) |
| **secure_production_server.py** | Secure Python server | 🗄️ Archived (using nginx) |
| **server.py** | Simple HTTP server | 🗄️ Archived (using nginx) |
| **fix_navbar.py** | Fix navigation bar | 🗄️ Archived |
| **rebuild_left_nav.py** | Rebuild left panel | 🗄️ Archived |
| ****pycache**/** | Python cache | Auto-generated |

**Note:** All Python servers are archived. Website now runs on nginx.

---

## ⚙️ config/ - Configuration Files

| File | Purpose | Location |
|------|---------|----------|
| **qbpos-help.service** | Systemd service (archived) | Not in use |
| **qbpos-health-check.service** | Health check service | Not in use |
| **qbpos-health-check.timer** | Health check timer | Not in use |
| **qbpos-help-final.conf** | Final nginx config | 🗄️ Archived |
| **qbpos-help-ssl.conf** | SSL nginx config | 🗄️ Archived |
| **qbpos-help-http-temp.conf** | Temp HTTP config | 🗄️ Archived |
| **nginx_setup.conf** | Initial nginx setup | 🗄️ Archived |

**Active Config:**

- **Live nginx config**: `/etc/nginx/sites-available/qbpos-help`
- **Symlink**: `/etc/nginx/sites-enabled/qbpos-help`

To edit active config:

```bash
sudo nano /etc/nginx/sites-available/qbpos-help
sudo nginx -t  # Test
sudo systemctl restart nginx  # Apply
```

---

## 📚 docs/ - Documentation

| Document | Description |
|----------|-------------|
| **README_SECURITY.md** | Security features & maintenance |
| **FRONTEND_FIXES.md** | Frontend improvements (detailed) |
| **FRONTEND_QUICK_REF.md** | Frontend fixes (quick reference) |
| **DEPLOYMENT_GUIDE.md** | Full deployment guide |
| **AUTO_START_GUIDE.md** | Auto-start service guide |
| **MOBILE_RESPONSIVE_SUMMARY.md** | Mobile responsiveness summary |
| **QUICK_REFERENCE.txt** | Quick commands reference |
| **STATUS_REPORT.txt** | Project status report |

**Read First:**

1. [README_SECURITY.md](docs/README_SECURITY.md) - Security & monitoring
2. [FRONTEND_QUICK_REF.md](docs/FRONTEND_QUICK_REF.md) - Frontend status
3. [QUICK_REFERENCE.txt](docs/QUICK_REFERENCE.txt) - Common commands

---

## 💾 backups/ - Backup Files

Automated backups are stored in: `/home/pts/backups/qbpos_help/`

This folder contains:

- `backup_html_20260109_181143/` - Manual HTML backup
- `backup_html_20260109_181155/` - Manual HTML backup
- `ORIGINAL_FILES_BACKUP/` - Original files before modifications

**Active Backup System:**

- **Schedule**: Daily at 2:00 AM
- **Location**: `/home/pts/backups/qbpos_help/`
- **Retention**: 7 days
- **Script**: `scripts/backup_site.sh`

View backups:

```bash
ls -lh /home/pts/backups/qbpos_help/
```

---

## 📦 archives/ - Old/Archive Files

| File | Description |
|------|-------------|
| **QB_Help_Web_CURRENT_BROKEN_20260109_200109.tar.gz** | Backup before mobile fix |
| **server.log** | Old server logs |

---

## 🌐 QB_Help_Web/ - Live Website

**⚠️ CRITICAL: This is the LIVE website served by nginx**

```
QB_Help_Web/
├── POS_Help.html              # Entry point (desktop: frameset, mobile: redirect)
└── POS_Help/
    ├── ___dtree.js            # Navigation tree logic (mobile detection)
    ├── ___dtree.css           # Tree base styles
    ├── ___left.htm            # Left navigation panel (ARIA + semantic HTML)
    ├── responsive.css         # Responsive design (mobile/tablet/desktop)
    ├── qbpos.css              # Legacy styles
    ├── prompttech-header.css  # Header styles
    ├── ehlpdhtm.js            # Legacy help system
    └── qbpos_*/               # 939 content pages (all with 13pt fonts)
```

**DO NOT:**

- Delete files without backup
- Edit ___dtree.js without testing
- Change file permissions
- Remove cache-busting parameters

**Nginx Root:**

```
/home/pts/Documents/QBPOS_Help_Web/QB_Help_Web
```

---

## 🚀 Quick Commands

### Security & Monitoring

```bash
# View security status
./scripts/monitor_logs.sh

# Check fail2ban
sudo fail2ban-client status

# View backups
ls -lh /home/pts/backups/qbpos_help/

# SSL certificate info
sudo certbot certificates
```

### Nginx Management

```bash
# Test config
sudo nginx -t

# Restart nginx
sudo systemctl restart nginx

# View logs
sudo tail -f /var/log/nginx/qbpos-access.log
sudo tail -f /var/log/nginx/qbpos-error.log
```

### Frontend Testing

```bash
# Validate frontend
./scripts/validate_frontend.sh

# Test site
curl -I https://quickbookposhelp.access.ly
```

### Backup & Restore

```bash
# Manual backup
./scripts/backup_site.sh

# Restore from backup
cd /home/pts/backups/qbpos_help/
tar -xzf qbpos_help_YYYYMMDD_HHMMSS.tar.gz
```

---

## 📊 System Status

### ✅ Production Ready

- **Website**: <https://quickbookposhelp.access.ly>
- **Status**: Online (HTTP 200)
- **Response Time**: ~0.11s
- **SSL**: Valid until April 9, 2026
- **Security Score**: 9.2/10

### 🔒 Security Features

- ✅ fail2ban (5 nginx jails)
- ✅ Security headers (X-Frame-Options, CSP, etc.)
- ✅ SSL/TLS encryption
- ✅ Daily automated backups
- ✅ Log monitoring

### 📱 Frontend Features

- ✅ Responsive (mobile/tablet/desktop)
- ✅ WCAG 2.1 AA accessibility
- ✅ Dark mode support
- ✅ 44x44px touch targets
- ✅ ARIA labels & semantic HTML
- ✅ Error handling in JavaScript
- ✅ Cache control (no-cache for dynamic files)

---

## 🛠️ Maintenance Tasks

### Daily

- Check backup logs: `tail /var/log/qbpos_backup.log`
- Review security: `./scripts/monitor_logs.sh`

### Weekly

- Check fail2ban: `sudo fail2ban-client status`
- Review nginx logs for suspicious activity

### Monthly

- Verify backups working
- Update system packages: `sudo apt update && sudo apt upgrade`
- Review disk space: `df -h`

### Quarterly

- Test backup restoration
- Security audit
- SSL certificate check (auto-renews 30 days before expiry)

---

## 📞 Troubleshooting

### Issue: Site not loading

```bash
sudo systemctl status nginx
sudo nginx -t
sudo tail -f /var/log/nginx/error.log
```

### Issue: SSL certificate error

```bash
sudo certbot certificates
sudo certbot renew --dry-run
sudo systemctl restart nginx
```

### Issue: Mobile links opening in new tabs

```bash
# Clear browser cache completely
# Hard refresh: Ctrl+Shift+R or Cmd+Shift+R
```

### Issue: Backup failed

```bash
tail -f /var/log/qbpos_backup.log
./scripts/backup_site.sh  # Run manually
```

---

## 🎯 Project Overview

**What This Is:**

- QuickBooks POS 2019 Desktop Help Documentation
- 939 HTML pages converted from CHM format
- Fully responsive (mobile, tablet, desktop)
- WCAG 2.1 AA accessible
- Production-grade security

**Key Features:**

- 13pt fonts on all pages (user request)
- Mobile: Single-page navigation, same-tab links
- Desktop: Frameset layout (left nav + content)
- Welcome box from PromptTech Solution
- No online services, no subscription required

**Technologies:**

- nginx 1.24+ (web server)
- Let's Encrypt SSL (HTTPS)
- fail2ban (intrusion prevention)
- JavaScript tree navigation (dTree)
- Responsive CSS (mobile-first)

---

## 📧 Support

**PromptTech Solution**

- Website: <https://quickbookposhelp.access.ly>
- Documentation: See `docs/` folder
- Security: See `docs/README_SECURITY.md`

---

**Last Updated**: January 10, 2026
**Version**: 1.0.0 (Production)
**Status**: ✅ All Features Complete
