# tanishqkrk/ariwa architecture

> Architecture diagram of the GitHub repository tanishqkrk/ariwa, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/tanishqkrk/ariwa
- Repository: https://github.com/tanishqkrk/ariwa

## Overview

This repository is a work-in-progress word-guessing game web app. The visible player flow is to browse game modes, open a mode, and play a word-guessing round with a grid and keyboard; settings and local game state support play. The README provides no additional product description, and the daily-word page is only a stub. The multiplayer mode data and hint API routes exist in the tree, but their behavior and wiring were not established by the sampled source, so they are not represented as a connected workflow.

Main entry points: [`app/play/casual-mode/page.tsx`](https://github.com/tanishqkrk/ariwa/blob/main/app/play/casual-mode/page.tsx) (Casual game), [`app/page.tsx`](https://github.com/tanishqkrk/ariwa/blob/main/app/page.tsx) (Home), [`components/GlobalSettingsComponent.tsx`](https://github.com/tanishqkrk/ariwa/blob/main/components/GlobalSettingsComponent.tsx) (Global settings), [`app/all-modes/page.tsx`](https://github.com/tanishqkrk/ariwa/blob/main/app/all-modes/page.tsx) (Mode catalog)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Mode discovery"]
  node_home["Home<br/>[page.tsx]"]
  node_mode_catalog["Mode catalog<br/>[page.tsx]"]
  node_mode_data["Mode definitions<br/>[GameModesData.ts]"]
end

subgraph group_gameplay["Word gameplay"]
  node_casual_game["Casual game<br/>[page.tsx]"]
  node_daily_word["Daily word stub<br/>[page.tsx]"]
  node_game_grid["Guess grid<br/>[GameGrid.tsx]"]
  node_keyboard["Game keyboard<br/>[Keyboard.tsx]"]
end

subgraph group_shared["Shared UI and state"]
  node_site_shell["Site shell<br/>[layout.tsx]"]
  node_navbar["Navigation<br/>[Navbar.tsx]"]
  node_carousel["Mode carousel<br/>[Carousel.tsx]"]
  node_settings["Global settings"]
  node_game_state["Game settings state"]
  node_drawer["Drawer UI<br/>[Drawer.tsx]"]
  node_switch["Settings switch<br/>[Switch.tsx]"]
  node_slider["Settings slider<br/>[Slider.tsx]"]
  node_tabs["Mode tabs<br/>[Tabs.tsx]"]
  node_modal["Game modal<br/>[Modal.tsx]"]
  node_sounds["Sound effects<br/>[sounds.ts]"]
  node_stopwatch["Stopwatch hook<br/>[useStopwatch.tsx]"]
end

subgraph group_worddata["Word logic"]
  node_word_checker["Word validation<br/>[checkWord.ts]"]
  node_word_generator["Word selection"]
  node_word_lists["Word lists<br/>[words.json]"]
  node_dictionary["Dictionary data<br/>[dictionary.json]"]
end

node_player(("Player"))

node_player -.->|"opens"| node_home
node_home -->|"renders"| node_navbar
node_home -->|"renders"| node_carousel
node_home -->|"renders"| node_settings
node_home -->|"reads"| node_mode_data
node_home -->|"links to"| node_mode_catalog
node_mode_catalog -->|"renders"| node_tabs
node_mode_catalog -->|"reads"| node_mode_data
node_mode_catalog -.->|"links to"| node_casual_game
node_site_shell -->|"renders"| node_navbar
node_site_shell -->|"provides"| node_game_state
node_casual_game -->|"renders"| node_game_grid
node_casual_game -->|"uses"| node_keyboard
node_casual_game -->|"validates with"| node_word_checker
node_casual_game -->|"requests word"| node_word_generator
node_casual_game -->|"renders"| node_settings
node_casual_game -->|"uses"| node_drawer
node_casual_game -->|"plays"| node_sounds
node_casual_game -->|"uses"| node_stopwatch
node_settings -->|"reads and updates"| node_game_state
node_settings -->|"uses"| node_drawer
node_settings -->|"renders"| node_switch
node_settings -->|"renders"| node_slider
node_keyboard -->|"reads"| node_game_state
node_word_checker -->|"checks"| node_word_lists
node_word_checker -->|"checks"| node_dictionary
node_word_generator -->|"filters"| node_word_lists

click node_home "https://github.com/tanishqkrk/ariwa/blob/main/app/page.tsx"
click node_mode_catalog "https://github.com/tanishqkrk/ariwa/blob/main/app/all-modes/page.tsx"
click node_mode_data "https://github.com/tanishqkrk/ariwa/blob/main/lib/GameModesData.ts"
click node_casual_game "https://github.com/tanishqkrk/ariwa/blob/main/app/play/casual-mode/page.tsx"
click node_daily_word "https://github.com/tanishqkrk/ariwa/blob/main/app/play/daily-word/page.tsx"
click node_game_grid "https://github.com/tanishqkrk/ariwa/blob/main/components/GameGrid.tsx"
click node_keyboard "https://github.com/tanishqkrk/ariwa/blob/main/components/Keyboard.tsx"
click node_word_checker "https://github.com/tanishqkrk/ariwa/blob/main/utils/checkWord.ts"
click node_word_generator "https://github.com/tanishqkrk/ariwa/blob/main/utils/generateRandomWord.ts"
click node_word_lists "https://github.com/tanishqkrk/ariwa/blob/main/utils/words.json"
click node_dictionary "https://github.com/tanishqkrk/ariwa/blob/main/utils/dictionary.json"
click node_site_shell "https://github.com/tanishqkrk/ariwa/blob/main/app/layout.tsx"
click node_navbar "https://github.com/tanishqkrk/ariwa/blob/main/components/Navbar.tsx"
click node_carousel "https://github.com/tanishqkrk/ariwa/blob/main/components/Carousel.tsx"
click node_settings "https://github.com/tanishqkrk/ariwa/blob/main/components/GlobalSettingsComponent.tsx"
click node_game_state "https://github.com/tanishqkrk/ariwa/blob/main/context/GameDataContext.tsx"
click node_drawer "https://github.com/tanishqkrk/ariwa/blob/main/components/ui/Drawer.tsx"
click node_switch "https://github.com/tanishqkrk/ariwa/blob/main/components/ui/Switch.tsx"
click node_slider "https://github.com/tanishqkrk/ariwa/blob/main/components/ui/Slider.tsx"
click node_tabs "https://github.com/tanishqkrk/ariwa/blob/main/components/Tabs.tsx"
click node_modal "https://github.com/tanishqkrk/ariwa/blob/main/components/Modal.tsx"
click node_sounds "https://github.com/tanishqkrk/ariwa/blob/main/lib/sounds.ts"
click node_stopwatch "https://github.com/tanishqkrk/ariwa/blob/main/lib/useStopwatch.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_home,node_mode_catalog,node_mode_data toneBlue
class node_casual_game,node_daily_word,node_game_grid,node_keyboard toneAmber
class node_site_shell,node_navbar,node_carousel,node_settings,node_game_state,node_drawer,node_switch,node_slider,node_tabs,node_modal,node_sounds,node_stopwatch toneMint
class node_word_checker,node_word_generator,node_word_lists,node_dictionary toneRose
class node_player toneIndigo
```

## Components

### Mode discovery

- [Home](https://github.com/tanishqkrk/ariwa/blob/main/app/page.tsx): `app/page.tsx`
- [Mode catalog](https://github.com/tanishqkrk/ariwa/blob/main/app/all-modes/page.tsx): `app/all-modes/page.tsx`
- [Mode definitions](https://github.com/tanishqkrk/ariwa/blob/main/lib/GameModesData.ts): `lib/GameModesData.ts`

### Word gameplay

- [Casual game](https://github.com/tanishqkrk/ariwa/blob/main/app/play/casual-mode/page.tsx): `app/play/casual-mode/page.tsx`
- [Daily word stub](https://github.com/tanishqkrk/ariwa/blob/main/app/play/daily-word/page.tsx): `app/play/daily-word/page.tsx`
- [Guess grid](https://github.com/tanishqkrk/ariwa/blob/main/components/GameGrid.tsx): `components/GameGrid.tsx`
- [Game keyboard](https://github.com/tanishqkrk/ariwa/blob/main/components/Keyboard.tsx): `components/Keyboard.tsx`

### Shared UI and state

- [Site shell](https://github.com/tanishqkrk/ariwa/blob/main/app/layout.tsx): `app/layout.tsx`
- [Navigation](https://github.com/tanishqkrk/ariwa/blob/main/components/Navbar.tsx): `components/Navbar.tsx`
- [Mode carousel](https://github.com/tanishqkrk/ariwa/blob/main/components/Carousel.tsx): `components/Carousel.tsx`
- [Global settings](https://github.com/tanishqkrk/ariwa/blob/main/components/GlobalSettingsComponent.tsx): `components/GlobalSettingsComponent.tsx`
- [Game settings state](https://github.com/tanishqkrk/ariwa/blob/main/context/GameDataContext.tsx): `context/GameDataContext.tsx`
- [Drawer UI](https://github.com/tanishqkrk/ariwa/blob/main/components/ui/Drawer.tsx): `components/ui/Drawer.tsx`
- [Settings switch](https://github.com/tanishqkrk/ariwa/blob/main/components/ui/Switch.tsx): `components/ui/Switch.tsx`
- [Settings slider](https://github.com/tanishqkrk/ariwa/blob/main/components/ui/Slider.tsx): `components/ui/Slider.tsx`
- [Mode tabs](https://github.com/tanishqkrk/ariwa/blob/main/components/Tabs.tsx): `components/Tabs.tsx`
- [Game modal](https://github.com/tanishqkrk/ariwa/blob/main/components/Modal.tsx): `components/Modal.tsx`
- [Sound effects](https://github.com/tanishqkrk/ariwa/blob/main/lib/sounds.ts): `lib/sounds.ts`
- [Stopwatch hook](https://github.com/tanishqkrk/ariwa/blob/main/lib/useStopwatch.tsx): `lib/useStopwatch.tsx`

### Word logic

- [Word validation](https://github.com/tanishqkrk/ariwa/blob/main/utils/checkWord.ts): `utils/checkWord.ts`
- [Word selection](https://github.com/tanishqkrk/ariwa/blob/main/utils/generateRandomWord.ts): `utils/generateRandomWord.ts`
- [Word lists](https://github.com/tanishqkrk/ariwa/blob/main/utils/words.json): `utils/words.json`
- [Dictionary data](https://github.com/tanishqkrk/ariwa/blob/main/utils/dictionary.json): `utils/dictionary.json`

### Other components

- **Player**

## Connections

- Player → Home: opens
- Home → Navigation: renders (evidence: `app/page.tsx`)
- Home → Mode carousel: renders (evidence: `app/page.tsx`)
- Home → Global settings: renders (evidence: `app/page.tsx`)
- Home → Mode definitions: reads (evidence: `app/page.tsx`)
- Home → Mode catalog: links to (evidence: `app/page.tsx`)
- Mode catalog → Mode tabs: renders (evidence: `app/all-modes/page.tsx`)
- Mode catalog → Mode definitions: reads (evidence: `app/all-modes/page.tsx`)
- Mode catalog → Casual game: links to
- Site shell → Navigation: renders (evidence: `app/layout.tsx`)
- Site shell → Game settings state: provides (evidence: `app/layout.tsx`)
- Casual game → Guess grid: renders (evidence: `app/play/casual-mode/page.tsx`)
- Casual game → Game keyboard: uses (evidence: `app/play/casual-mode/page.tsx`)
- Casual game → Word validation: validates with (evidence: `app/play/casual-mode/page.tsx`)
- Casual game → Word selection: requests word (evidence: `app/play/casual-mode/page.tsx`)
- Casual game → Global settings: renders (evidence: `app/play/casual-mode/page.tsx`)
- Casual game → Drawer UI: uses (evidence: `app/play/casual-mode/page.tsx`)
- Casual game → Sound effects: plays (evidence: `app/play/casual-mode/page.tsx`)
- Casual game → Stopwatch hook: uses (evidence: `app/play/casual-mode/page.tsx`)
- Global settings → Game settings state: reads and updates (evidence: `components/GlobalSettingsComponent.tsx`)
- Global settings → Drawer UI: uses (evidence: `components/GlobalSettingsComponent.tsx`)
- Global settings → Settings switch: renders (evidence: `components/GlobalSettingsComponent.tsx`)
- Global settings → Settings slider: renders (evidence: `components/GlobalSettingsComponent.tsx`)
- Game keyboard → Game settings state: reads (evidence: `components/Keyboard.tsx`)
- Word validation → Word lists: checks (evidence: `utils/checkWord.ts`)
- Word validation → Dictionary data: checks (evidence: `utils/checkWord.ts`)
- Word selection → Word lists: filters (evidence: `utils/generateRandomWord.ts`)
