# 🌐 PUBLIC URL CONFIGURATION

## Base URL Standard

All HTML reports must use the following public domain:

```
https://report.zendaily.id/
```

## Folder Mapping

| Local Path | Public URL |
|------------|------------|
| `/root/.openclaw/workspace/daily_brief/` | `https://report.zendaily.id/daily_brief/` |
| `/root/.openclaw/workspace/osint_reports/` | `https://report.zendaily.id/osint_reports/` |
| `/root/.openclaw/workspace/security_reports/` | `https://report.zendaily.id/security_reports/` |
| `/root/.openclaw/workspace/html_examples/` | `https://report.zendaily.id/html_examples/` |

## URL Pattern

```
https://report.zendaily.id/{folder}/{filename}
```

### Examples:

- `https://report.zendaily.id/daily_brief/ATR_BPN_DAILY_BRIEF_2026-04-17.html`
- `https://report.zendaily.id/daily_brief/BULOG_INDONESIA_DAILY_BRIEF_2026-04-16.html`
- `https://report.zendaily.id/osint_reports/Denny_Basri_BOSEOS_INT_Report.txt`

---

## 📄 HTML Asset Path Convention

### ✅ DO USE (Correct):

```html
<!-- Relative paths from report folder -->
<img src="assets/logo.png" alt="Logo">
<link href="../styles/main.css" rel="stylesheet">
<script src="../js/chart.js"></script>

<!-- Cross-folder links -->
<a href="../osint_reports/report.html">OSINT Report</a>
<a href="../../osint_reports/person_report.html">Person Report</a>
```

### ❌ DON'T USE (Wrong):

```html
<!-- Hardcoded IP addresses -->
<img src="http://187.77.112.225:8000/assets/logo.png" alt="Logo">

<!-- Local absolute paths -->
<img src="/root/.openclaw/workspace/assets/logo.png" alt="Logo">

<!-- Mixed protocols (use HTTPS only) -->
<img src="http://report.zendaily.id/assets/logo.png" alt="Logo">
```

---

## 🚀 Deployment Notes

### For Each New HTML Report:

1. **Save to correct folder:**
   ```bash
   write --path /root/.openclaw/workspace/daily_brief/{FILENAME}.html --content "<HTML>"
   ```

2. **Generate public URL:**
   ```
   https://report.zendaily.id/daily_brief/{FILENAME}.html
   ```

3. **Use in messaging:**
   > 📊 Report tersedia di: `https://report.zendaily.id/daily_brief/ATR_BPN_DAILY_BRIEF_2026-04-18.html`

4. **No local IPs or ports in URLs**

---

## 📁 Directory Structure

```
/root/.openclaw/workspace/
├── daily_brief/           → https://report.zendaily.id/daily_brief/
│   ├── ATR_BPN_DAILY_BRIEF_2026-04-17.html
│   ├── BULOG_INDONESIA_DAILY_BRIEF_2026-04-16.html
│   └── INDONESIA_DAILY_BRIEF_2026-04-16.html
├── osint_reports/         → https://report.zendaily.id/osint_reports/
│   └── Denny_Basri_BOSEOS_INT_Report.txt
├── security_reports/      → https://report.zendaily.id/security_reports/
│   └── KEMENDAGRI_GO_ID_EXEC_SUMMARY.md
├── html_examples/         → https://report.zendaily.id/html_examples/
│   └── denny_basri_osint_report.html
└── assets/                → Shared assets (images, CSS, JS)
    ├── logo.png
    ├── styles/
    │   └── main.css
    └── js/
        └── chart.js
```

---

## ⚙️ Web Server Setup Required

To serve these files at `report.zendaily.id`, configure your web server:

### **Nginx Configuration Example:**

```nginx
server {
    listen 80;
    server_name report.zendaily.id;
    
    # Redirect HTTP to HTTPS (after SSL setup)
    return 301 https://$server_name$request_uri;
}

server {
    listen 443 ssl http2;
    server_name report.zendaily.id;
    
    ssl_certificate /etc/letsencrypt/live/report.zendaily.id/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/report.zendaily.id/privkey.pem;
    
    root /root/.openclaw/workspace;
    
    # Daily briefs
    location /daily_brief/ {
        alias /root/.openclaw/workspace/daily_brief/;
        autoindex on;
        autoindex_format html;
        
        # Optimize for HTML delivery
        types {
            text/html html htm;
        }
        default_type text/html;
    }
    
    # OSINT reports
    location /osint_reports/ {
        alias /root/.openclaw/workspace/osint_reports/;
        autoindex on;
    }
    
    # Security reports
    location /security_reports/ {
        alias /root/.openclaw/workspace/security_reports/;
        autoindex on;
    }
    
    # HTML examples
    location /html_examples/ {
        alias /root/.openclaw/workspace/html_examples/;
        autoindex on;
    }
}
```

### **SSL Certificate (Let's Encrypt):**

```bash
# Install Certbot
sudo apt install certbot python3-certbot-nginx

# Obtain certificate
sudo certbot --nginx -d report.zendaily.id

# Auto-renewal configured by certbot
```

---

## 🔍 Testing Checklist

Before sharing any report link:

- [ ] URL uses `https://report.zendaily.id/` (no IP/port)
- [ ] All internal assets use relative paths
- [ ] Links between reports work correctly
- [ ] No hardcoded local paths in HTML
- [ ] Tested in private/incognito browser mode
- [ ] Mobile responsive (if applicable)

---

## 📝 Reference

Created: 2026-04-18  
Last Updated: 2026-04-18  
Author: OpenClaw AI Assistant

---

**Note:** This document is automatically updated and should be consulted when creating new reports or changing deployment strategies.
