Here's a structured README file for your GitHub repository for the Math Sprint app:
Math Sprint is a mobile-friendly math practice app that allows users to improve their arithmetic skills through quick and engaging sessions. Users can select a math operation (addition, subtraction, multiplication, or division) and answer as many questions as possible within a set time limit. Each correct answer earns points, while incorrect answers deduct points—but scores won’t fall below zero. Each operation has its own separate score table for fair competition and tracking.
- Operation Selection: Choose between addition, subtraction, multiplication, or division.
- Timed Sessions: Answer as many questions as possible within the given time.
- Scoring System:
- +10 points for each correct answer, -5 points for each incorrect answer (minimum score of 0).
- Separate score tables for each operation, so users can see their best scores for each type.
- Custom Numeric Keypad: Mobile-friendly numeric keypad for quick input on touch devices.
- Responsive Design: Adapts well to both mobile and desktop devices.
- User Authentication: Sign in or register using Supabase for personalized score tracking.
- Frontend: Vite.js + React
- Styling: Chakra UI for responsive, accessible design.
- Responsive Numeric Keypad: Custom numeric keypad for mobile compatibility.
- Backend: Supabase
- Authentication: User sign-up and login.
- Database: Supabase PostgreSQL for storing user scores by operation type.
-
Clone the repository:
git clone https://github.com/yourusername/Math-Sprint.git cd Math-Sprint -
Install dependencies:
npm install
-
Set up Supabase:
-
Create a Supabase project at Supabase.
-
Set up authentication and create a table called
scoreswith the following schema:Column Type Description idUUID Primary key user_idUUID References auth.users.idfor each userscoreInteger User’s score for a session operationText Operation type (addition, subtraction, multiplication, division) created_atTimestamp Auto-generated timestamp -
Configure your
.envfile with your Supabase credentials:VITE_SUPABASE_URL=<your-supabase-url> VITE_SUPABASE_ANON_KEY=<your-supabase-anon-key>
-
-
Run the app:
npm run dev
-
Visit: Open your browser and go to
http://localhost:3000.
- Login/Register: Create an account or log in to access the game.
- Choose Operation: Select an operation (Addition, Subtraction, Multiplication, or Division) from the main menu.
- Play the Game:
- You’ll have a set time to answer as many questions as possible.
- Use the on-screen numeric keypad to enter answers and submit.
- For each correct answer, you gain 10 points; each wrong answer deducts 5 points (but the score cannot go below 0).
- View Scores: After each session, view your score and check the leaderboard for each operation.
- Scoring:
- Correct answer: +10 points
- Incorrect answer: -5 points
- Minimum score: 0
- Separate Leaderboards: Scores are tracked individually for addition, subtraction, multiplication, and division.
- Timer: Each session lasts 30 seconds per selected operation.
- Leaderboard: Display top scores by operation across all users.
- Difficulty Levels: Add easy, medium, and hard levels, scaling the numbers used in problems.
- User Progress Tracking: Visualize user progress over time with score history.
- Sound Effects: Add optional sounds for correct, incorrect answers, and keypad clicks.