How anto34mtp/clashofclans works
CoC Tracker is a multi-user village progression and upgrade-planning site. Players register, create villages, import game state through pasted JSON or the official Clash of Clans API, then view catalog-based upgrade suggestions and track manually started timers. The graph separates account/village management, imports, planning, and persistence. Source excerpts show the JSON and planner paths; API endpoint internals and browser-side dispatch are not fully sampled, so those links rely on documented capabilities or are omitted where uncertain.
Main entry points: functions.php Upgrade Planner · schema.sql MySQL Store · village.php Village View · start_upgrade.php Upgrade Actions
Components 20
Accounts and Villages
- Account Pages
login.php - Village Dashboard
dashboard.php - Village View
village.php
Village Imports
- Import Screen
import.php - JSON Import
includes/json_import.php - API Sync Endpoint
api/import_api.php - CoC API Client
includes/coc_api.php - Building ID Map
data/building_id_map.php
Planning and Upgrades
- Upgrade Planner
includes/functions.php - Upgrade Actions
api/start_upgrade.php - Upgrade Listing
api/list_upgrades.php - Live Countdown
assets/js/countdown.js - Game Costs and Mapping
data/game_data.php
Shared Runtime and Data
- Authentication
includes/auth.php - MySQL Store
database/schema.sql - PDO Access
includes/db.php - AJAX Bootstrap
api/bootstrap.php - CSRF Protection
includes/csrf.php
Other components
- Player
- Clash of Clans API
Connections 26
- Player → Account Pages: signs in
README.md - Account Pages → Authentication: authenticates
includes/auth.php - Player → Village Dashboard: manages villages
dashboard.php - Village Dashboard → Authentication: requires login
dashboard.php - Village Dashboard → MySQL Store: creates and lists
dashboard.php - Player → Village View: views progress
README.md - Village View → Upgrade Planner: builds suggestions
village.php - Village View → Upgrade Listing: requests upgrades
- Player → Import Screen: submits game data
import.php - Import Screen → JSON Import: parses and resolves
import.php - JSON Import → Building ID Map: looks up IDs
README.md - JSON Import → MySQL Store: writes village state
includes/json_import.php - Player → API Sync Endpoint: requests API sync
README.md - API Sync Endpoint → CoC API Client: uses client
api/import_api.php - CoC API Client → Clash of Clans API: fetches player data
README.md - API Sync Endpoint → AJAX Bootstrap: loads shared bootstrap
api/import_api.php - Upgrade Planner → MySQL Store: reads village and catalog
includes/functions.php - Upgrade Planner → Game Costs and Mapping: uses costs and durations
README.md - Upgrade Actions → AJAX Bootstrap: loads shared bootstrap
api/start_upgrade.php - Upgrade Actions → Upgrade Planner: uses upgrade helpers
- Upgrade Actions → MySQL Store: records upgrade state
- Village View → Live Countdown: loads timer script
village.php - AJAX Bootstrap → CSRF Protection: loads protection
api/bootstrap.php - PDO Access → MySQL Store: connects to
includes/db.php - Authentication → PDO Access: queries accounts
includes/auth.php - Upgrade Planner → PDO Access: queries state
includes/functions.php