# 🔧 PlugSnatcher - Development Roadmap

## Project Setup ✅
- [x] Create project roadmap
- [x] Initialize Tauri + React project
- [x] Setup basic project structure
- [x] Create Remote repository (optional)

## Core Infrastructure (Completed) ✅
- [x] Setup SQLite or JSON storage for plugin data
- [x] Create core data models
- [x] Build server/plugin directory scanner (basic implementation)
- [x] Implement asynchronous server scanning (non-blocking)
- [x] Implement JAR file parser for plugin.yml extraction

## Plugin Discovery (Completed) ✅
- [x] Improve server type detection (Paper/Spigot distinction, etc.)
- [x] Implement plugins folder detection logic
- [x] Design plugin metadata extraction system
  - [x] Extract basic fields (name, version, author, etc.)
  - [x] Extract website field from plugin.yml
- [x] Build plugin hash identification system
- [x] Create plugin matching algorithm

## Web Crawler Development (Mostly Completed)
- [x] Create base web crawler architecture
- [x] Implement HangarMC crawler
- [x] Implement SpigotMC data source using SpiGet API
  - [x] Basic implementation
  - [x] Fix version information retrieval issues
  - [ ] Handle rate limiting and 403 errors
- [x] Implement Modrinth crawler
  - [x] Basic implementation
  - [x] Version compatibility checking
  - [x] Fix version number display issues
  - [ ] Handle rate limit issues
- [ ] Implement GitHub releases crawler
  - [x] Basic implementation
  - [ ] Complete API authentication

## Update Management (Mostly Completed)
- [x] Build update detection system (Basic logic)
- [x] Improve update detection reliability
  - [x] Correctly fetch detailed version information from repositories
  - [x] Implement robust version comparison logic (handling non-SemVer, suffixes, etc.)
  - [x] Implement proper request headers (User-Agent, etc.) to mimic browser behavior
  - [x] Add delays between API requests to mitigate rate limiting
  - [x] Implement automatic retry logic for rate limits (429) and network errors
  - [x] Implement API response caching (reduce requests, improve performance)
  - [x] Implement intelligent name variation searches for plugins
  - [x] Fix SpigotMC version retrieval issues
  - [x] Fix update check progress getting stuck
  - [x] Complete Modrinth integration
  - [x] Fix incorrect plugin matching issues
  - [x] Improve matching algorithm to reduce false positives
  - [ ] Complete GitHub integration
  - [ ] Add GitHub API authentication (optional token)
  - [ ] Investigate SpigotMC 403 errors (potentially add headers/delay)
- [x] Implement changelog extraction
- [x] Create plugin backup functionality
- [x] Develop plugin replacement logic
- [x] Implement plugin source persistence (store identified repo/ID to avoid searching)
  - [ ] Allow manual setting/clearing of persistent source
- [x] Add plugin update UI integration
  - [x] Add update buttons to plugin listing and details view
  - [x] Show update progress with loading indicators
  - [x] Handle file access errors gracefully
  - [x] Ensure correct version numbering in filenames
  - [ ] Present multiple potential matches for ambiguous plugins
  - [ ] Make version numbers clickable links to repository sources
  - [ ] Allow user selection of correct plugin match when multiple are found
- [ ] Server platform compatibility matching (High Priority)
  - [ ] Detect server platform and version accurately (Paper, Spigot, Forge, NeoForge, Fabric, etc.)
  - [ ] Filter plugin updates to match the server platform
  - [ ] Prevent incompatible version updates
  - [ ] Add platform indicators in the UI for available updates
  - [ ] Allow manual selection of target platform when multiple are available

## UI Development (In Progress)
- [x] Design and implement main dashboard
- [x] Refine plugin list view styling and layout
- [x] Add progress indicator for server scanning
- [x] Build server folder selection interface
- [x] Implement plugin detail view
- [x] Add update notification system
- [x] Add per-plugin update check button & loading indicator
- [x] Add visual feedback for bulk update check (progress, loading state)
- [x] Implement error handling in UI with user-friendly messages
- [ ] Create settings panel
- [x] Implement dark mode
- [ ] Implement plugin matching disambiguation UI
- [ ] Add clickable version links to repository pages
- [ ] Add error recovery UI for failed updates
- [ ] Add detailed progress logging in UI for debugging

## Security Features (Upcoming)
- [ ] Implement sandboxing for network requests
- [ ] Add SHA256 checksum verification
- [ ] Create download warning system for unverified sources

## Testing & Refinement (Upcoming)
- [ ] Comprehensive testing with various server setups
- [ ] Performance optimization (especially concurrent requests)
- [ ] Error handling improvements (parsing, network, etc.)
- [ ] User acceptance testing
- [ ] Add automated tests for critical functionality
- [ ] Add error telemetry (optional)

## Documentation (Upcoming)
- [ ] Create user documentation
- [ ] Write developer documentation
- [ ] Create installation guide
- [ ] Add troubleshooting guide
- [ ] Document known limitations and workarounds

## Deployment (Upcoming)
- [ ] Prepare release process
- [ ] Package application for Windows
- [ ] Package application for macOS
- [ ] Package application for Linux
- [ ] Create project website (optional)

## Future Enhancements (v0.2.0+)
- [ ] Plugin conflict checker
- [ ] Minecraft version compatibility checker
- [ ] Server config backup & restore manager
- [ ] Scheduled plugin update checks
- [ ] Rollback system
- [ ] Plugin recommendation system
- [ ] Discord webhook integration
- [ ] Plugin search and browse functionality
- [ ] Plugin install from repository