Documentation Index
Fetch the complete documentation index at: https://mintlify.com/soymatudev/Pokedex-Fleek/llms.txt
Use this file to discover all available pages before exploring further.
Overview
PokéDex Fleek follows a feature-based architecture that separates concerns and makes the codebase scalable and maintainable. The project is built with React Native and Expo, using modern patterns for code organization.Directory Tree
Core Directories Explained
/src/features/ - Feature Modules
Each feature is self-contained with its screens and related logic:
intro/
IntroScreen.js- Splash screen with theme music- First screen shown when app launches
- Plays intro theme and transitions to Home
home/
HomeScreen.js- Main dashboard/menu- Navigation hub to Scanner and Pokédex List
- Background music (Route 1 loop)
pokedex/
PokedexListScreen.js- Browse all 151 Gen 1 PokémonDetailsScreen.js- Detailed Pokémon info from PokéAPI- Displays stats, types, descriptions with Dexter voice narration
scanner/
ScannerScreen.js- Camera interface with color detection- Real-time frame processing with Vision Camera
- Color extraction using
react-native-image-colors - Matches detected colors to Pokémon using hue ranges
pokedexData.js- Static Pokémon color database (hue ranges)
/src/hooks/ - Custom Hooks
Reusable React hooks that encapsulate complex logic:
useCamera.js
- Provides
useCameraDevice('wide-angle-camera') - Checks camera permissions with
useCameraPermission()
useDexterVoice.js
- Uses
expo-speechwith Spanish (es-MX) configuration - Custom pitch (0.57) and rate (1.2) for robotic voice
- Cleans text formatting (removes
\fcharacters)
useSound.js
- Manages audio playback with
expo-av - Handles looping background music
- Configures audio mode for iOS silent mode
/src/services/ - Pure Functions
ColorService.js
Utility functions for color matching algorithms:The Euclidean distance formula works in 3D RGB space. Note: The actual scanner implementation uses HSL hue range matching rather than RGB Euclidean distance for better color family grouping.
/src/navigation/ - Routing
AppRouter.js
Stack-based navigation with React Navigation 7:Intro- Splash screen (headerShown: false)Home- Main menuScanner- Camera scannerPokedexList- Pokémon gridDetails- Individual Pokémon info
/src/theme/ - Design System
theme.js
Centralized theme configuration:Configuration Files
app.json
Expo configuration:- App name: “Pokedex-Fleek”
- New Architecture enabled:
true - Camera permissions for iOS/Android
- Plugins:
react-native-vision-camera,react-native-video - EAS Project ID:
48249dfc-e43a-4b6c-bb06-0f1ac9742e05
eas.json
Build profiles:development- Dev builds with developmentClientpreview- Internal distributionproduction- Auto-increment version numbers
babel.confoig.js
Critical plugins for worklets:Adding New Features
Best Practices
-
Create a new feature directory:
-
Add route to AppRouter.js:
-
Extract reusable logic to hooks:
-
Use theme constants:
-
Keep screens focused:
- Screens should handle UI and navigation only
- Move complex logic to hooks or services
- Keep feature folders small and focused
Example Feature Structure
Import Paths
Recommended Import Structure
Key Dependencies
| Package | Purpose | Location Used |
|---|---|---|
react-navigation | Navigation | AppRouter.js |
react-native-vision-camera | Camera API | Scanner |
react-native-image-colors | Color extraction | Scanner |
expo-speech | Text-to-speech | Details, Voice hook |
expo-av | Audio playback | Sound hook |
react-native-reanimated | Animations | Frame processors |
react-native-worklets-core | JS worklets | Scanner frame processing |
nativewind | Tailwind CSS | (Optional, not actively used) |
Architecture Principles
Separation of Concerns
- Features = UI + Navigation logic
- Hooks = Reusable business logic
- Services = Pure utility functions
- Theme = Design tokens
Feature Independence
Each feature folder should be self-contained and could theoretically be extracted into its own package.
Progressive Enhancement
Start simple, add complexity only when needed. Don’t over-engineer early.
Next Steps
Running Locally
Set up your development environment
Building the App
Create production builds with EAS