# Deck URL Reference Guide

**Last Updated**: 2025-10-17

This document provides the authoritative reference for all deck URL patterns used across the BuzzTrail system.

## ✅ Current Production URLs

### 1. Static Presentation Decks (buzztrail-presentations)
**Repository**: https://github.com/BuzzTrail/buzztrail-presentations
**GitHub Pages**: https://buzztrail.github.io/buzztrail-presentations/
**Deployment**: Automated via GitHub Actions on push to main

**URL Pattern**:
```
https://buzztrail.github.io/buzztrail-presentations/{deck-id}/
```

**Example URLs**:
- Test Deck: `https://buzztrail.github.io/buzztrail-presentations/p10e-2f8z-h0fi/`

**Usage**:
- Pre-built presentation decks for demos
- Fallback deck when dynamic generation fails
- Used by screenshare bots when no deck is provided

**Status**: ✅ **ACTIVE AND WORKING**

---

### 2. Dynamically Generated Decks (buzztrail-presentations)
**Repository**: https://github.com/BuzzTrail/buzztrail-presentations
**GitHub Pages**: https://buzztrail.github.io/buzztrail-presentations/ *(not yet active)*

**URL Pattern**:
```
whatever-the-url-is/{deck-id}/
```

**Usage**:
- Decks generated via `/api/slidev/generate` endpoint
- Personalized per-session decks
- Created on-demand during voice demo sessions

**Status**: 🚧 **PLANNED** (requires GitHub token and repo setup)

---

## Code References

### Backend (Extension Repo)

**File**: `apps/slide-system/steps/voice-demo-session-create.step.ts`
```typescript
// Fallback URL (working)
const fallbackUrl = 'https://buzztrail.github.io/buzztrail-presentations/p10e-2f8z-h0fi/';

// Dynamic generation target (requires GITHUB_TOKEN)
const deckUrl = `https://buzztrail.github.io/buzztrail-presentations/${deckId}/`;
```

### Screenshare Bot (Epic Repo)

**File**: `apps/slide-system/bots/screenshare-bot/deck_url_validator.py`
```python
# NEEDS UPDATE: Currently references non-existent buzztrail-presentations
FALLBACK_DECK_URL = "https://buzztrail.github.io/buzztrail-presentations/test-deck/"

# SHOULD BE: Working buzztrail-presentations deck
FALLBACK_DECK_URL = "https://buzztrail.github.io/buzztrail-presentations/p10e-2f8z-h0fi/"
```

---

## Deployment Flow

### Current (Using Fallback)
1. Session created → No deck provided
2. Backend uses fallback: `buzztrail-presentations/p10e-2f8z-h0fi/`
3. Screenshare bot loads working deck
4. ✅ Works immediately

### Future (With Dynamic Generation)
1. Session created → No deck provided
2. Backend triggers deck generation
3. Deck built and published to `buzztrail-presentations/{new-deck-id}/`
4. Screenshare bot loads personalized deck
5. If generation fails → Falls back to `buzztrail-presentations/p10e-2f8z-h0fi/`

---

## Action Items

### Immediate Fixes
- [x] Update extension repo fallback URL to use `buzztrail-presentations`
- [ ] Update epic repo `deck_url_validator.py` fallback URL
- [ ] Deploy updated code to Railway

### Future Enhancements
- [ ] Create `buzztrail-presentations` GitHub repo
- [ ] Set up GitHub Pages for `buzztrail-presentations`
- [ ] Configure GITHUB_TOKEN in Railway
- [ ] Implement workflow_dispatch trigger for deck builds
- [ ] Test end-to-end dynamic deck generation

---

## Testing URLs

**Validate a deck URL**:
```bash
curl -I https://buzztrail.github.io/buzztrail-presentations/p10e-2f8z-h0fi/
# Should return: HTTP/2 200
```

**Check if buzztrail-presentations is ready**:
```bash
curl -I https://buzztrail.github.io/buzztrail-presentations/
# Currently returns: HTTP/2 404 (not yet created)
```

---

## Related Documentation
- [Production Deployment Runbook](./PRODUCTION_DEPLOYMENT_RUNBOOK.md)
- [E2E Testing Status](./E2E_TESTING_STATUS.md)
- [Screenshare Bot README](../bots/screenshare-bot/README.md)
