A web-based item and progress tracker for The Legend of Zelda: A Link to the Past randomizer speedruns and playthroughs. This application helps players track their collected items, dungeon progress, and chest locations throughout their adventure in Hyrule.
The tracker is available at: https://kqesar.github.io/alltp-tracker/
The tracker is automatically deployed to GitHub Pages from the latest master branch.
This project was originally forked from TestRunnerSRL/lttp-tracker. However, the codebase has evolved dramatically with a complete rewrite using modern technologies:
- Complete React 19 + TypeScript migration from the original implementation
- Modern development stack with pnpm, Vitest, and comprehensive testing
- Enhanced architecture with modular components and centralized state management
- Web standards compliance with W3C HTML validation and WCAG accessibility
- Modern CSS Grid layout replacing legacy table-based layouts with proper spacer elements
- Keyboard navigation with full arrow key and Tab sequence support for accessibility
- Mobile optimization with touch gestures, responsive design, and device detection
- Advanced CI/CD pipeline with automated testing, coverage reporting, and security analysis
- Improved user experience with better accessibility and responsive design
Due to these extensive changes, the codebases are now fundamentally different, though the core functionality and game logic remain inspired by the original tracker.
This tracker is designed for A Link to the Past randomizer players who need to:
- Track items: Monitor collected weapons, tools, and upgrades with visual indicators
- Track dungeon progress: See which dungeons are accessible, completed, or still need items
- Track chest locations: Mark which overworld chests have been opened
- Track boss rewards: Monitor crystal and pendant rewards for each dungeon boss
- Track medallion requirements: Manage Bombos, Ether, and Quake medallion requirements for Misery Mire and Turtle Rock
- Frontend: React 19 with TypeScript 5
- Layout: Modern CSS Grid architecture with W3C compliance
- Styling: Custom CSS with game-themed assets and semantic HTML
- Accessibility: WCAG compliant with proper ARIA attributes and full keyboard navigation
- Package Manager: pnpm
- Code Quality: Biome for linting and formatting
- Testing: Vitest with React Testing Library and comprehensive coverage reporting
- Security: CodeQL static analysis for vulnerability detection
- CI/CD: GitHub Actions with automated testing, coverage reporting, and security analysis
- Node.js ≥ 22.0.0
- pnpm ≥ 10.0.0
# Clone the repository
git clone https://github.com/kqesar/alltp-tracker
cd alltp-tracker
# Install dependencies
pnpm install
# Start development server
pnpm devThe application will be available at http://localhost:5173 (or the next available port).
# Build for production
pnpm build
# Preview production build
pnpm preview# Run linter
pnpm lint
# Fix linting issues automatically
pnpm lint:fix
# Run tests
pnpm test
# Run tests with coverage
pnpm test:coverage
# Run tests with coverage and display table
pnpm test:coverage:show
# Display coverage table (requires coverage data)
pnpm coverageThe project includes comprehensive test coverage reporting:
- Terminal Display: Use
pnpm test:coverage:showfor an immediate coverage table - CI Integration: Coverage metrics are automatically reported in PR comments
- Quality Thresholds: 🟢 Excellent (≥90%), 🟡 Good (≥80%), 🟠 Fair (≥70%), 🔴 Needs Improvement (<70%)
- Current Status: 84.37% lines, 85.56% functions, 78.31% branches, 289 tests passing
- Comprehensive Testing: Includes unit tests, integration tests, and keyboard navigation tests
- Click items in the left grid to cycle through their states (0-4 for progressive items, on/off for binary items)
- Visual feedback: Items show as dimmed when not obtained, bright when obtained
- Progressive items: Bow (0-4), Gloves (0-2), Sword (0-4), etc. cycle through upgrade levels
Full keyboard accessibility is supported for power users and accessibility:
- Arrow Keys (⬅️ ➡️ ⬆️ ⬇️): Navigate through the item grid with automatic wrap-around
- Tab/Shift+Tab: Sequential navigation through all interactive elements
- Space/Enter: Activate items to cycle through their states
- Focus Indicators: Visual focus highlights for keyboard navigation
- Grid Position: Intelligent navigation that skips empty cells and maintains position
Full keyboard accessibility is supported for power users and accessibility:
- Arrow Keys (⬅️ ➡️ ⬆️ ⬇️): Navigate through the item grid with automatic wrap-around
- Tab/Shift+Tab: Sequential navigation through all interactive elements
- Space/Enter: Activate items to cycle through their states
- Focus Indicators: Visual focus highlights for keyboard navigation
- Grid Position: Intelligent navigation that skips empty cells and maintains position
- Chest markers: Click to mark overworld chests as opened/unopened
- Boss icons: Click to mark dungeon bosses as beaten
- Hover information: Mouse over any element to see requirements and details
- Touch Gestures: Natural touch interactions for mobile devices
- Tap: Normal interaction (equivalent to left-click)
- Long Press: Alternative interaction for advanced features
- Touch-Optimized: 48px item sizes with 44px minimum touch targets for accessibility
- Responsive Design: Mobile-first approach with adaptive layouts
- Mobile (≤480px): Optimized grid and typography
- Tablet (≤768px): Balanced layout for medium screens
- Desktop (>1024px): Full feature experience
- Device Detection: Automatic capability detection for optimal experience
- Orientation Support: Portrait and landscape modes with adaptive layouts
- Touch Accessibility: Full compatibility with screen readers and assistive technologies
Each dungeon boss has three clickable overlays:
- Top-right (Medallion): For Misery Mire and Turtle Rock, cycle through medallion requirements (Unknown/Bombos/Ether/Quake)
- Bottom-left (Chest count): Track remaining chests in the dungeon
- Bottom-right (Reward): Track the boss reward (Crystal/Pendant type)
- Green: Location/boss is accessible with current items
- Red: Not accessible with current items
- Yellow: Partially accessible (some items missing)
- Dimmed: Already completed/opened
- Weapons: Bow, Boomerang, Hookshot, various rods
- Tools: Hammer, Flippers, Boots, Gloves, Bottles
- Magic: Medallions (Bombos, Ether, Quake), Magic Cape, Cane of Byrna
- Key items: Moon Pearl, Mirror, Book of Mudora, Magic Powder
- Accessibility checking: Real-time calculation of which dungeons can be entered/completed
- Chest requirements: Track which dungeon chests can be obtained
- Boss logic: Separate tracking for boss accessibility vs. dungeon completion
- Medallion requirements: Special logic for Dark World medallion dungeons
- 64 overworld chest locations with requirement logic
- 10 dungeon bosses with individual state tracking
- Interactive overlays for complex dungeon information
- Coordinate transformation for different map orientations
src/
├── components/
│ ├── tracker/ # Item tracking components
│ │ ├── TrackerGrid.tsx # Main item grid layout
│ │ ├── grid/ # Grid rendering components
│ │ │ ├── GridRow.tsx # Individual grid rows
│ │ │ └── GridItem.tsx # Individual grid items
│ │ ├── items/ # Item-specific components
│ │ │ ├── BossItem.tsx # Boss-specific item handling
│ │ │ └── RegularItem.tsx # Standard item handling
│ │ └── overlays/ # Interactive overlay components
│ │ ├── ChestOverlay.tsx # Dungeon chest counter
│ │ ├── RewardOverlay.tsx # Boss reward indicator
│ │ └── MedaillonOverlay.tsx # Medallion requirement selector
│ ├── map/ # Map-related components
│ │ ├── MapTracker.tsx # Interactive map component
│ │ ├── MapChest.tsx # Map chest markers
│ │ ├── DungeonBoss.tsx # Dungeon boss markers
│ │ └── DungeonChest.tsx # Dungeon chest markers
│ └── ui/ # UI utility components
│ ├── Caption.tsx # Hover caption display
│ └── Header.tsx # Fixed header with navigation
├── constants/ # Centralized constants
│ └── index.ts # All hardcoded values and configuration
├── data/
│ ├── chests.ts # Chest and dungeon definitions
│ └── items.ts # Item definitions and layout
├── stores/
│ └── gameStore.ts # Zustand state management
├── styles/ # Modular CSS architecture
│ ├── index.css # Main stylesheet imports
│ ├── variables.css # CSS custom properties and design tokens
│ ├── base.css # Reset styles and foundational rules
│ ├── header.css # Header component styles
│ ├── tracker.css # Item grid and tracker components
│ ├── map.css # Map components and location markers
│ ├── overlays.css # Interactive overlay components
│ ├── ui.css # Caption system and mini icons
│ ├── tooltip.css # Tooltip system with positioning and animations
│ ├── help.css # Help overlay styles with responsive design
│ └── mobile.css # Mobile & touch optimizations
├── hooks/ # Custom React hooks
│ └── useKeyboardNavigation.ts # Keyboard navigation system for tracker grid
├── App.tsx # Main application logic
└── main.tsx # React entry point
The application follows a modular component architecture with clear separation of concerns:
-
tracker/: Contains all item tracking functionality
TrackerGrid: Main container for the CSS Grid-based item layoutgrid/: Rendering components for the CSS Grid structureitems/: Item-specific logic and display componentsoverlays/: Interactive overlay components for complex dungeon interactions
-
map/: Map and location tracking components
MapTracker: Main interactive map with chest and boss markersMapChest: Individual chest marker componentsDungeonBoss: Interactive dungeon boss markersDungeonChest: Dungeon-specific chest counters
-
ui/: Reusable UI components
Caption: Dynamic hover information displayHeader: Fixed header with navigation and external links
-
styles/: Modular CSS architecture
variables.css: CSS custom properties and design tokensbase.css: Reset styles and foundational rulesheader.css: Header component with backdrop blur and responsive designtracker.css: CSS Grid layout system and tracker-specific stylesmap.css: Map components and location markersoverlays.css: Interactive overlay componentsui.css: Caption system and mini iconstooltip.css: Tooltip system with positioning and animationshelp.css: Help overlay styles with responsive designindex.css: Master import file for all stylesheets
-
constants/: Centralized configuration management
- All CSS class names, magic numbers, asset paths, and configuration values
- Simple export pattern for easy maintenance and consistency
- @ Aliases: All imports use
@/aliases instead of relative paths for better maintainability - Examples:
import { CSS_CLASSES } from "@/constants"import { useGameStore } from "@/stores/gameStore"import { TrackerGrid } from "@/components/tracker/TrackerGrid"
- Centralized: All hardcoded values are defined in
src/constants/index.ts - Categorized: Constants are organized into logical groups (CSS_CLASSES, DUNGEON_INDICES, etc.)
- Simple Exports: Uses simple export declarations (
export const OBJECT = {}) - Coverage: Includes CSS class names, magic numbers, asset names, and configuration values
This project uses modern React practices and development standards:
- Functional components with hooks
- TypeScript for type safety and better development experience
- Modular architecture with small, focused components
- @ Alias imports: Use
@/aliases instead of relative imports for better maintainability - Centralized constants: All hardcoded values stored in
@/constantsfor consistency - Biome for consistent code formatting and linting
- Comprehensive testing: All components must have tests with high coverage standards
- Required: All new components must include tests
- Coverage Targets: Lines ≥90%, Functions ≥90%, Branches ≥80%
- Tools: Vitest with React Testing Library
- Commands:
pnpm test- Run testspnpm test:coverage:show- Run tests with coverage tablepnpm coverage- View existing coverage metrics
// ✅ Good - Use @ aliases
import { CSS_CLASSES } from "@/constants";
import { useGameStore } from "@/stores/gameStore";
import { TrackerGrid } from "@/components/tracker/TrackerGrid";
import { Header } from "@/components/ui/Header";
// ❌ Avoid - Relative imports
import { CSS_CLASSES } from "../constants";
import { useGameStore } from "../../stores/gameStore";// ✅ Main App component uses modular CSS
import "@/styles/index.css";
// ✅ Individual style modules are imported via index.css
// - @/styles/variables.css (design tokens)
// - @/styles/base.css (reset and foundation)
// - @/styles/header.css (header component)
// - @/styles/tracker.css (item grid)
// - @/styles/map.css (map components)
// - @/styles/overlays.css (interactive overlays)
// - @/styles/ui.css (caption and mini icons)// ✅ Good - Use centralized constants
### Constants Usage
```tsx
// ✅ Good - Use centralized constants
<div className={CSS_CLASSES.MAP_CONTAINER}>
{GRID_CONSTANTS.ITEMS_PER_ROW}
</div>This project achieves full compliance with modern web standards:
- ✅ Valid HTML5: All generated HTML passes W3C validation
- ✅ Semantic markup: Proper use of semantic elements (
button,section,nav,header,main) - ✅ No deprecated elements: Modern alternatives used throughout
- ✅ Screen reader support: All interactive elements have proper ARIA labels
- ✅ Keyboard navigation: Full keyboard accessibility for all features
- ✅ Semantic buttons: Interactive grid items use
<button>elements instead of table cells - ✅ Focus management: Clear focus indicators and logical tab order
- ✅ CSS Grid layout: Modern layout system replacing legacy table-based approaches
- ✅ No layout tables: CSS Grid used for all grid layouts instead of HTML tables
- ✅ Responsive design: Grid adapts automatically to different screen sizes
- ✅ Custom properties: CSS variables for consistent theming and maintainability
- ✅ Identical rendering: New CSS Grid implementation matches original appearance exactly
- ✅ Same behavior: All user interactions work identically to the original design
- ✅ Performance optimized: Modern CSS Grid provides better performance than table layouts
This transformation was achieved while maintaining 100% visual and functional compatibility with the original design.
// ❌ Avoid - Hardcoded values
This project follows the Conventional Commits specification. All commit messages should be formatted as:
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
- feat: A new feature
- fix: A bug fix
- docs: Documentation only changes
- style: Changes that do not affect the meaning of the code
- refactor: A code change that neither fixes a bug nor adds a feature
- perf: A code change that improves performance
- test: Adding missing tests or correcting existing tests
- build: Changes that affect the build system or external dependencies
- ci: Changes to our CI configuration files and scripts
- chore: Other changes that don't modify src or test files
feat(tracker): add medallion overlay for boss dungeons
fix(map): correct chest coordinates transformation
docs(readme): update installation instructionsReleases are automated using GitHub Actions:
- Automatic: Push to master branch triggers automatic patch release
- Manual: Use GitHub Actions workflow dispatch to create minor/major releases
- Changelog: Automatically generated from conventional commits
Pull requests welcome for bug fixes, feature improvements, and code quality enhancements!
This project is automatically deployed to GitHub Pages using GitHub Actions:
- Trigger: Push to
masterbranch or manual workflow dispatch - Quality Checks:
- ✅
pnpm lint- Code quality validation - ✅
pnpm test:coverage- Test suite execution with coverage reporting - 🔒
CodeQL Analysis- Security vulnerability scanning - ✅
pnpm build- Production build verification - 📊 Coverage metrics automatically reported in PR comments
- 🛡️ Security findings available in GitHub Security tab
- ✅
- Deploy: Built assets are automatically pushed to
gh-pagesbranch and deployed
The deployment uses the traditional gh-pages branch approach:
- Built assets are pushed to the
gh-pagesbranch - GitHub Pages serves content from the
gh-pagesbranch - No environment protection rules interfere with deployment
You can manually trigger a deployment via:
- GitHub Actions → Deploy to GitHub Pages → Run workflow
- ✅ Terminal Coverage Display: New
pnpm test:coverage:showcommand shows formatted coverage table - ✅ CI Coverage Reporting: Automated coverage metrics in PR comments with color-coded status indicators
- ✅ Enhanced Scripts: Added
pnpm coveragefor quick coverage viewing - ✅ Quality Thresholds: Clear coverage standards with visual feedback (🟢🟡🟠🔴)
- ✅ Modern Import System: Complete migration to
@/aliases for better maintainability - ✅ Centralized Constants: All hardcoded values moved to
@/constantsfor consistency - ✅ Comprehensive Testing: High coverage standards with automated reporting
- ✅ Enhanced CI/CD: Integrated coverage reporting in pull request workflow