Wordle LOTR is built with Expo and uses Expo Router for file-based navigation. Every file inside theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/PixelGenetics/Wordle-LOTR-RN/llms.txt
Use this file to discover all available pages before exploring further.
app/ directory maps directly to a route, and TypeScript is used throughout the entire codebase — from game logic and component props to the dictionary schema and StyleSheet definitions.
Directory Layout
Key Files
app/index.tsx
The root entry point of the app. It contains a single <Redirect href="/screen/home" /> from expo-router, which immediately forwards any visitor of the root URL to the main game screen. No game logic lives here.
app/screen/home.tsx
The heart of the application. All game state and UI reside in this single component. It handles:
- State management — current guess (
char), color feedback (colors), message display (mensaje), answer reveal (showAnswer), confetti (showConfetti), and guess counter (counter) - Word selection — a random
wordItemis chosen from thedictionaryarray on mount and on each new-word refresh - Guess validation (
validarIntento) — compares the typed guess against the secret word and produces per-letter color feedback using a two-pass algorithm (correct position first, then present-but-wrong-position) - Hint and reveal — two hint texts (
explicacion,explicacion2) are displayed at all times; a reveal button appears after 3 failed attempts - Confetti — a
ConfettiCannonfires when the player guesses correctly
Dictionary/dictionary.tsx
Exports two things: the wordItem TypeScript interface and the dictionary array containing 50+ Middle-earth entries. Each entry has a canonical name (nombre) and three lore-based clues (explicacion, explicacion2, explicacion3). The hints are written in Spanish.
styles/homeStyle.ts
Contains all StyleSheet.create() definitions for app/screen/home.tsx. Keeping styles in a dedicated file ensures the JSX in the game screen remains readable and that styles are reusable without inline objects.
constants/theme.ts
Exports two constants used across the shared component layer:
Colors— light and dark color palettes for text, background, tint, and icon colorsFonts— platform-specific font stacks selected viaPlatform.selectfor iOS, Android, and web
Routing
Expo Router treats theapp/ directory as a route tree. The project currently defines a single real screen:
| File | Route |
|---|---|
app/index.tsx | / → redirects to /screen/home |
app/screen/home.tsx | /screen/home |
wordlelotr://, defined by the scheme field in app.json. This means the home screen is reachable at wordlelotr://screen/home from external apps or device links.
This project uses Expo’s New Architecture (
newArchEnabled: true), React Compiler (reactCompiler: true), and typed routes (typedRoutes: true). newArchEnabled is set at the root of the expo object in app.json, while reactCompiler and typedRoutes are nested under the experiments block. Together they provide better runtime performance, automatic memoization, and compile-time route safety.