This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Susy Recipe Viewer is a web-based recipe browser for the Supersymmetry Minecraft modpack. It displays items, fluids, and recipes from the game without requiring Minecraft to be running.
npm run dev # Start development server
npm run build # TypeScript check + Vite build
npm run lint # Run ESLint
npm run preview # Preview production build
npm run process-data # Process recipedump.json into compressed chunksImportant: Run npm run process-data before building if public/data/ is missing. This processes the 37MB recipedump.json into gzipped chunks.
recipedump.json(game dump) →npm run process-data→ compressed.json.gzfiles inpublic/data/- Browser loads compressed data via
dataLoader.ts→ decompresses with pako → cached in memory - Zustand stores (
useItemStore,useFluidStore,useRecipeStore) manage state with reactive filtering - Recipe lookup: Detail pages →
getRecipesForItem/Fluid→ loads recipe indexes → fetches recipe details from cached maps
HomePage.tsx- Landing page with statistics and navigation cardsItemsPage.tsx- List view of all items with search functionalityItemDetailPage.tsx- Detailed view of a single item with recipesFluidsPage.tsx- List view of all fluids with properties displayFluidDetailPage.tsx- Detailed view of a single fluid with recipes
layout/- Layout componentsHeader.tsx- Navigation header with links to Items/Fluids sections
recipes/- Recipe display componentsRecipeList.tsx- Main recipe container with tabbed interface (Output/Input) and pagination (25 recipes per page)MachineRecipeCard.tsx- Displays GregTech machine recipes with EU/t and duration formattingCraftingRecipeCard.tsx- Displays vanilla crafting recipes (shaped & shapeless)SmeltingRecipeCard.tsx- Displays furnace smelting recipesItemSlot.tsx- Displays item slots with count, chance, and catalyst indicatorsFluidSlot.tsx- Displays fluid slots with amount formatting (mB/B)index.ts- Barrel export file for recipe components
useItemStore.ts- Global item data store with search/filter/mod/rarity logicuseFluidStore.ts- Global fluid data store with search/filter logicuseRecipeStore.ts- Global recipe data store with recipe fetching and caching
items.ts- Item and ItemStack types, ItemWithDisplay, ChancedOutputfluids.ts- Fluid and FluidStack types, ChancedFluidOutputrecipes.ts- Recipe types (GTRecipeInput, Recipe, RecipeMap, CraftingRecipe, SmeltingRecipe, Machine, RecipeDump)recipeIndex.ts- Recipe indexing types (RecipeRef, RecipeIndexEntry, ItemRecipeIndex, FluidRecipeIndex, LoadedRecipe, RecipesForItem/Fluid)
dataLoader.ts- Data fetching with gzip decompression and caching- Generic loader:
loadCompressedJSON<T>() - Specific loaders:
loadItems(),loadFluids(),loadOreDict(),loadCrafting(),loadSmelting(),loadMachines(),loadRecipeMap(),loadRecipeMapManifest(),loadItemSearchIndex(),loadFluidSearchIndex(),loadMetadata(),loadItemRecipeIndex(),loadFluidRecipeIndex()
- Generic loader:
process-recipedump.ts- Main data processing pipeline- Reads
recipedump.jsonfrom game dump - Builds item and fluid recipe indexes with wildcard handling
- Compresses all data files with gzip
- Creates recipe map manifest
- Generates search indexes for items and fluids
- Outputs to
public/data/directory
- Reads
- Root level:
items.json.gz,fluids.json.gz,oreDict.json.gz,crafting.json.gz,smelting.json.gz,machines.json.gz,metadata.json.gz recipemaps/: Individual recipe map files ({mapname}.json.gz) for each GregTech recipe map +manifest.json.gzindexes/:search-items.json.gz,search-fluids.json.gz,recipe-index-items.json.gz,recipe-index-fluids.json.gz
Uses React Router v7 with base path /susy-recipe-viewer/ for GitHub Pages deployment.
/- Home page/items- Items list page/items/:id- Item detail page with recipes/fluids- Fluids list page/fluids/:id- Fluid detail page with recipes
Builds to docs/ directory for GitHub Pages. Vite config sets custom middleware to handle gzipped content properly.
The recipe system uses an indexing approach:
- Item key format:
"resource:metadata"(supports wildcards at metadata 32767) - Fluid key format:
"unlocalizedName" - Each entry tracks:
asInput(consumed by recipes) andasOutput(produced by recipes) - Recipe types: Machine (GregTech), Crafting (vanilla shaped/shapeless), Smelting (furnace)
- React 19 + TypeScript 5.9 (strict mode)
- Vite 6 (build tool)
- Zustand 5 (state management)
- Tailwind CSS 4 (styling)
- React Router 7 (navigation)
- pako 2.1 (gzip decompression)
- Lucide React 0.563 (icons)
- Component Organization: Page components in
routes/, reusable incomponents/ - Store Pattern: Zustand stores with get/set pattern, lazy-loading with fetch functions
- Type Safety: All components fully typed
- Performance: Gzip compression, in-memory caching, pagination (25 recipes per page), search debouncing (300ms)
- Styling: Tailwind CSS utility classes, gray-800 background, blue accents
GitHub Actions workflow on push to main: installs deps → processes data → builds → deploys to GitHub Pages.