Ansari Chat is a cross-platform mobile and web application that provides an AI-powered Islamic knowledge assistant. Built with React Native and Expo, it offers users an intuitive chat interface to ask questions about Islamic teachings, practices, and guidance.
- AI Chat Interface: Interactive conversation with an Islamic knowledge assistant
 - Multi-language Support: Internationalization with i18next
 - Cross-Platform: Runs on iOS, Android, and Web
 - Thread Management: Organize conversations in separate threads
 - Share Functionality: Share conversations with others
 - User Authentication: Secure login and registration system
 - Guest Mode: Try the app without creating an account
 - Dark/Light Theme: Automatic theme switching based on device settings
 - Markdown Support: Rich text formatting in chat messages
 - RTL Support: Full support for Arabic and other RTL languages
 
- React Native 0.76.7 - Mobile framework
 - Expo SDK 52 - Development platform
 - TypeScript - Type-safe JavaScript
 - Redux Toolkit - State management
 - NativeWind - Tailwind CSS for React Native
 
- expo-router - File-based routing
 - react-i18next - Internationalization
 - react-native-reanimated - Smooth animations
 - react-native-gesture-handler - Touch gestures
 - react-native-markdown-display - Markdown rendering
 - @sentry/react-native - Error tracking
 - @vercel/analytics - Web analytics
 - formik & yup - Form handling and validation
 
- Node.js 18+ and npm/yarn
 - Expo CLI (
npm install -g expo-cli) - iOS Simulator (Mac only) or Android emulator
 - EAS CLI for building (
npm install -g eas-cli) 
- Clone the repository:
 
git clone [repository-url]
cd ansari-frontend- Install dependencies:
 
npm install- Set up environment variables:
 
cp .env.example .env.localEdit .env.local with your configuration:
EXPO_PUBLIC_ENVIRONMENT=development
EXPO_PUBLIC_API_V2_URL=https://your-api-url/api/v2
EXPO_PUBLIC_API_TIMEOUT=60000
EXPO_PUBLIC_SHARE_URL=http://localhost:8081
EXPO_PUBLIC_SUBSCRIBE_URL=your-subscribe-url
EXPO_PUBLIC_FEEDBACK_EMAIL=[email protected]
EXPO_PUBLIC_COMPREHENSIVE_GUIDE_URL=https://docs.yourdomain.com/capabilities/
EXPO_PUBLIC_PRIVACY_URL=https://docs.yourdomain.com/privacy/
EXPO_PUBLIC_TERMS_URL=https://docs.yourdomain.com/terms/
EXPO_PUBLIC_ENABLE_SHARE=falseStart the development server:
npm start
# or with cache clear
npm run start:clearRun on specific platforms:
npm run ios          # iOS Simulator
npm run android      # Android Emulator
npm run web          # Web browserRun on physical devices:
npm run ios:device
npm run android:devicenpm run build:developmentnpm run build:previewnpm run build:productionnpm run android:preview   # Android preview APK
npm run ios:preview       # iOS preview buildnpm run lint                    # Check all files
npx eslint [file-path]          # Check specific file
npx eslint [file-path] --fix    # Auto-fix issuesThe project uses:
- ESLint for code linting
 - Prettier for code formatting
 - TypeScript strict mode
 - Custom lint rules (see 
.eslintrc.js) 
ansari-frontend/
βββ src/
β   βββ app/                   # Expo Router pages
β   β   βββ (app)/             # Authenticated routes
β   β   βββ (public)/          # Public routes
β   β   βββ share/             # Share functionality
β   β   βββ welcome/           # Onboarding
β   βββ assets/                # Images, fonts, etc.
β   βββ components/            # Reusable components
β   β   βββ buttons/           # Button components
β   β   βββ chat/              # Chat-related components
β   β   βββ menu/              # Menu components
β   β   βββ prompts/           # Prompt components
β   β   βββ share/             # Share components
β   β   βββ svg/               # SVG icon components
β   β   βββ threads/           # Thread management
β   βββ constants/             # App constants
β   βββ hooks/                 # Custom React hooks
β   βββ i18n/                  # Internationalization
β   βββ services/              # API services
β   βββ store/                 # Redux store
β   β   βββ actions/           # Redux actions
β   β   βββ slices/            # Redux slices
β   β   βββ types/             # TypeScript types
β   βββ styles/                # Global styles
β   βββ utils/                 # Utility functions
βββ public/                    # Static assets (web)
βββ config/                    # Configuration files
βββ docs/                      # Documentation
The app connects to a backend API for:
- User authentication
 - Chat conversations
 - Thread management
 - User preferences
 - Feedback submission
 
API configuration is managed through environment variables.
npm run build
# Deploy the 'dist' folder to Vercel- Build APK/AAB:
 
npm run android:release- Submit to Google Play:
 
eas submit -p android- Build IPA:
 
npm run ios:release- Submit to App Store:
 
eas submit -p iosDeploy over-the-air updates:
npm run update:development   # Development channel
npm run update:preview       # Preview channel
npm run update:production    # Production channel- Create a feature branch from 
develop - Make your changes
 - Run linting: 
npm run lint - Test on multiple platforms
 - Create a pull request to 
develop 
See CLAUDE.md for detailed development guidelines including:
- Code style requirements
 - Git workflow
 - Build commands
 - Common patterns
 
- Use React Native Debugger for debugging
 - Sentry integration for error tracking in production
 - Console logs visible in Metro bundler terminal
 
This project is licensed under the MIT License - see the LICENSE file for details.