|
| 1 | +# Flag Trainer |
| 2 | + |
| 3 | +A modern, progressive web application for learning world flags through interactive quizzes and games. |
| 4 | + |
| 5 | +## Features |
| 6 | + |
| 7 | +### Multiple Game Modes |
| 8 | +- Quiz Mode: Test your knowledge with multiple-choice questions |
| 9 | +- Type Mode: Type in country names directly |
| 10 | +- Picker Mode: Visual flag selection interface |
| 11 | + |
| 12 | +### Customization Options |
| 13 | +- Region Selection |
| 14 | + - Europe |
| 15 | + - Asia |
| 16 | + - North America |
| 17 | + - South America |
| 18 | + - Africa |
| 19 | + - Oceania |
| 20 | + - Mix and match multiple regions |
| 21 | + - At least one region must be selected |
| 22 | + |
| 23 | +### Language Support |
| 24 | +- Multiple interface languages: |
| 25 | + - English |
| 26 | + - German (Deutsch) |
| 27 | + - Spanish (Español) |
| 28 | + - Russian (Русский) |
| 29 | +- Automatic browser language detection |
| 30 | +- Country names are translated in all game modes |
| 31 | +- UI elements adapt to selected language |
| 32 | + |
| 33 | +### Progressive Web App Features |
| 34 | +- Installable as a standalone app |
| 35 | +- Offline functionality |
| 36 | +- Responsive design for all screen sizes |
| 37 | +- Dark/light mode support based on system preferences |
| 38 | +- Touch-friendly interface |
| 39 | +- Keyboard navigation support |
| 40 | + |
| 41 | +### Game Progress Features |
| 42 | +- Real-time progress tracking |
| 43 | +- Score percentage display |
| 44 | +- End-of-game statistics |
| 45 | +- Option to replay incorrectly answered flags |
| 46 | +- Complete game restart capability |
| 47 | +- Session preservation for interrupted games |
| 48 | +- Smooth transitions between flags |
| 49 | +- Pre-loading of next flag for seamless experience |
| 50 | + |
| 51 | +### Technical Features |
| 52 | +- State Management with MobX |
| 53 | +- React 18 with TypeScript |
| 54 | +- Service Worker for offline capability |
| 55 | +- Local storage for game state persistence |
| 56 | +- Efficient caching system for assets |
| 57 | +- Responsive CSS with CSS Variables |
| 58 | +- Mobile-optimized touch interactions |
| 59 | +- PWA manifest for app installation |
| 60 | + |
| 61 | +### Accessibility |
| 62 | +- Keyboard navigation support |
| 63 | +- Screen reader friendly |
| 64 | +- High contrast mode support |
| 65 | +- Scalable text and UI elements |
| 66 | +- Clear visual feedback for all interactions |
| 67 | + |
| 68 | +### Performance |
| 69 | +- Optimized image loading |
| 70 | +- Efficient state management |
| 71 | +- Smooth animations |
| 72 | +- Minimal bundle size |
| 73 | +- Fast initial load time |
| 74 | +- Cached resources for offline use |
| 75 | + |
| 76 | +## Installation |
| 77 | + |
| 78 | +1. Clone the repository |
| 79 | +2. Install dependencies: npm install |
| 80 | +3. Start development server: npm run dev |
| 81 | +4. Build for production: npm run build |
| 82 | + |
| 83 | +## Development |
| 84 | + |
| 85 | +The application uses Vite as the build tool and development server. Key commands: |
| 86 | + |
| 87 | +- npm run dev: Start development server |
| 88 | +- npm run build: Build for production |
| 89 | +- npm run preview: Preview production build |
| 90 | +- npm run lint: Run ESLint |
| 91 | + |
| 92 | +## Architecture |
| 93 | + |
| 94 | +The application follows a component-based architecture with: |
| 95 | + |
| 96 | +- Stores: MobX stores for state management |
| 97 | +- Services: API and utility services |
| 98 | +- Components: Reusable UI components |
| 99 | +- Hooks: Custom React hooks |
| 100 | +- Constants: Configuration and constants |
| 101 | +- Types: TypeScript type definitions |
| 102 | + |
| 103 | +## Contributing |
| 104 | + |
| 105 | +1. Fork the repository |
| 106 | +2. Create a feature branch |
| 107 | +3. Commit your changes |
| 108 | +4. Push to the branch |
| 109 | +5. Create a Pull Request |
| 110 | + |
| 111 | +## License |
| 112 | + |
| 113 | +MIT License |
| 114 | + |
| 115 | +## Author |
| 116 | +[Michael Frühwirth](https://github.com/fruehwirth) |
| 117 | + |
| 118 | +## Acknowledgments |
| 119 | + |
| 120 | +- Flag images sourced from [flagcdn](https://flagcdn.com) |
| 121 | +- Icons from Material Symbols |
0 commit comments