{"id":27995444,"url":"https://github.com/prashant-software-developer/number-guessing-game","last_synced_at":"2026-04-04T20:33:34.360Z","repository":{"id":257040182,"uuid":"857154558","full_name":"prashant-software-developer/number-guessing-game","owner":"prashant-software-developer","description":"This project is a simple interactive game developed using React.js for the frontend and Node.js/Express for the backend.","archived":false,"fork":false,"pushed_at":"2024-09-14T19:23:11.000Z","size":1918,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-07T14:34:32.513Z","etag":null,"topics":["authentication","authorization","expressjs","game-development","mysql","nodejs","number-guessing-game","oops","reactjs","tidb","typescript"],"latest_commit_sha":null,"homepage":"https://shram.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/prashant-software-developer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-13T23:23:49.000Z","updated_at":"2025-04-28T22:50:18.000Z","dependencies_parsed_at":"2024-09-14T14:05:32.383Z","dependency_job_id":"e95c6885-c928-495c-961f-c9bbc1d4c1c7","html_url":"https://github.com/prashant-software-developer/number-guessing-game","commit_stats":null,"previous_names":["devprashantt/shram-task","devprashantt/number-guessing-game","prashant-software-developer/number-guessing-game"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/prashant-software-developer/number-guessing-game","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prashant-software-developer%2Fnumber-guessing-game","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prashant-software-developer%2Fnumber-guessing-game/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prashant-software-developer%2Fnumber-guessing-game/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prashant-software-developer%2Fnumber-guessing-game/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prashant-software-developer","download_url":"https://codeload.github.com/prashant-software-developer/number-guessing-game/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prashant-software-developer%2Fnumber-guessing-game/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31413269,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T20:09:54.854Z","status":"ssl_error","status_checked_at":"2026-04-04T20:09:44.350Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["authentication","authorization","expressjs","game-development","mysql","nodejs","number-guessing-game","oops","reactjs","tidb","typescript"],"created_at":"2025-05-08T20:19:07.665Z","updated_at":"2026-04-04T20:33:34.335Z","avatar_url":"https://github.com/prashant-software-developer.png","language":"TypeScript","readme":"# Number Guessing Game \n\nThis project is a simple game built with **React.js** for the frontend and **Node.js/Express** with **Sequelize ORM** for the backend. The game allows users to play, track scores, and save their progress with features like user authentication, real-time score tracking, and persistent storage of high scores.\n\n## Features\n\n1. **Interactive Game**: A simple yet fun game (e.g., memory or number guessing) with a real-time score update.\n2. **Score Tracking**: User scores are tracked during the game and displayed after each session.\n3. **High Score Celebration**: When a user breaks their high score, a confetti animation is triggered.\n4. **User Authentication**: Users can register and log in to track their progress across multiple sessions.\n5. **Persistent Data Storage**: User details, scores, and high scores are saved in a database (MySQL/TiDB) with secure SSL connections.\n6. **Leaderboard (Bonus)**: A leaderboard showing the top 10 users with the highest scores.\n7. **Deployment**: Frontend is deployed on **Netlify/Vercel**, and backend is deployed on **Heroku/Railway**.\n\n## Demo\n\n[Play Game](https://shram.vercel.app/user/play_game)\n\n## Tech Stack\n\n### Frontend:\n- **React.js**: Framework for building user interfaces.\n- **SCSS**: Styling framework for the frontend.\n- **Axios**: For HTTP requests to the backend.\n\n### Backend:\n- **Node.js**: JavaScript runtime for building the server-side.\n- **Express.js**: Web framework for Node.js.\n- **Sequelize**: ORM for database interactions.\n- **MySQL/TiDB**: Database for storing user scores and info.\n- **bcrypt**: For hashing passwords and secure user authentication.\n\n### Deployment:\n- **Frontend**: Deployed on **Vercel**.\n- **Backend**: Deployed on **Render**.\n\n## Installation\n\n### Prerequisites:\n- Node.js (v14 or above)\n- MySQL or TiDB database instance\n- Git\n\n### Setup Instructions\n\n1. **Clone the repository**:\n   ```bash\n   git clone https://github.com/your-username/simple-react-game.git\n   cd Shram-Task\n   ```\n\n2. **Install Backend Dependencies**:\n   ```bash\n   cd backend\n   npm install\n   ```\n\n3. **Configure Environment Variables**:\n   Create a `.env` file in the `backend` directory with the following details:\n\n   ```env\n   DB_USERNAME=\u003cyour-database-username\u003e\n   DB_PASSWORD=\u003cyour-database-password\u003e\n   DB_NAME=\u003cyour-database-name\u003e\n   DB_HOST=\u003cyour-database-host\u003e\n   DB_PORT=3306\n   SALT_ROUNDS=10\n   ```\n\n4. **Run Backend Server**:\n   Make sure to have MySQL/TiDB running.\n   ```bash\n   npm run dev\n   ```\n\n5. **Install Frontend Dependencies**:\n   Open a new terminal and navigate to the `frontend` directory.\n   ```bash\n   cd ../frontend\n   npm install\n   ```\n\n6. **Configure Frontend Environment Variables**:\n   Create a `.env` file in the `frontend` directory:\n   ```env\n   VITE_APP_BACKEND_URL=http://localhost:9000\n   ```\n\n7. **Run Frontend App**:\n   ```bash\n   npm run dev\n   ```\n\n8. **Deployment**:\n   - For **frontend**, use [Netlify](https://www.netlify.com/) or [Vercel](https://vercel.com/).\n   - For **backend**, deploy to [Heroku](https://www.heroku.com/) or [Railway](https://railway.app/).\n\n## How to Play\n\n- **Login/Register**: Start by creating a user account or logging in.\n- **Play Game**: Play the game by following the in-game instructions. Your score will update in real-time.\n- **High Score Celebration**: If you break your previous high score, a confetti animation will appear.\n- **View Scores**: After the game, view your current and high scores, and choose to play again.\n\n## Database Models\n\n### `User` Model\n- **user_id** (UUID, Primary Key)\n- **first_name** (String)\n- **last_name** (String)\n- **primary_email** (String)\n- **password** (String, hashed)\n- **role** (String)\n- **profile_picture** (String)\n\n### `Score` Model\n- **score_id** (UUID, Primary Key)\n- **user_id** (Foreign Key to User)\n- **score** (Integer)\n- **remarks** (String, \"Good\", \"Bad\", or \"Best\")\n- **created_at** (Timestamp)\n- **updated_at** (Timestamp)\n\n## API Endpoints\n\n### Authentication\n- **POST** `/api/auth/register`: Register a new user.\n- **POST** `/api/auth/login`: User login.\n\n### Game\n- **POST** `/api/game/score`: Submit score after the game session.\n- **GET** `/api/game/scores`: Fetch user's past scores and high scores.\n\n## Roadmap\n\n- [ ] Add more games or levels to the existing game.\n- [ ] Implement advanced animations and visual effects.\n- [ ] Add a global leaderboard for top 10 scores.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprashant-software-developer%2Fnumber-guessing-game","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprashant-software-developer%2Fnumber-guessing-game","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprashant-software-developer%2Fnumber-guessing-game/lists"}