A beautiful, animated Expo React Native app for the Dr. Detective API (Akinator game). Features a detective character with dynamic expressions and smooth animations.
By NextgenX - Mobile Edition
- ๐ญ Animated Detective Character with 7 different expressions
- ๐ Gorgeous UI with gradients and smooth transitions
- ๐ฏ Dynamic Expressions that change based on game progress
- ๐ฑ Fully Responsive mobile experience
- ๐ Multi-Language Support (16 languages)
- ๐จ Multiple Themes (Characters, Animals, Objects)
- โก Smooth Animations using React Native Reanimated
- ๐ Real-time Progress Tracking
- ๐ Victory Animations with character reveals
- Detective character with "thinking" expression
- Language selector with flags
- Theme selector with emojis
- Animated start button
- Dynamic detective expressions:
- ๐ค Thinking (0-40% progress)
- ๐ Curious (40-60% progress)
- โจ Excited (60-80% progress)
- ๐ Confident (80-100% progress)
- ๐ Confused (after 20 questions)
- ๐ Victory (when guessed)
- ๐ฒ Shocked (when guess rejected)
- Character image with details
- Accept/Reject buttons
- Play again functionality
- Node.js 16+ installed
- Expo CLI installed globally
- Expo Go app on your mobile device
- Dr_DetectiveAPI deployed to Vercel (or running locally)
- Navigate to project directory:
cd DrDetectiveExpo- Install dependencies:
npm install- Configure API URL (Optional - already set):
The API URL is configured in .env:
API_BASE_URL=https://dr-detective-api-ddgt.vercel.app/apiTo change it, edit .env file and restart with npm start --clear
See ENV_SETUP.md for detailed configuration options.
- Start the app:
npm start- Run on your device:
- Scan the QR code with Expo Go app (Android)
- Scan with Camera app (iOS)
- Navigate to your API directory:
cd ../Dr_DetectiveAPI- Install Vercel CLI (if not already installed):
npm install -g vercel- Deploy:
vercel- Copy the deployment URL and update it in the Expo app:
// services/DrDetectiveAPI.js
const API_BASE_URL = 'https://your-deployment-url.vercel.app/api';- Start the Flask API:
cd ../Dr_DetectiveAPI
python api.py- Find your computer's IP:
# Linux/Mac
hostname -I | awk '{print $1}'
# Or check network settings
ip addr show | grep "inet "- Update API URL in Expo app:
const API_BASE_URL = 'http://YOUR_IP:5000/api';
// Example: 'http://192.168.1.100:5000/api'DrDetectiveExpo/
โโโ App.js # Main app with navigation
โโโ package.json # Dependencies
โโโ app.json # Expo configuration
โโโ babel.config.js # Babel configuration
โ
โโโ services/
โ โโโ DrDetectiveAPI.js # API service layer
โ
โโโ components/
โ โโโ Detective.js # Animated detective character
โ
โโโ screens/
โ โโโ HomeScreen.js # Start screen
โ โโโ GameScreen.js # Game/question screen
โ
โโโ assets/ # Images and icons
The detective character dynamically changes expressions based on the game state:
| Expression | Trigger | Eyes | Icon |
|---|---|---|---|
| Thinking | Start/Low progress | ๐ค | ๐ |
| Curious | 40-60% progress | ๐ | โ |
| Excited | 60-80% progress | โจ | ๐ |
| Confident | 80%+ progress | ๐ | ๐ก |
| Confused | 20+ questions | ๐ | โ |
| Victory | Correct guess | ๐ | ๐ |
| Shocked | Guess rejected | ๐ฒ |
-
Start the app and select your preferences:
- Choose a theme (Characters, Animals, or Objects)
- Choose a language
-
Think of a character (or animal/object)
-
Answer the detective's questions:
- โ Yes
- โ No
- ๐คท Don't Know
- ๐ค Probably
- ๐ Probably Not
-
Watch the detective get more confident as progress increases
-
When the detective makes a guess:
- Accept if correct
- Reject to continue playing
# Start Expo development server
npm start
# Start on Android emulator
npm run android
# Start on iOS simulator (Mac only)
npm run ios
# Start in web browser
npm run webDetective Component (components/Detective.js):
- Animated character with breathing effect
- Dynamic color gradients based on expression
- Glow animation
- Progress indicator
- Bounce effect on expression changes
API Service (services/DrDetectiveAPI.js):
- Singleton API client
- Automatic session management
- Error handling
- Connection testing
- Support for all API endpoints
Home Screen (screens/HomeScreen.js):
- Language and theme selection
- Entrance animations
- API connection testing
- Error handling with user feedback
Game Screen (screens/GameScreen.js):
- Question display with animations
- Answer buttons with gradients
- Progress tracking
- Victory screen with character info
- Back navigation
- ๐ฌ๐ง English (en)
- ๐ช๐ธ Spanish (es)
- ๐ซ๐ท French (fr)
- ๐ฉ๐ช German (de)
- ๐ฎ๐น Italian (it)
- ๐ฏ๐ต Japanese (jp)
- ๐ฐ๐ท Korean (kr)
- ๐จ๐ณ Chinese (cn)
- ๐ท๐บ Russian (ru)
- ๐น๐ท Turkish (tr)
- ๐ต๐น Portuguese (pt)
- ๐ณ๐ฑ Dutch (nl)
- ๐ต๐ฑ Polish (pl)
- ๐ธ๐ฆ Arabic (ar)
- ๐ฎ๐ฑ Hebrew (il)
- ๐ฎ๐ฉ Indonesian (id)
- ๐ค Characters - Famous people, fictional characters
- ๐พ Animals - Real and fictional animals
- ๐ฆ Objects - Various objects and things
Problem: App can't connect to API
Solutions:
- Check API URL in
services/DrDetectiveAPI.js - Ensure API is running (check with browser)
- Use IP address instead of localhost for physical devices
- Check firewall settings on your computer
Problem: API returns error when starting game
Solutions:
- Check API logs for errors
- Verify Vercel deployment is working
- Test API endpoint in browser:
https://your-api.vercel.app/ - Check network connectivity
Problem: Character appears static
Solutions:
- Ensure
react-native-reanimatedis installed - Check
babel.config.jsincludes reanimated plugin - Restart Expo with
npm start --clear
Problem: QR code scan doesn't work
Solutions:
- Ensure phone and computer are on same WiFi
- Try tunnel mode:
npm start --tunnel - Update Expo Go app to latest version
# Install EAS CLI
npm install -g eas-cli
# Configure EAS
eas build:configure
# Build APK
eas build --platform android --profile preview# Build for iOS
eas build --platform iosEdit gradients in screens/components:
// Example: Change background gradient
<LinearGradient
colors={['#YOUR_COLOR_1', '#YOUR_COLOR_2', '#YOUR_COLOR_3']}
style={styles.container}
/>Add to components/Detective.js:
case 'your_expression':
return {
eyes: '๐',
mouth: '๐',
color1: '#FF6B6B',
color2: '#4ECDC4'
};Adjust timing in components:
Animated.timing(scaleAnim, {
toValue: 1.05,
duration: 2000, // Change duration
useNativeDriver: true,
})MIT License
- API: Dr_DetectiveAPI (Flask wrapper for akinator.py)
- Base Library: akinator.py by Omkaar
- Framework: Expo / React Native
- Animations: React Native Reanimated
- Navigation: React Navigation
- Original Game: Akinator.com
Contributions welcome! Please feel free to submit a Pull Request.
Having issues? Please check:
- API is running and accessible
- API URL is correctly configured
- All dependencies are installed
- Expo Go app is up to date
Made with โค๏ธ by NextgenX
Enjoy playing Dr. Detective! ๐ต๏ธโโ๏ธ๐