A modern, interactive web-based memory matching game built with React, TypeScript, and Framer Motion animations.
- Interactive memory matching game with smooth 3D card flip animations
- 6 pairs of cards with modern geometric designs
- Performance tracking (moves, time elapsed, pairs matched)
- Responsive layout with game board and statistics sidebar
- Easy restart functionality
- Customizable branding and card designs
- Frontend Framework: React 18 with TypeScript
- Build Tool: Vite
- Styling: Tailwind CSS
- Animations: Framer Motion
- Icons: Lucide React
- Node.js (v16 or higher)
- npm or yarn
-
Clone the repository:
git clone [repository-url] cd memory-card-game -
Install dependencies:
npm install # or yarn -
Start the development server:
npm run dev # or yarn dev -
Open your browser and navigate to
http://localhost:5173
- The game consists of 12 cards (6 pairs) arranged in a 4x3 grid
- Click on a card to flip it and reveal the image
- Try to find matching pairs by remembering card positions
- When you find a matching pair, the cards remain face-up
- If the cards don't match, they flip back after a brief moment
- The game is complete when all pairs are matched
- Try to complete the game in the fewest moves and shortest time!
The game tracks the following statistics:
- Moves: The number of pairs of cards you've flipped
- Time: The elapsed time since the game started
- Pairs: The number of pairs you've matched out of the total (6)
project/
├── public/
│ └── images/ # Card images
│ ├── card-back.png # Back of all cards
│ ├── card1.png # Card face images
│ ├── card2.png
│ ├── card3.png
│ ├── card4.png
│ ├── card5.png
│ ├── card6.png
│ └── center.png # Center logo (optional)
├── src/
│ ├── components/ # React components
│ │ ├── Card.tsx # Individual card component
│ │ ├── GameBoard.tsx # Main game logic and layout
│ │ └── Timer.tsx # Game timer component
│ ├── config/ # Configuration files
│ │ ├── branding.ts # Branding configuration
│ │ └── types.ts # TypeScript interfaces
│ ├── App.tsx # Main application component
│ ├── index.css # Global styles and Tailwind imports
│ └── main.tsx # Application entry point
└── configuration files # Various config files for the project
The Memory Card Game is designed to be easily customizable. You can rebrand the game by:
- Replacing card images with your own designs
- Adjusting the number of card pairs
- Using SVG-based cards instead of images
- Modifying the game's appearance
For detailed instructions on how to customize the game, please refer to the Rebranding Guide.
npm run dev: Start the development servernpm run build: Create a production buildnpm run preview: Preview the production build locallynpm run lint: Run ESLint to check for code issues
To create a production build:
npm run build
# or
yarn buildThe build artifacts will be stored in the dist/ directory.
