Getting Started with Development
Welcome to SpectrumFederation development! This guide will help you set up your environment and start contributing.
Project Overview
SpectrumFederation is a World of Warcraft addon written in Lua 5.1 for the Spectrum Federation guild on Garona. It targets both Retail and Beta/PTR versions of WoW.
Development Environment
Prerequisites
- Git - For version control
- Visual Studio Code - Recommended editor with dev container support
- Docker - For dev container (or local Lua 5.1 + luacheck)
- WoW Client - For in-game testing
Quick Setup
-
Clone the repository:
-
Open in VS Code:
-
Start dev container (recommended):
- VS Code will prompt to "Reopen in Container"
-
This installs all tools automatically (Lua, luacheck, Python, etc.)
-
Or install tools locally:
Code Structure
Addon Files
All addon code lives in SpectrumFederation/:
SpectrumFederation/
├── SpectrumFederation.lua # Entry point, event registration
├── SpectrumFederation.toc # Addon manifest (load order, version)
├── modules/
│ ├── debug.lua # Debug logging system
│ ├── LootProfiles.lua # Profile CRUD operations
│ └── settings_ui.lua # Main settings panel
├── settings/
│ └── loot_helper.lua # Loot Helper UI section
├── locale/
│ └── enUS.lua # Localization strings
└── media/
├── Fonts/
├── Icons/
└── Textures/
Critical files:
- SpectrumFederation.toc - MUST update ## Version: for every PR
- Load order is top-to-bottom in TOC file
Repository Structure
.
├── SpectrumFederation/ # Addon code (packaged for WoW)
├── .github/
│ ├── scripts/ # Python CI/CD helper scripts
│ └── workflows/ # GitHub Actions workflows
├── docs/ # MkDocs documentation (this site!)
└── .devcontainer/ # Dev container configuration
Making Changes
1. Create a Feature Branch
Always branch from beta:
2. Make Your Changes
- Edit addon files in
SpectrumFederation/ - Follow existing code patterns
- Add debug logging:
SF.Debug:Info("CATEGORY", "message") - Bump version in TOC:
## Version: X.Y.Z-beta.N
3. Test In-Game
Create a symlink from your WoW AddOns folder:
# Example (adjust path for your system)
ln -s /path/to/SpectrumFederation/SpectrumFederation /path/to/WoW/_retail_/Interface/AddOns/
Then in-game:
- Enable addon in addon list
- Use /reload after code changes
- Check for Lua errors: /console scriptErrors 1
- Test slash command: /sf
4. Lint Your Code
This checks: - Lua (luacheck) - Syntax and style - YAML (yamllint) - Workflow files - Python (ruff) - CI scripts
5. Create a Pull Request
-
Push your branch:
-
Open PR to
betabranch on GitHub -
Wait for CI checks to pass:
- ✅ Linting
- ✅ Package validation
- ✅ Version bump check
-
✅ Duplicate release check
-
Request review from maintainers
Development Workflow
Feature Development
graph LR
A[Create branch from beta] --> B[Implement feature]
B --> C[Test in-game]
C --> D[Lint code]
D --> E[Bump version in TOC]
E --> F[Create PR to beta]
F --> G[Merge after review]
G --> H[Beta release auto-created]
Version Format
- Beta:
0.0.17-beta.1(development) - Stable:
0.0.17(released via promotion)
Rules: - Every behavioral change requires version bump - Documentation-only changes don't require bump - CI will fail if version not bumped
Key Files to Know
SpectrumFederation.toc
The addon manifest. Most important file!
## Interface: 120000 # WoW patch version
## Version: 0.0.17-beta.1 # MUST BUMP FOR EVERY PR
## Title: Spectrum Federation
## Author: OsulivanAB
# Load order (top to bottom)
SpectrumFederation.lua
modules/debug.lua
modules/LootProfiles.lua
settings/loot_helper.lua
modules/settings_ui.lua
SavedVariables
Declared in TOC, accessed via SF.db:
-- In TOC
## SavedVariables: SpectrumFederationDB, SpectrumFederationDebugDB
-- In Lua
SF.db = SpectrumFederationDB -- Main data
SF.debugDB = SpectrumFederationDebugDB -- Debug logs
Common Tasks
Add a New Module
-
Create file in
SpectrumFederation/modules/: -
Add to TOC after dependencies:
-
Call from entry point or settings UI
Add Debug Logging
-- Available levels: Verbose, Info, Warn, Error
SF.Debug:Info("CATEGORY", "Message with %s", arg)
SF.Debug:Error("PROFILES", "Failed to create profile: %s", err)
View logs in-game:
- /sfdebug on - Enable debug mode
- /sfdebug show - Show debug UI
Add Settings UI Section
-
Create file in
SpectrumFederation/settings/: -
Call from
settings_ui.lua:
Useful Commands
In-Game
/sf- Open settings panel/reload- Reload UI after code changes/console scriptErrors 1- Show Lua errors
Development
# Lint everything
python3 .github/scripts/lint_all.py
# Validate addon package
python3 .github/scripts/validate_packaging.py
# Check version bump (for PRs)
python3 .github/scripts/check_version_bump.py beta
# Test Blizzard API
python3 .github/scripts/blizzard_api.py --environment live
Resources
- CI/CD Workflows - Automated builds and releases
- Promoting to Main - How to release stable versions
- Naming Conventions - Code style guidelines
- WoW API Docs - Official API reference
Getting Help
- Check existing code for patterns
- Review
BlizzardUI/live/(generated in dev container) for API examples - Ask in project discussions or issues
Next Steps
Ready to contribute? Check out:
- Open Issues - Find something to work on
- CI/CD Workflows - Understand the automation
- Project Board - See what's planned
Happy coding! 🚀