MatchUp is an engaging card-matching memory game built with React, featuring user authentication, global leaderboards, and persistent game statistics using Firebase.
Visit MatchUp Memory Game to play the game online.
MatchUp challenges players to test their memory by matching pairs of cards displaying various tech icons. The game features:
- Multiple Difficulty Levels: Choose from Easy (6 pairs), Medium (8 pairs), or Hard (9 pairs) modes
- Time Challenge: Complete the game before the timer runs out
- Daily Challenges: Special daily puzzles with bonus points
- Duel Mode: Challenge other players and bet points
- Point System: Earn points based on difficulty level and gameplay achievements
- Global Leaderboard: Compare your performance with players worldwide
- Customizable Profile: Change your display name to personalize your experience
- Smooth Card Animations: Elegant card flipping animations using Framer Motion
- Responsive Design: Optimized for both desktop and mobile devices
- Sound Effects: Audio feedback enhances the gaming experience
- Visual Feedback: Special effects for matches, mismatches, and game completion
- User Authentication: Secure login via Bedrock Passport
- Persistent Progress: Your game statistics are stored in the cloud
- Profile Customization: Update your display name that appears on the leaderboard
- Offline Support: Basic gameplay functions even without internet connection
- Theme and Accessibility: High-contrast visuals and responsive controls
- Firebase Integration: Real-time database for user data and leaderboards
- Mobile Optimization: Touch-friendly controls and mobile viewport adaptations
- Performance: Optimized rendering and animations for smooth gameplay
- Cross-Browser Compatibility: Works on all modern browsers
The game uses Firebase Firestore to provide:
- User Authentication: Secure login and user management
- Real-time Leaderboard: Global rankings updated instantly
- Game Statistics: Track and store your gameplay metrics:
- Games played and won
- Best completion times
- Win rates across difficulty levels
- Points earned
- Game History: Review past game performance
- Daily Challenge Tracking: Track daily challenge completions and streaks
- Login: Sign in with your account credentials
- Select Difficulty: Choose your desired difficulty level
- Match Cards: Click cards to flip them and find matching pairs
- Beat the Clock: Complete all matches before time runs out
- Earn Points: Win games to earn points and climb the leaderboard
- Daily Challenge: Complete the daily challenge for bonus points
- Duel Mode: Challenge other players to win their points
- Node.js (v14 or higher)
- npm or yarn
- A Firebase account (if you want to set up your own instance)
- Clone the repository:
git clone <repository-url>
cd MemoryGame
- Install dependencies:
npm install
The game is already connected to a Firebase backend. If you want to set up your own:
- Go to Firebase Console and create a new project
- Set up Firestore Database in your project
- Go to Project Settings > General > Your apps > Web app
- Click "Add app" if you haven't already added a web app
- Register your app with a nickname (e.g., "MatchUp")
- Copy the Firebase configuration object
- Replace the configuration in
src/firebase/config.js
Start the development server:
npm start
Visit http://localhost:3000 in your browser to see the app running.
The app uses the following Firestore collections:
Each document is structured as follows:
{
id: string, // User's unique ID
displayName: string, // User's display name
email: string, // User's email (if provided)
points: number, // Total points earned
gamesPlayed: number, // Total games played
gamesWon: number, // Total games won
bestTime: number | null, // Best completion time (in seconds)
winRate: number, // Win percentage
createdAt: timestamp, // Account creation time
lastLogin: timestamp, // Last login time
gameHistory: [ // Array of past games
{
timestamp: timestamp, // When the game was played
pointsEarned: number, // Points earned in this game
result: 'win' | 'loss', // Game outcome
difficulty: string, // Game difficulty
timeSpent: number // Time taken to complete (wins only)
}
]
}
- React: Front-end UI library
- Framer Motion: Animation library
- Firebase: Backend database and authentication
- TailwindCSS: Utility-first CSS framework
- FontAwesome: Icon library
- Web Audio API: Sound effects management
The game is deployed using Firebase Hosting. To deploy your own version:
npm run build
firebase deploy
- Dynamic Loading: Components and assets load as needed
- Mobile Viewport Fixes: Special handling for mobile browsers
- Touch Event Optimization: Enhanced touch controls for mobile play
- Caching Strategy: Local storage backup for offline play
- Icons provided by FontAwesome
- Sound effects from [source]
- Authentication powered by Bedrock Passport
