How akanosz2/skygarden works
SkyGarden is a web app for Hypixel SkyBlock farming: players fetch a profile to inspect farming stats and fortune, while a separate greenhouse planner and crop-rate panel support layout planning. The profile workflow runs from the profile page through shared player state and the server API into a stats pipeline that queries Mojang/Hypixel and computes derived statistics. README documents API credentials; the source index shows a Discord token and server integrations, but does not establish their runtime flow. Several feature branches are mapped from documented routes and module structure; unsampled links are omitted where call ownership is unclear.
Main entry points: pipeline.ts Profile pipeline · Leaderboard.tsx Farm leaderboard · server.ts API server · App.tsx Route app
Components 30
Web app
- Route app
src/App.tsx - Profile view
src/pages/Profile.tsx - Player state
src/context/PlayerDataContext.tsx - Player data hook
src/hooks/usePlayerData.ts - Farm leaderboard
src/pages/Leaderboard.tsx
Player stats
- Profile pipeline
src/features/playerStats/pipeline.ts - Inventory decode
src/features/playerStats/utils/inventory.ts - NBT decoder
src/features/playerStats/utils/decode.ts - Farming stats
src/features/playerStats/stats/farming.ts - Misc stats
src/features/playerStats/stats/misc.ts - Pet stats
src/features/playerStats/stats/pets.ts - Crop stats
src/features/playerStats/stats/crops.ts - Fortune calculation
src/features/playerStats/fortune/calculate.ts - Item metadata
src/features/playerStats/data/itemData.ts
Garden planning
- Crop rates
src/components/leaderboard/RatesPanel.tsx - Crop catalog
src/components/shared/CropData.ts - Greenhouse planner
src/pages/Greenhouse.tsx - Greenhouse grid
src/features/greenhouse/components/GridLayout.tsx - Crop inputs
src/features/greenhouse/components/InputCrops.tsx - Crop calculator
src/components/calculator/InputCrops.tsx - Crop stats
src/components/calculator/Stats.tsx
Data services
- API server
server.ts - Mojang lookup
src/features/playerStats/services/mojang.ts - Hypixel API
src/features/playerStats/services/hypixel.ts - Item pricing
src/features/itemPrices/index.ts - Bazaar prices
src/features/itemPrices/services/bazaar.ts - Response cache
src/cache/cache.ts
Other components
- Player
- Hypixel service
- Mojang service
Connections 34
- Player → Route app: opens
src/App.tsx - Route app → Profile view: routes to
src/App.tsx - Route app → Farm leaderboard: routes to
src/App.tsx - Profile view → Player state: reads state
src/pages/Profile.tsx - Player state → Player data hook: creates
src/context/PlayerDataContext.tsx - Player data hook → API server: fetches player
src/hooks/usePlayerData.ts - API server → Profile pipeline: loads profile
server.ts - Profile pipeline → Mojang lookup: resolves name
src/features/playerStats/pipeline.ts - Profile pipeline → Hypixel API: fetches profiles
src/features/playerStats/pipeline.ts - Hypixel API → Hypixel service: requests data
src/features/playerStats/services/hypixel.ts - Mojang lookup → Mojang service: resolves UUID
src/features/playerStats/services/mojang.ts - Profile pipeline → Inventory decode: extracts items
src/features/playerStats/pipeline.ts - Profile pipeline → NBT decoder: decodes backpack
src/features/playerStats/pipeline.ts - Profile pipeline → Farming stats: computes levels
src/features/playerStats/pipeline.ts - Profile pipeline → Misc stats: computes bonuses
src/features/playerStats/pipeline.ts - Profile pipeline → Pet stats: loads pets
src/features/playerStats/pipeline.ts - Profile pipeline → Crop stats: computes crop data
src/features/playerStats/pipeline.ts - Profile pipeline → Fortune calculation: calculates fortune
src/features/playerStats/pipeline.ts - Inventory decode → NBT decoder: decodes data
src/features/playerStats/utils/inventory.ts - Fortune calculation → Item metadata: uses metadata
src/features/playerStats/fortune/calculate.ts - Misc stats → Item metadata: uses metadata
src/features/playerStats/stats/misc.ts - Pet stats → Item metadata: uses metadata
src/features/playerStats/stats/pets.ts - Farm leaderboard → Crop rates: renders
src/pages/Leaderboard.tsx - Farm leaderboard → Crop calculator: renders
src/pages/Leaderboard.tsx - Farm leaderboard → Crop stats: renders
src/pages/Leaderboard.tsx - Crop rates → Crop catalog: formats crops
src/components/leaderboard/RatesPanel.tsx - Greenhouse planner → Greenhouse grid: renders
src/pages/Greenhouse.tsx - Greenhouse planner → Crop inputs: renders
src/pages/Greenhouse.tsx - Crop inputs → Crop catalog: uses crop data
src/features/greenhouse/components/InputCrops.tsx - Crop calculator → Crop catalog: uses crop data
src/components/calculator/InputCrops.tsx - Crop stats → Profile pipeline: uses player stats
src/components/calculator/Stats.tsx - API server → Item pricing: serves prices
server.ts - Item pricing → Bazaar prices: queries bazaar
src/features/itemPrices/index.ts - API server → Response cache: uses cache
server.ts