A comprehensive Progressive Web App (PWA) for learning English-Arabic vocabulary with interactive flashcards and multiple practice modes, now featuring AI-powered image extraction using Google's Gemini API.
- Interactive Flashcards: Flip cards to see English words and Arabic translations
- Multiple Practice Modes:
- ✍️ Typing Quiz
- 🎯 Multiple Choice
- 📝 Fill in the Blank
- 🔀 Word Scramble
- 🎧 Listening Practice
- Statistics Tracking: Monitor your progress and study streaks
- Dark/Light Theme: Toggle between themes for comfortable studying
- Audio Pronunciation: Listen to English words using text-to-speech
- Export/Import: Save and load your flashcards as JSON files
- 📸 Upload Images: Drag & drop or click to upload images containing English-Arabic word pairs
- 🔍 AI Extraction: Uses Google's Gemini Vision API to automatically extract words from images
- 📝 Smart Parsing: Converts extracted text into structured flashcards with examples
- ✅ Selective Addition: Choose which extracted words to add to your collection
- 🔑 API Integration: Secure API key management with local storage
- Modern web browser (Chrome, Firefox, Safari, Edge)
- Gemini API key (for image extraction feature)
- Clone or Download the project files
- Open
index.htmlin your web browser - Install as PWA (optional): Click the install prompt for a native app experience
- Visit Google AI Studio
- Create a new API key
- Enter your API key in the app's "Gemini API Key" field
- The key will be saved locally for future use
- Fill in the English word, Arabic meaning, and example sentence
- Click "Add Flashcard"
- Upload Image: Click the upload area or drag & drop an image
- Enter API Key: Provide your Gemini API key
- Extract Words: Click "Extract Words" to process the image
- Review Results: Check the extracted words and examples
- Add Selected: Choose which words to add to your flashcards
- Browse: Use arrow buttons to navigate through cards
- Flip: Click on cards to see translations and examples
- Shuffle: Enable shuffle mode for random card order
- Practice: Use different quiz modes to test your knowledge
- Typing Quiz: Type the English word for Arabic meanings
- Multiple Choice: Choose from 4 options
- Fill in Blank: Complete sentences with missing words
- Word Scramble: Unscramble letters to form words
- Listening: Listen and type what you hear
- Frontend: HTML5, CSS3, JavaScript (ES6+)
- AI Integration: Google Gemini Vision API
- PWA Features: Service Worker, Web App Manifest
- Storage: Local Storage for data persistence
- Audio: Web Speech API for pronunciation
- Chrome 88+
- Firefox 85+
- Safari 14+
- Edge 88+
├── index.html # Main application
├── script.js # JavaScript functionality
├── styles.css # Styling and themes
├── manifest.json # PWA manifest
├── sw.js # Service worker
├── icons/ # App icons
└── README.md # This file
- Modify colors and themes in
styles.css - Adjust API prompts in
script.js - Update PWA settings in
manifest.json
The app uses the Gemini Vision API for image processing. The prompt is optimized for:
- English-Arabic word pairs
- Clear text extraction
- Structured JSON output
- Example sentence generation
- Offline Support: Works without internet connection
- Installable: Add to home screen like a native app
- Responsive: Optimized for mobile and desktop
- Fast Loading: Cached resources for quick access
- Local Storage: All data stored locally on your device
- API Key Security: API keys stored securely in browser storage
- No Server: No data sent to external servers (except Gemini API)
- Privacy First: Your flashcards and progress remain private
Image Extraction Not Working:
- Check your API key is correct
- Ensure image is clear and contains readable text
- Verify image size is under 10MB
- Check browser console for error messages
Audio Not Playing:
- Ensure browser supports Web Speech API
- Check system audio settings
- Try refreshing the page
Data Not Saving:
- Check browser storage permissions
- Ensure sufficient storage space
- Try clearing browser cache
- Use compressed images for faster uploads
- Close other tabs to free up memory
- Update browser to latest version
Feel free to contribute to this project by:
- Reporting bugs
- Suggesting new features
- Improving documentation
- Submitting pull requests
This project is open source and available under the MIT License.
- Google Gemini API for AI-powered image processing
- Web Speech API for audio functionality
- PWA community for progressive web app standards
Happy Learning! 📚✨