Skip to content

OlgaGulyakevich/memory-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

148 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽฎ Memory Game

Modern React memory training app with production-grade architecture and exceptional performance

Live Demo React Performance Bundle


๐Ÿ“ธ Screenshots

๐ŸŽฌ Gameplay Demo

gameplay-screenshot.mp4

Smooth card flipping animations and responsive gameplay

๐Ÿ“ฑ Mobile Responsive Design

Mobile Portrait

Home Screen (Portrait Mode)

Mobile Portrait

In-Game Screen (Portrait Mode)


โœจ Highlights

๐ŸŽฏ User Experience

  • 3 Themed Card Sets with custom artwork
  • Multilingual (EN/RU/FR) with i18next
  • Smooth 3D Animations (60fps+)
  • Fully Responsive โ€” mobile-first design
  • Keyboard Navigation โ€” WCAG AA compliant

โšก Technical Excellence

  • React 19 with modern hooks architecture
  • Lighthouse 98/100 performance score
  • 115KB gzipped total bundle size
  • Zero runtime errors in production
  • Comprehensive testing documentation

๐ŸŽฌ Quick Start

# Clone repository
git clone https://github.com/olgagulyakevich/memory-game.git

# Install dependencies
npm install

# Start development server
npm start  # Opens at http://localhost:3001

# Build for production
npm run build

๐ŸŽฎ Features Deep Dive

๐ŸŽจ Three Beautiful Themes
  • Cats Theme โ€” Adorable feline companions
  • Cars Theme โ€” Classic automotive collection
  • Flowers Theme โ€” Botanical garden variety

Each theme features hand-picked imagery optimized for performance.

๐ŸŒ Full Internationalization
  • 3 Languages: English, Russian, French
  • react-i18next integration
  • Persistent language preference
  • Fallback to English for missing translations
โ™ฟ Accessibility First
  • WCAG AA Compliant โ€” proper contrast ratios
  • Keyboard Navigation โ€” fully playable without mouse
  • Screen Reader Support โ€” comprehensive ARIA labels
  • Semantic HTML โ€” proper document structure
โšก Performance Optimized
  • React.memo โ€” component memoization
  • Hardware Acceleration โ€” CSS 3D transforms
  • Code Splitting โ€” optimized bundle chunks
  • Image Optimization โ€” WebP with fallbacks

Lighthouse Scores:

  • Desktop: 98/100 Performance
  • Mobile: 95+/100 Performance
  • 100/100 Accessibility, Best Practices, SEO

๐Ÿ“Š Performance Metrics

Metric Desktop Mobile Target
Performance 98/100 95/100 >90 โœ…
FCP 0.4s 1.0s <1.8s โœ…
LCP 0.6s 2.3s <2.5s โœ…
Bundle Size 115KB gzipped โ€” <250KB โœ…
๐Ÿ“ฆ Bundle Composition (click to expand)
react-vendor.js        51.39 KB  (44.5%)
main.js                29.42 KB  (25.5%)
vendors.js             16.64 KB  (14.4%)
router-vendor.js       11.53 KB  (10.0%)
react-vendor-2.js       5.30 KB   (4.6%)
runtime.js              0.96 KB   (0.8%)

Total gzipped: 115.44 KB


๐Ÿ—๏ธ Architecture

Built with modern React patterns and professional development practices:

src/
โ”œโ”€โ”€ components/          # React components
โ”‚   โ”œโ”€โ”€ pages/          # Route-level components
โ”‚   โ””โ”€โ”€ ui/             # Reusable UI components
โ”œโ”€โ”€ hooks/              # Custom React hooks (useGame)
โ”œโ”€โ”€ utils/              # Helper functions & config
โ”œโ”€โ”€ locales/            # i18n translation files
โ””โ”€โ”€ styles/             # Global CSS with design tokens

Key Technologies:

  • React 19 with hooks
  • React Router 7 for SPA routing
  • react-i18next for internationalization
  • Webpack 5 with optimizations
  • CSS3 with custom properties

๐Ÿ“– Detailed Documentation:

๐Ÿ’ก Code Quality Example โ€” Custom Hook Architecture
// Custom hook with optimized game logic
const useGame = (images) => {
  const [finishedItems, setFinishedItems] = useState([]);
  const [stepsCount, setStepsCount] = useState(0);
  const [errors, setErrors] = useState(0);

  const checkItems = (firstItem, secondItem) => {
    const firstImage = images.find(({id}) => id === firstItem);
    const secondImage = images.find(({id}) => id === secondItem);
    
    if (firstImage.url === secondImage.url) {
      setFinishedItems((items) => [...items, firstItem, secondItem]);
    } else {
      setErrors((e) => e + 1);
    }
    setStepsCount((i) => i + 1);
  };

  const isWin = finishedItems.length > 0 && 
                finishedItems.length === images.length;

  return { finishedItems, stepsCount, errors, checkItems, isWin };
};

Why this approach?

  • Clean separation of business logic from UI
  • Immutable state updates for predictable behavior
  • Easy to test and maintain
  • Follows React best practices

๐Ÿงช Quality Assurance

This project includes comprehensive testing documentation:


๐Ÿš€ Deployment

Deployed on GitHub Pages with automatic CI/CD:

npm run deploy  # Builds and deploys to gh-pages branch

Production Features:

  • SPA routing with 404 fallback
  • Asset optimization and caching
  • SEO-friendly meta tags
  • Social media preview cards

๐Ÿ“ License

MIT License โ€” feel free to use this code for learning and inspiration.


๐Ÿ’ผ Portfolio Highlight

This project demonstrates:

  • โœ… Modern React development practices
  • โœ… Performance-focused architecture
  • โœ… Accessibility compliance (WCAG AA)
  • โœ… Production-ready deployment pipeline
  • โœ… Comprehensive documentation

Perfect for: Frontend Developer / React Developer / Senior Frontend Engineer positions


Built with โค๏ธ using React 19 and modern web standards

๐ŸŽฎ Play Now โ€ข ๐Ÿ’ผ LinkedIn โ€ข ๐Ÿ“ง Contact

About

A multilingual memory training game built with React.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors