# naru-kami/naru-kami.github.io architecture

> Architecture diagram of the GitHub repository naru-kami/naru-kami.github.io, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/naru-kami/naru-kami.github.io
- Repository: https://github.com/naru-kami/naru-kami.github.io

## Overview

This React application lets users configure Genshin Impact wish or artifact parameters, then calculate or simulate outcomes and inspect charts or breakdowns. The wishing workflow branches into an analytical calculation and a sampled, worker-based simulation; artifact settings feed a separate artifact analysis view. Browser storage preserves configuration and results. The route setup, artifact page composition, wishing store, and simulation worker dispatch are evidenced in excerpts or the source index; some unsampled calculation details and artifact execution links are therefore omitted or marked unverified.

Main entry points: [`src/pages/Artifacts/Main.tsx`](https://github.com/naru-kami/naru-kami.github.io/blob/main/src/pages/Artifacts/Main.tsx) (Artifact page), [`src/index.tsx`](https://github.com/naru-kami/naru-kami.github.io/blob/main/src/index.tsx) (App routes), [`src/pages/Wishing/Statistic/Calculation.tsx`](https://github.com/naru-kami/naru-kami.github.io/blob/main/src/pages/Wishing/Statistic/Calculation.tsx) (Calculation view), [`src/pages/Wishing/Store.tsx`](https://github.com/naru-kami/naru-kami.github.io/blob/main/src/pages/Wishing/Store.tsx) (Wish state)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_navigation["Application navigation"]
  node_router["App routes<br/>[index.tsx]"]
  node_home["Home page<br/>[Main.tsx]"]
  node_wish_page["Wishing page<br/>[Main.tsx]"]
end

subgraph group_wish_inputs["Wish configuration"]
  node_wish_store[("Wish state<br/>[Store.tsx]")]
  node_character["Character inputs<br/>[CharacterInput.tsx]"]
  node_weapon["Weapon inputs<br/>[WeaponInput.tsx]"]
  node_wish_options["Wish options<br/>[Modebar.tsx]"]
  node_currency["Currency switch"]
  node_local_storage[("Preference storage")]
end

subgraph group_wish_analysis["Wish analysis"]
  node_calculation["Calculation view<br/>[Calculation.tsx]"]
  node_calc_run["Calculation runner<br/>[RunButton.tsx]"]
  node_calc_worker["Calculation engine<br/>[MainWorker.ts]"]
  node_calc_results["Calculation chart<br/>[chart.tsx]"]
  node_simulation["Simulation view<br/>[Simulation.tsx]"]
  node_sim_run["Simulation runner<br/>[RunButton.tsx]"]
  node_sim_main_worker["Primary worker<br/>[MainWorker.ts]"]
  node_sim_worker["Sample worker<br/>[Worker.ts]"]
  node_sim_results["Simulation chart<br/>[chart.tsx]"]
end

subgraph group_artifact_analysis["Artifact analysis"]
  node_artifact_page["Artifact page<br/>[Main.tsx]"]
  node_artifact_store[("Artifact state<br/>[Store.tsx]")]
  node_artifact_inputs["Artifact settings"]
  node_artifact_run["Artifact runner<br/>[RunButton.tsx]"]
  node_artifact_engine["Artifact engine<br/>[MainWorker.ts]"]
  node_artifact_info["Artifact details<br/>[Info.tsx]"]
  node_artifact_charts["Artifact results<br/>[Chart.tsx]"]
  node_artifact_breakdown["Artifact breakdown<br/>[Breakdown.tsx]"]
end

node_user(("User"))

node_user -->|"opens app"| node_router
node_router -->|"routes to"| node_home
node_router -->|"routes to"| node_wish_page
node_router -->|"routes to"| node_calculation
node_router -->|"routes to"| node_simulation
node_router -->|"routes to"| node_artifact_page
node_wish_page -->|"provides state"| node_wish_store
node_wish_page -->|"renders"| node_currency
node_character -->|"updates"| node_wish_store
node_character -->|"renders"| node_wish_options
node_weapon -->|"updates"| node_wish_store
node_currency -->|"persists preference"| node_local_storage
node_calculation -->|"renders"| node_character
node_calculation -->|"renders"| node_weapon
node_calculation -->|"renders"| node_wish_options
node_calculation -->|"renders"| node_calc_run
node_calculation -->|"renders"| node_calc_results
node_calc_run -->|"reads state"| node_wish_store
node_calc_run -.->|"dispatches calculation"| node_calc_worker
node_simulation -->|"renders"| node_sim_run
node_simulation -->|"renders"| node_sim_results
node_sim_run -->|"reads and updates"| node_wish_store
node_sim_run -->|"dispatches samples"| node_sim_main_worker
node_sim_run -->|"dispatches samples"| node_sim_worker
node_sim_main_worker -->|"uses wish state"| node_wish_store
node_sim_worker -->|"uses wish state"| node_wish_store
node_artifact_page -->|"provides state"| node_artifact_store
node_artifact_page -->|"renders"| node_artifact_inputs
node_artifact_page -->|"renders"| node_artifact_run
node_artifact_page -->|"renders"| node_artifact_info
node_artifact_page -->|"renders"| node_artifact_charts
node_artifact_page -->|"renders"| node_artifact_breakdown
node_artifact_engine -->|"uses artifact state"| node_artifact_store
node_artifact_run -->|"reads state"| node_artifact_store
node_artifact_run -.->|"dispatches analysis"| node_artifact_engine
node_artifact_charts -->|"reads results"| node_artifact_store
node_artifact_breakdown -->|"reads results"| node_artifact_store

click node_router "https://github.com/naru-kami/naru-kami.github.io/blob/main/src/index.tsx"
click node_home "https://github.com/naru-kami/naru-kami.github.io/blob/main/src/pages/Home/Main.tsx"
click node_wish_page "https://github.com/naru-kami/naru-kami.github.io/blob/main/src/pages/Wishing/Main.tsx"
click node_wish_store "https://github.com/naru-kami/naru-kami.github.io/blob/main/src/pages/Wishing/Store.tsx"
click node_character "https://github.com/naru-kami/naru-kami.github.io/blob/main/src/pages/Wishing/InputCards/CharacterInput.tsx"
click node_weapon "https://github.com/naru-kami/naru-kami.github.io/blob/main/src/pages/Wishing/InputCards/WeaponInput.tsx"
click node_wish_options "https://github.com/naru-kami/naru-kami.github.io/blob/main/src/pages/Wishing/InputCards/Modebar.tsx"
click node_currency "https://github.com/naru-kami/naru-kami.github.io/blob/main/src/pages/Wishing/InputCards/CurrencySwitcher.tsx"
click node_local_storage "https://github.com/naru-kami/naru-kami.github.io/blob/main/src/hooks/useLocalStorage.tsx"
click node_calculation "https://github.com/naru-kami/naru-kami.github.io/blob/main/src/pages/Wishing/Statistic/Calculation.tsx"
click node_calc_run "https://github.com/naru-kami/naru-kami.github.io/blob/main/src/pages/Wishing/Statistic/Components/RunButton.tsx"
click node_calc_worker "https://github.com/naru-kami/naru-kami.github.io/blob/main/src/pages/Wishing/Statistic/Data/MainWorker.ts"
click node_calc_results "https://github.com/naru-kami/naru-kami.github.io/blob/main/src/pages/Wishing/Statistic/Components/chart.tsx"
click node_simulation "https://github.com/naru-kami/naru-kami.github.io/blob/main/src/pages/Wishing/Simulation/Simulation.tsx"
click node_sim_run "https://github.com/naru-kami/naru-kami.github.io/blob/main/src/pages/Wishing/Simulation/Components/RunButton.tsx"
click node_sim_main_worker "https://github.com/naru-kami/naru-kami.github.io/blob/main/src/pages/Wishing/Simulation/Data/MainWorker.ts"
click node_sim_worker "https://github.com/naru-kami/naru-kami.github.io/blob/main/src/pages/Wishing/Simulation/Data/Worker.ts"
click node_sim_results "https://github.com/naru-kami/naru-kami.github.io/blob/main/src/pages/Wishing/Simulation/Components/chart.tsx"
click node_artifact_page "https://github.com/naru-kami/naru-kami.github.io/blob/main/src/pages/Artifacts/Main.tsx"
click node_artifact_store "https://github.com/naru-kami/naru-kami.github.io/blob/main/src/pages/Artifacts/Data/Store.tsx"
click node_artifact_inputs "https://github.com/naru-kami/naru-kami.github.io/blob/main/src/pages/Artifacts/components/ArtifactMainProps.tsx"
click node_artifact_run "https://github.com/naru-kami/naru-kami.github.io/blob/main/src/pages/Artifacts/RunButton.tsx"
click node_artifact_engine "https://github.com/naru-kami/naru-kami.github.io/blob/main/src/pages/Artifacts/Data/MainWorker.ts"
click node_artifact_info "https://github.com/naru-kami/naru-kami.github.io/blob/main/src/pages/Artifacts/infoUI/Info.tsx"
click node_artifact_charts "https://github.com/naru-kami/naru-kami.github.io/blob/main/src/pages/Artifacts/infoUI/Chart.tsx"
click node_artifact_breakdown "https://github.com/naru-kami/naru-kami.github.io/blob/main/src/pages/Artifacts/infoUI/Breakdown.tsx"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_router,node_home,node_wish_page,node_user toneBlue
class node_wish_store,node_character,node_weapon,node_wish_options,node_currency,node_local_storage toneAmber
class node_calculation,node_calc_run,node_calc_worker,node_calc_results,node_simulation,node_sim_run,node_sim_main_worker,node_sim_worker,node_sim_results toneMint
class node_artifact_page,node_artifact_store,node_artifact_inputs,node_artifact_run,node_artifact_engine,node_artifact_info,node_artifact_charts,node_artifact_breakdown toneRose
```

## Components

### Application navigation

- [App routes](https://github.com/naru-kami/naru-kami.github.io/blob/main/src/index.tsx): `src/index.tsx`
- [Home page](https://github.com/naru-kami/naru-kami.github.io/blob/main/src/pages/Home/Main.tsx): `src/pages/Home/Main.tsx`
- [Wishing page](https://github.com/naru-kami/naru-kami.github.io/blob/main/src/pages/Wishing/Main.tsx): `src/pages/Wishing/Main.tsx`

### Wish configuration

- [Wish state](https://github.com/naru-kami/naru-kami.github.io/blob/main/src/pages/Wishing/Store.tsx): `src/pages/Wishing/Store.tsx`
- [Character inputs](https://github.com/naru-kami/naru-kami.github.io/blob/main/src/pages/Wishing/InputCards/CharacterInput.tsx): `src/pages/Wishing/InputCards/CharacterInput.tsx`
- [Weapon inputs](https://github.com/naru-kami/naru-kami.github.io/blob/main/src/pages/Wishing/InputCards/WeaponInput.tsx): `src/pages/Wishing/InputCards/WeaponInput.tsx`
- [Wish options](https://github.com/naru-kami/naru-kami.github.io/blob/main/src/pages/Wishing/InputCards/Modebar.tsx): `src/pages/Wishing/InputCards/Modebar.tsx`
- [Currency switch](https://github.com/naru-kami/naru-kami.github.io/blob/main/src/pages/Wishing/InputCards/CurrencySwitcher.tsx): `src/pages/Wishing/InputCards/CurrencySwitcher.tsx`
- [Preference storage](https://github.com/naru-kami/naru-kami.github.io/blob/main/src/hooks/useLocalStorage.tsx): `src/hooks/useLocalStorage.tsx`

### Wish analysis

- [Calculation view](https://github.com/naru-kami/naru-kami.github.io/blob/main/src/pages/Wishing/Statistic/Calculation.tsx): `src/pages/Wishing/Statistic/Calculation.tsx`
- [Calculation runner](https://github.com/naru-kami/naru-kami.github.io/blob/main/src/pages/Wishing/Statistic/Components/RunButton.tsx): `src/pages/Wishing/Statistic/Components/RunButton.tsx`
- [Calculation engine](https://github.com/naru-kami/naru-kami.github.io/blob/main/src/pages/Wishing/Statistic/Data/MainWorker.ts): `src/pages/Wishing/Statistic/Data/MainWorker.ts`
- [Calculation chart](https://github.com/naru-kami/naru-kami.github.io/blob/main/src/pages/Wishing/Statistic/Components/chart.tsx): `src/pages/Wishing/Statistic/Components/chart.tsx`
- [Simulation view](https://github.com/naru-kami/naru-kami.github.io/blob/main/src/pages/Wishing/Simulation/Simulation.tsx): `src/pages/Wishing/Simulation/Simulation.tsx`
- [Simulation runner](https://github.com/naru-kami/naru-kami.github.io/blob/main/src/pages/Wishing/Simulation/Components/RunButton.tsx): `src/pages/Wishing/Simulation/Components/RunButton.tsx`
- [Primary worker](https://github.com/naru-kami/naru-kami.github.io/blob/main/src/pages/Wishing/Simulation/Data/MainWorker.ts): `src/pages/Wishing/Simulation/Data/MainWorker.ts`
- [Sample worker](https://github.com/naru-kami/naru-kami.github.io/blob/main/src/pages/Wishing/Simulation/Data/Worker.ts): `src/pages/Wishing/Simulation/Data/Worker.ts`
- [Simulation chart](https://github.com/naru-kami/naru-kami.github.io/blob/main/src/pages/Wishing/Simulation/Components/chart.tsx): `src/pages/Wishing/Simulation/Components/chart.tsx`

### Artifact analysis

- [Artifact page](https://github.com/naru-kami/naru-kami.github.io/blob/main/src/pages/Artifacts/Main.tsx): `src/pages/Artifacts/Main.tsx`
- [Artifact state](https://github.com/naru-kami/naru-kami.github.io/blob/main/src/pages/Artifacts/Data/Store.tsx): `src/pages/Artifacts/Data/Store.tsx`
- [Artifact settings](https://github.com/naru-kami/naru-kami.github.io/blob/main/src/pages/Artifacts/components/ArtifactMainProps.tsx): `src/pages/Artifacts/components/ArtifactMainProps.tsx`
- [Artifact runner](https://github.com/naru-kami/naru-kami.github.io/blob/main/src/pages/Artifacts/RunButton.tsx): `src/pages/Artifacts/RunButton.tsx`
- [Artifact engine](https://github.com/naru-kami/naru-kami.github.io/blob/main/src/pages/Artifacts/Data/MainWorker.ts): `src/pages/Artifacts/Data/MainWorker.ts`
- [Artifact details](https://github.com/naru-kami/naru-kami.github.io/blob/main/src/pages/Artifacts/infoUI/Info.tsx): `src/pages/Artifacts/infoUI/Info.tsx`
- [Artifact results](https://github.com/naru-kami/naru-kami.github.io/blob/main/src/pages/Artifacts/infoUI/Chart.tsx): `src/pages/Artifacts/infoUI/Chart.tsx`
- [Artifact breakdown](https://github.com/naru-kami/naru-kami.github.io/blob/main/src/pages/Artifacts/infoUI/Breakdown.tsx): `src/pages/Artifacts/infoUI/Breakdown.tsx`

### Other components

- **User**

## Connections

- User → App routes: opens app (evidence: `src/index.tsx`)
- App routes → Home page: routes to (evidence: `src/index.tsx`)
- App routes → Wishing page: routes to (evidence: `src/index.tsx`)
- App routes → Calculation view: routes to (evidence: `src/index.tsx`)
- App routes → Simulation view: routes to (evidence: `src/index.tsx`)
- App routes → Artifact page: routes to (evidence: `src/index.tsx`)
- Wishing page → Wish state: provides state (evidence: `src/pages/Wishing/Main.tsx`)
- Wishing page → Currency switch: renders (evidence: `src/pages/Wishing/Main.tsx`)
- Character inputs → Wish state: updates (evidence: `src/pages/Wishing/InputCards/CharacterInput.tsx`)
- Character inputs → Wish options: renders (evidence: `src/pages/Wishing/InputCards/CharacterInput.tsx`)
- Weapon inputs → Wish state: updates (evidence: `src/pages/Wishing/InputCards/WeaponInput.tsx`)
- Currency switch → Preference storage: persists preference (evidence: `src/pages/Wishing/InputCards/CurrencySwitcher.tsx`)
- Calculation view → Character inputs: renders (evidence: `src/pages/Wishing/Statistic/Calculation.tsx`)
- Calculation view → Weapon inputs: renders (evidence: `src/pages/Wishing/Statistic/Calculation.tsx`)
- Calculation view → Wish options: renders (evidence: `src/pages/Wishing/Statistic/Calculation.tsx`)
- Calculation view → Calculation runner: renders (evidence: `src/pages/Wishing/Statistic/Calculation.tsx`)
- Calculation view → Calculation chart: renders (evidence: `src/pages/Wishing/Statistic/Calculation.tsx`)
- Calculation runner → Wish state: reads state (evidence: `src/pages/Wishing/Statistic/Components/RunButton.tsx`)
- Calculation runner → Calculation engine: dispatches calculation (evidence: `src/pages/Wishing/Statistic/Data/MainWorker.ts`)
- Simulation view → Simulation runner: renders (evidence: `src/pages/Wishing/Simulation/Simulation.tsx`)
- Simulation view → Simulation chart: renders (evidence: `src/pages/Wishing/Simulation/Simulation.tsx`)
- Simulation runner → Wish state: reads and updates (evidence: `src/pages/Wishing/Simulation/Components/RunButton.tsx`)
- Simulation runner → Primary worker: dispatches samples (evidence: `src/pages/Wishing/Simulation/Components/RunButton.tsx`)
- Simulation runner → Sample worker: dispatches samples (evidence: `src/pages/Wishing/Simulation/Components/RunButton.tsx`)
- Primary worker → Wish state: uses wish state (evidence: `src/pages/Wishing/Simulation/Data/MainWorker.ts`)
- Sample worker → Wish state: uses wish state (evidence: `src/pages/Wishing/Simulation/Data/Worker.ts`)
- Artifact page → Artifact state: provides state (evidence: `src/pages/Artifacts/Main.tsx`)
- Artifact page → Artifact settings: renders (evidence: `src/pages/Artifacts/Main.tsx`)
- Artifact page → Artifact runner: renders (evidence: `src/pages/Artifacts/Main.tsx`)
- Artifact page → Artifact details: renders (evidence: `src/pages/Artifacts/Main.tsx`)
- Artifact page → Artifact results: renders (evidence: `src/pages/Artifacts/Main.tsx`)
- Artifact page → Artifact breakdown: renders (evidence: `src/pages/Artifacts/Main.tsx`)
- Artifact engine → Artifact state: uses artifact state (evidence: `src/pages/Artifacts/Data/MainWorker.ts`)
- Artifact runner → Artifact state: reads state (evidence: `src/pages/Artifacts/RunButton.tsx`)
- Artifact runner → Artifact engine: dispatches analysis
- Artifact results → Artifact state: reads results (evidence: `src/pages/Artifacts/infoUI/Chart.tsx`)
- Artifact breakdown → Artifact state: reads results (evidence: `src/pages/Artifacts/infoUI/Breakdown.tsx`)
