{"id":15769370,"url":"https://github.com/btc415/slot-machine-react415","last_synced_at":"2025-02-23T11:26:06.773Z","repository":{"id":199397745,"uuid":"702792207","full_name":"BTC415/Slot-Machine-React415","owner":"BTC415","description":null,"archived":false,"fork":false,"pushed_at":"2023-10-10T03:03:09.000Z","size":61,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-11T14:07:49.495Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BTC415.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-10-10T03:01:23.000Z","updated_at":"2024-09-02T14:39:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"9e923b9f-613e-4ff7-996a-e20ebcfcde84","html_url":"https://github.com/BTC415/Slot-Machine-React415","commit_stats":null,"previous_names":["topcoder415/slot-machine-react415","dodger213/slot-machine-react415","btc415/slot-machine-react415"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BTC415%2FSlot-Machine-React415","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BTC415%2FSlot-Machine-React415/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BTC415%2FSlot-Machine-React415/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BTC415%2FSlot-Machine-React415/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BTC415","download_url":"https://codeload.github.com/BTC415/Slot-Machine-React415/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240306730,"owners_count":19780673,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-10-04T14:02:11.022Z","updated_at":"2025-02-23T11:26:06.747Z","avatar_url":"https://github.com/BTC415.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React.js Slot Machine 🚀\n\nThis project was bootstrapped with [Create React App](https://github.com/facebookincubator/create-react-app).\u003cbr /\u003e\nThe project includes extra packages and improved file structure.\n\n## Check the online demo 🪄\n\n[https://onyxdev.net/files/battlefield/react/react-slot-machine/](https://onyxdev.net/files/battlefield/react/react-slot-machine/)\n\n## Dependencies that were added to CRA 👷🏼‍♀️\n\n-   @testing-library/react-hooks\n-   @types/enzyme\n-   @wojtekmaj/enzyme-adapter-react-17 - an unofficial package for React v17\n-   enzyme\n-   node-sass\n\n## Behavior 🎰\n\n1. The machine has 3 wheels. Each wheel has 4 symbols (strawberry, banana, orange, and a monkey), and the machine can show only one symbol per wheel.\n2. The machine starts with the symbols in random positions.\n3. The machine has a start button. When it's clicked, the wheels start spinning (a symbol every, 50ms).\n4. If the start button wasn't clicked, then the machine starts spinning automatically after 5 seconds.\n5. If the stop button wasn't clicked after starting, the machine stops automatically after 10 seconds.\n6. When stopped, if we have two identical inconsecutive symbols, the prize is $10, or two consecutive symbols, then the prize is $20. If we have a full match, the prize is $100.\n\n## Folders and files structure 🗺\n\n```\n- src\n    - components // reusable react components\n        - Button\n        - Message\n        - Wheel\n\n        // Each component has the following structure:\n        - * ComponentName\n            - ComponentName.module.scss\n            - ComponentName.test.tsx\n            - ComponentName.tsx\n            - index.ts\n\n    - containers\n        // Each container has the same structure as components but some might have extra folders related to that specific container.\n        - SlotMachine\n\n    - hooks\n        - useSlotMachine\n\n    - lib // helpers\n        - scripts\n            - utils.ts\n        - styles\n            - abstracts\n                - _mixins.scss\n                - _variables.scss\n            - main.scss\n\n    - index.tsx\n```\n\n## How to launch the project 🏁\n\nInstall [Node.js](https://nodejs.org/) and then open the Terminal/CMD and navigate to the project's folder.\nRun the following command:\n\n```bash\nnpm insatll\n```\n\n### Development environment\n\n```bash\nnpm start\n```\n\nRuns the app in the development mode.\\\nOpen [http://localhost:3000](http://localhost:3000) to view it in the browser.\n\nThe page will reload if you make edits.\\\nYou will also see any lint errors in the console.\n\n### Production build\n\n```bash\nnpm run build\n```\n\nBuilds the app for production to the `build` folder.\\\nIt correctly bundles React in production mode and optimizes the build for the best performance.\n\nThe build is minified and the filenames include the hashes.\\\nYour app is ready to be deployed!\n\nSee the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.\n\n### Testing\n\n```bash\nnpm run test\n```\n\nLaunches the test runner in the interactive watch mode.\\\nSee the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.\n\n### `npm run eject`\n\n**Note: this is a one-way operation. Once you `eject`, you can’t go back!**\n\nIf you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.\n\nInstead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point, you’re on your own.\n\nYou don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However, we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.\n\n## Learn More\n\nYou can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).\n\nTo learn React, check out the [React documentation](https://reactjs.org/).\n\n## `Stay safe 😷`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbtc415%2Fslot-machine-react415","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbtc415%2Fslot-machine-react415","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbtc415%2Fslot-machine-react415/lists"}