|
| 1 | +--- |
| 2 | +sidebar_position: 12 |
| 3 | +--- |
| 4 | +# New Mini Login Game |
| 5 | + |
| 6 | +## Gamehub |
| 7 | + |
| 8 | +The GameHub screen acts as the central hub of the game platform. It presents users with a selection of games they can choose from. Each game is represented as a card with a logo, name, and a "Play" button. When a user selects a game by clicking the "Play" button, a verification process begins. This process includes: |
| 9 | + |
| 10 | +1. Displaying a reCAPTCHA modal to confirm the user is human. |
| 11 | +2. If reCAPTCHA is passed, a mini CAPTCHA game (like selecting specific emojis) is shown. |
| 12 | +3. Upon successfully completing both steps, the user is navigated to the selected game. |
| 13 | + |
| 14 | +This ensures that only verified users can access the games, preventing bots from interacting with the platform. |
| 15 | + |
| 16 | +## HumanCheckModal |
| 17 | + |
| 18 | +The HumanCheckModal component is a modal popup that appears when a user attempts to play a game from the GameHub. It serves as the first layer of human verification using Google reCAPTCHA. |
| 19 | + |
| 20 | +**Features:** |
| 21 | +- Displays a message prompting the user to verify they're human. |
| 22 | +- Integrates Google reCAPTCHA (v2 or v3) for human verification. |
| 23 | +- Has "Continue" and "Cancel" buttons. |
| 24 | +- Only enables the "Continue" button after successful reCAPTCHA verification. |
| 25 | +- On successful verification, it triggers the next step in the verification process. |
| 26 | + |
| 27 | +## CaptchaGridGame |
| 28 | + |
| 29 | +The CaptchaGridGame component is a custom CAPTCHA game designed to further verify the user's humanity. It's shown after the user passes the reCAPTCHA in the HumanCheckModal. |
| 30 | + |
| 31 | +**Features:** |
| 32 | +- Displays a 3x3 grid of emojis. |
| 33 | +- Prompts the user to select all emojis of a specific type (e.g., all "cat" emojis). |
| 34 | +- Randomizes the emojis in the grid each time. |
| 35 | +- Ensures at least one correct emoji is present. |
| 36 | +- Provides feedback ("Try again") if the user selects incorrectly. |
| 37 | +- On correct selection, proceeds to the game. |
| 38 | + |
| 39 | +This adds an engaging layer of human verification beyond standard CAPTCHA. |
| 40 | + |
| 41 | +## MathMatch Game |
| 42 | + |
| 43 | +The MathMatch game is an interactive math quiz game with a robot character (RoboMatch) guiding the user. |
| 44 | + |
| 45 | +**Features:** |
| 46 | +- Animated robot character walks in and then stands idle. |
| 47 | +- Displays a welcome message from the robot. |
| 48 | +- Offers 3 difficulty levels: Level 1 (basic), Level 2 (intermediate), Level 3 (advanced). |
| 49 | +- Randomly selects a question from a pool based on selected difficulty. |
| 50 | +- Displays the question and multiple choice answers. |
| 51 | +- On correct answer: |
| 52 | + - Shows a congratulatory message. |
| 53 | + - Triggers a confetti animation. |
| 54 | +- On incorrect answer: |
| 55 | + - Prompts the user to try again. |
| 56 | +- After answering, asks if the user wants another question or to finish. |
| 57 | + |
| 58 | +This game helps users practice math skills in a fun and engaging way. |
| 59 | + |
| 60 | +## Technology Stack |
| 61 | + |
| 62 | +**Frontend:** |
| 63 | +- React (functional components and hooks) |
| 64 | +- CSS Modules for component styling |
| 65 | +- React Router for navigation |
| 66 | +- Google reCAPTCHA (via react-google-recaptcha) |
| 67 | +- Confetti animation (via react-confetti) |
| 68 | +- @react-hook/window-size for responsive confetti |
| 69 | + |
| 70 | +**Project Setup:** |
| 71 | +- Node.js and npm for package management |
| 72 | +- Local development server via `npm start` |
| 73 | + |
| 74 | +**Version Control:** |
| 75 | +- Git for source control |
| 76 | +- GitHub for remote repository management |
| 77 | + |
| 78 | +**Development Tools:** |
| 79 | +- Visual Studio Code (VS Code) for code editing |
| 80 | +- Browser for testing (Chrome) |
| 81 | +- Terminal for running npm commands |
0 commit comments