# Admin Panel - Quick Reference Guide

**Version:** 1.0  
**Last Updated:** 2025-01-15

---

## 🚀 Quick Access

### Admin Panel URL
```
http://your-site.com/admin
```

### Login Credentials
- **Role Required:** Admin
- **URL:** `/login`
- **Auto-redirect:** Yes (to dashboard after login)

---

## 📋 All Admin Pages Quick Links

### Core Management
| Page | URL | Purpose |
|------|-----|---------|
| 📊 Dashboard | `/admin` | Overview & quick stats |
| 📈 Analytics | `/admin/analytika` | Visitor statistics (Umami) |
| 📝 Articles | `/admin/clanky` | Blog posts & news |
| 📖 About | `/admin/o-klubu` | Club information page |
| 🎥 Videos | `/admin/videa` | YouTube video management |
| 🖼️ Gallery | `/admin/galerie` | Zonerama photo albums |
| 👕 Clothing | `/admin/obleceni` | Merchandise products |

### Sports Management
| Page | URL | Purpose |
|------|-----|---------|
| 👥 Teams | `/admin/tymy` | Team management |
| ⚽ Matches | `/admin/zapasy` | Match schedule & results |
| 🏃 Players | `/admin/hraci` | Player roster & stats |
| 📅 Activities | `/admin/aktivity` | Events & calendar |
| 📊 Scoreboard | `/admin/scoreboard` | Live match scoreboard |
| 📱 Scoreboard Remote | `/admin/scoreboard/remote` | Mobile control |

### Content & Media
| Page | URL | Purpose |
|------|-----|---------|
| 🏷️ Categories | `/admin/kategorie` | Article categories |
| 🤝 Sponsors | `/admin/sponzori` | Sponsor logos & links |
| 📢 Banners | `/admin/bannery` | Advertisement banners |
| 💬 Messages | `/admin/zpravy` | Contact form inbox |
| 📁 Files | `/admin/soubory` | File manager |

### Communication
| Page | URL | Purpose |
|------|-----|---------|
| 📧 Newsletter | `/admin/newsletter` | Email campaigns & subscribers |
| 📝 Contacts | `/admin/kontakty` | Contact categories |
| 📊 Polls | `/admin/ankety` | Voting polls |

### Configuration
| Page | URL | Purpose |
|------|-----|---------|
| ⚙️ Settings | `/admin/nastaveni` | Site configuration |
| 🧭 Navigation | `/admin/navigace` | Menu management |
| 🏆 Competition Aliases | `/admin/aliasy-soutezi` | FACR competition mapping |
| 🔄 Prefetch | `/admin/prefetch` | Cache management |
| 👤 Users | `/admin/uzivatele` | User accounts |
| 📚 Documentation | `/admin/docs` | Built-in help guide |

---

## 🎯 Common Tasks

### 1. Create New Article
```
1. Go to /admin/clanky
2. Click "+ Nový článek"
3. Fill in title, content, category
4. Upload featured image
5. Click "Uložit"
```

### 2. Add New Match
```
1. Go to /admin/zapasy
2. Click "+ Přidat zápas"
3. Search for teams (FACR integration)
4. Set date, time, venue
5. Save
```

### 3. Manage Players
```
1. Go to /admin/hraci
2. Click "+ Přidat hráče"
3. Upload photo (auto-compressed)
4. Enter name, position, number
5. Save
```

### 4. Update Site Settings
```
1. Go to /admin/nastaveni
2. Modify club info, colors, logos
3. Configure integrations
4. Click "Uložit nastavení"
```

### 5. Control Live Scoreboard
```
1. Go to /admin/scoreboard
2. Link to a match
3. Update scores in real-time
4. Changes reflect on homepage
```

### 6. Send Newsletter
```
1. Go to /admin/newsletter
2. Choose campaign type
3. Write content or use template
4. Click "Odeslat"
```

---

## 🔑 Keyboard Shortcuts

### Global
- `Ctrl + S` - Save form (where applicable)
- `Esc` - Close modal/dialog
- `Ctrl + K` - Search (if enabled)

### Navigation
- Click sidebar items to navigate
- Use browser back/forward

---

## 💡 Tips & Best Practices

### Content Management
- ✅ Always add featured images to articles
- ✅ Use categories for better organization
- ✅ Preview before publishing
- ✅ Use SEO-friendly slugs

### Match Management
- ✅ Link matches to scoreboard for live updates
- ✅ Use FACR search for official team data
- ✅ Set accurate date/time for automatic countdown

### Media
- ✅ Images are auto-compressed (no manual resize needed)
- ✅ Use YouTube URLs for videos (not uploads)
- ✅ Keep sponsor logos high-quality PNG

### Performance
- ✅ Use prefetch to warm cache
- ✅ Check analytics regularly
- ✅ Clear old newsletters periodically

### Security
- ✅ Use strong passwords
- ✅ Logout after admin session
- ✅ Don't share admin credentials

---

## 🆘 Troubleshooting

### Can't Login?
- Check username/password
- Verify you have admin role
- Try password reset link
- Contact system administrator

### Changes Not Visible?
- Check if item is marked as "visible"
- Verify publication status
- Clear browser cache
- Wait for prefetch cycle (30 min)

### Upload Failed?
- Check file size (max varies per type)
- Verify file format (jpg, png for images)
- Check internet connection
- Try smaller file

### Integration Not Working?
- Check API keys in Settings
- Verify external service status
- Check CORS configuration
- Review browser console errors

### Page Loading Slowly?
- Check analytics data size
- Clear cache via Prefetch page
- Optimize images before upload
- Contact developer for optimization

---

## 📊 Feature Matrix

| Feature | Articles | Matches | Players | Activities |
|---------|----------|---------|---------|------------|
| Create | ✅ | ✅ | ✅ | ✅ |
| Edit | ✅ | ✅ | ✅ | ✅ |
| Delete | ✅ | ✅ | ✅ | ✅ |
| Bulk Actions | ✅ | ❌ | ❌ | ❌ |
| Search | ✅ | ✅ | ✅ | ✅ |
| Filter | ✅ | ✅ | ✅ | ✅ |
| Image Upload | ✅ | ✅ | ✅ | ✅ |
| Rich Editor | ✅ | ❌ | ❌ | ✅ |
| Categories | ✅ | ❌ | ❌ | ❌ |
| Visibility Toggle | ✅ | ❌ | ❌ | ✅ |
| AI Generation | ❌ | ❌ | ❌ | ✅ |

---

## 🔌 External Integrations

### FACR (Czech FA)
- **Pages:** Matches, Competition Aliases, Standings
- **Purpose:** Official match data, league tables
- **Setup:** Automatic (no config needed)

### YouTube
- **Pages:** Videos, Activities
- **Purpose:** Video embedding
- **Setup:** Just paste YouTube URL

### Umami Analytics
- **Pages:** Analytics, Settings
- **Purpose:** Visitor tracking
- **Setup:** Set UMAMI_WEBSITE_ID in Settings

### OpenAI
- **Pages:** Activities
- **Purpose:** AI content generation
- **Setup:** Set OPENAI_API_KEY in backend .env

### Zonerama
- **Pages:** Gallery
- **Purpose:** Photo albums
- **Setup:** Enter API key in Settings

### Google Maps
- **Pages:** Settings, Activities
- **Purpose:** Location maps
- **Setup:** Configure in Settings

---

## 📱 Mobile Access

The admin panel is **fully responsive** and works on:
- ✅ Desktop (recommended)
- ✅ Tablet (iPad, Android tablets)
- ✅ Mobile (smartphones)

**Note:** Some complex pages (Analytics, Scoreboard) are optimized for desktop.

---

## 🎨 Customization

### Site Appearance
1. Go to `/admin/nastaveni`
2. Configure:
   - Club name & logo
   - Primary/accent colors
   - Font pairings
   - Hero style
   - Sponsor layout

### Navigation Menu
1. Go to `/admin/navigace`
2. Add/edit/reorder menu items
3. Configure social media links
4. Set visibility

### Layout
1. Use MyUIbrix Editor (link in sidebar)
2. Visual drag-and-drop customization
3. Choose element variants
4. Save and publish

---

## 📈 Analytics Dashboard

### Metrics Available:
- **Visitors:** Total unique visitors
- **Page Views:** Total page views
- **Events:** Custom event tracking
- **Countries:** Geographic distribution
- **Top Pages:** Most visited pages
- **Referrers:** Traffic sources

### Refresh Interval:
- Data updates every 30 minutes
- Real-time for events
- Historical data available

---

## 🔒 Security

### Best Practices:
1. **Strong Passwords:** Use 12+ characters
2. **Regular Logout:** Don't stay logged in
3. **Limited Access:** Only admins should have access
4. **Audit Trail:** Check user activity logs
5. **Updates:** Keep system updated

### Permissions:
- **Admin:** Full access to all features
- **Editor:** Limited to content (if implemented)
- **Viewer:** Read-only (if implemented)

---

## 📞 Support

### Built-in Help
- Visit `/admin/docs` for detailed documentation
- Search functionality available
- Step-by-step guides

### Common Issues
- Check `/admin/docs` → "Řešení problémů"
- Review error messages carefully
- Check browser console (F12)

### Contact
- System Administrator
- Developer Team
- [Your Support Email]

---

## 📚 Related Documentation

- **Full Admin Audit:** `ADMIN_SECTION_INTEGRITY_AUDIT.md`
- **MyUIbrix Guide:** `MYUIBRIX_QUICK_START.md`
- **API Documentation:** `/admin/docs`
- **Setup Guide:** `SETUP.md`

---

## 🚦 Status Indicators

### Page Status:
- 🟢 **Fully Functional** - Working perfectly
- 🟡 **Partially Functional** - Minor issues
- 🔴 **Not Working** - Critical issues
- ⚠️ **Placeholder** - Not yet implemented

### Current Status:
- 🟢 **30/32** pages fully functional
- ⚠️ **1/32** placeholder (Media)
- 🟡 **1/32** legacy version kept

---

## ✅ Quick Checklist for New Admins

- [ ] Login with admin credentials
- [ ] Review Dashboard
- [ ] Check all sidebar links work
- [ ] Upload club logo in Settings
- [ ] Configure primary colors
- [ ] Add first article
- [ ] Upload player photos
- [ ] Create a match
- [ ] Test newsletter
- [ ] Review analytics
- [ ] Customize navigation
- [ ] Check mobile view
- [ ] Read full documentation

---

**Quick Start:** Go to `/admin` → Navigate via sidebar → Click any item to manage content  
**Need Help:** Check `/admin/docs` for comprehensive guides  
**Report Issues:** Contact system administrator

---

**Last Updated:** January 15, 2025  
**Version:** 1.0  
**Maintained By:** Development Team
