{"id":19588958,"url":"https://github.com/shivankk26/spin-wheel-game","last_synced_at":"2026-03-02T13:40:00.630Z","repository":{"id":245890708,"uuid":"818926890","full_name":"ShivankK26/Spin-Wheel-Game","owner":"ShivankK26","description":"This is a full-stack application for a \"Spin the Wheel\" game built using React (frontend), Node.js/Express (backend), and Prisma (ORM) connected to a MySQL database hosted on a service provider like Aiven. The application allows users to input the number of segments on the wheel and the content of each segment. ","archived":false,"fork":false,"pushed_at":"2024-06-24T18:08:23.000Z","size":66,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-24T12:07:34.241Z","etag":null,"topics":["aiven-cloud","expressjs","javascript","mysql","nodejs","prisma-orm","react"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/ShivankK26.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-06-23T09:22:03.000Z","updated_at":"2024-11-25T19:04:34.000Z","dependencies_parsed_at":"2024-06-24T17:32:24.570Z","dependency_job_id":"ff6480f4-605a-4d5d-b70d-26b93eca2654","html_url":"https://github.com/ShivankK26/Spin-Wheel-Game","commit_stats":null,"previous_names":["shivankk26/spin-wheel-game"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ShivankK26/Spin-Wheel-Game","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShivankK26%2FSpin-Wheel-Game","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShivankK26%2FSpin-Wheel-Game/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShivankK26%2FSpin-Wheel-Game/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShivankK26%2FSpin-Wheel-Game/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ShivankK26","download_url":"https://codeload.github.com/ShivankK26/Spin-Wheel-Game/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShivankK26%2FSpin-Wheel-Game/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30005032,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-02T12:19:43.414Z","status":"ssl_error","status_checked_at":"2026-03-02T12:19:02.215Z","response_time":60,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["aiven-cloud","expressjs","javascript","mysql","nodejs","prisma-orm","react"],"created_at":"2024-11-11T08:16:43.808Z","updated_at":"2026-03-02T13:40:00.626Z","avatar_url":"https://github.com/ShivankK26.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spin the Wheel Game\n\nThis is a full-stack application for a \"Spin the Wheel\" game built using React (frontend), Node.js/Express (backend), and Prisma (ORM) connected to a MySQL database hosted on a service provider like Aiven. The application allows users to input the number of segments on the wheel and the content of each segment. When the wheel is spun, a segment is randomly selected, and the result is saved to the database.\n\n## Features\n\n- Users can define the number of segments on the wheel.\n- Users can enter the content for each segment.\n- When the wheel is spun, a segment is randomly selected.\n- The result of each spin is saved to a MySQL database using Prisma.\n\n## Prerequisites\n\n- Node.js and npm installed\n- MySQL database (local or hosted, e.g., Aiven)\n- Prisma CLI installed\n\n## Setup Instructions\n\n### 1. Clone the Repository\n\n```sh\ngit clone https://github.com/ShivankK26/Spin-Wheel-Game.git\n```\n\n### 2. Set Up the Client\n\nNavigate to the `client` directory and install the dependencies:\n\n```sh\ncd client\nnpm install\n```\n\n### 3. Set Up the Server\n\nNavigate to the `server` directory and install the dependencies:\n\n```sh\ncd ../server\nnpm install\n```\n\n### 4. Configure Prisma\n\nInitialize Prisma and set up the MySQL connection:\n\n```sh\nnpx prisma init\n```\n\n### 5. Set Up Environment Variables\n\nCreate a `.env` file in the `server` directory and add your database connection string:\n\n```env\nDATABASE_URL=\"mysql://username:password@hostname:port/database_name\"\n```\n\nReplace `username`, `password`, `hostname`, `port`, and `database_name` with your MySQL service details.\n\n### 6. Run Prisma Migrations\n\nGenerate and run the migration to create the database schema:\n\n```sh\nnpx prisma migrate dev --name init\nnpx prisma generate\n```\n\n### 7. Start the Server\n\n```sh\nnode index.js\n```\n\nThe server will start running on port 5173.\n\n### 8. Start the Client\n\nNavigate back to the `client` directory and start the React development server:\n\n```sh\ncd ../client\nnpm run dev\n```\n\nThe client will start on port 3000.\n\n## Connecting to Aiven\n\nTo connect the MySQL database to Aiven:\n1. Create a MySQL service on Aiven.\n2. Obtain the connection details from Aiven.\n3. Update the `.env` file with the Aiven connection details:\n\n   ```env\n   DATABASE_URL=\"mysql://username:password@aiven-hostname:port/database_name\"\n   ```\n\nReplace `username`, `password`, `aiven-hostname`, `port`, and `database_name` with your Aiven service details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshivankk26%2Fspin-wheel-game","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshivankk26%2Fspin-wheel-game","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshivankk26%2Fspin-wheel-game/lists"}