{"id":20733787,"url":"https://github.com/mihailgaberov/bingo","last_synced_at":"2025-04-07T10:29:14.487Z","repository":{"id":37085114,"uuid":"65735106","full_name":"mihailgaberov/bingo","owner":"mihailgaberov","description":"🎱 A Bingo game built with JavaScript. It comes with a back-office app built with React.js and uses MongoDB.","archived":false,"fork":false,"pushed_at":"2025-02-22T09:21:15.000Z","size":107473,"stargazers_count":59,"open_issues_count":1,"forks_count":30,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-31T09:06:11.922Z","etag":null,"topics":["bingo","gambling","game","javascript","js","mongodb","reactjs","tdd"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/mihailgaberov.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-08-15T13:41:56.000Z","updated_at":"2025-03-05T23:17:25.000Z","dependencies_parsed_at":"2023-02-15T06:46:31.791Z","dependency_job_id":"e4c2fdc6-ad92-424c-84ea-97ccfe9b1dd1","html_url":"https://github.com/mihailgaberov/bingo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mihailgaberov%2Fbingo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mihailgaberov%2Fbingo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mihailgaberov%2Fbingo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mihailgaberov%2Fbingo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mihailgaberov","download_url":"https://codeload.github.com/mihailgaberov/bingo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247635113,"owners_count":20970672,"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":["bingo","gambling","game","javascript","js","mongodb","reactjs","tdd"],"created_at":"2024-11-17T05:27:08.238Z","updated_at":"2025-04-07T10:29:14.463Z","avatar_url":"https://github.com/mihailgaberov.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bingo Bigul\n\nFamous Bingo game built with [JavaScript](https://www.javascript.com/). It has a back office app built with [React](https://reactjs.org/) and uses [MongoDB](https://www.mongodb.com/) for database.\n\n![Main login screen](https://github.com/mihailgaberov/bingo/blob/master/screenshots/main-login-screen.png)\n![Lobby screen](https://github.com/mihailgaberov/bingo/blob/master/screenshots/lobby-screen.png)\n![Start screen](https://github.com/mihailgaberov/bingo/blob/master/screenshots/start-screen.png)\n![Game screen](https://github.com/mihailgaberov/bingo/blob/master/screenshots/game-screen.png)\n![Back office login screen](https://github.com/mihailgaberov/bingo/blob/master/screenshots/back-office-login-screen.png)\n![Back office screen](https://github.com/mihailgaberov/bingo/blob/master/screenshots/back-office-screen.png)\n![Back office edit screen](https://github.com/mihailgaberov/bingo/blob/master/screenshots/back-office-edit-screen.png)\n![Discoverer screen](https://github.com/mihailgaberov/bingo/blob/master/screenshots/discoverer-screen.png)\n\n### Stargazers\n\n[![Stargazers repo roster for @mihailgaberov/bingo](https://reporoster.com/stars/mihailgaberov/bingo)](https://github.com/mihailgaberov/bingo/stargazers)\n\n### Forkers\n\n[![Forkers repo roster for @mihailgaberov/bingo](https://reporoster.com/forks/mihailgaberov/bingo)](https://github.com/mihailgaberov/bingo/network/members)\n\n## Running The App\n\nTo run the app, follow these steps:\n\n1. Ensure that [NodeJS](http://nodejs.org/) is installed. This provides the platform on which the build tooling runs.\n2. From the project folder, execute the following command:\n\n```shell\nnpm install\n```\n\n3. Ensure that [Gulp](http://gulpjs.com/) is installed globally. If you need to install it, use the following command:\n\n```shell\nnpm install -g gulp\n```\n\n\u003e **Note:** Gulp must be installed globally, but a local version will also be installed to ensure a compatible version is used for the project.\n\n4. Make sure you have `.env` file in your main project directory, containing the correct values for the following:\n\n```dotenv\nDB_SECRET=\u003cyourdatabasepassword\u003e\nDB_URI=mongodb://127.0.0.1/\u003cyour database name\u003e\n```\n\n5. Make sure you have [MongoDB](https://www.mongodb.com/download-center/community) installed and you are able to use [MongoDB shell version v4.0.0](https://docs.mongodb.com/manual/mongo/index.html)\n\n6. To start MongoDB server, execute the following command:\n\n```\nmongod\n```\n\n\u003e The default `dbpath` for MongoDB is `/data/db`, which means that if you have installed MongoDB in your `C:\\` drive `mongod` will use it implicitly. But if you have your database installed on different path, you need to use `--dbpath=/path/to/your/db` parameter to specify it. It could be for example like this: `mongod --dbpath d:\\mongodb\\data\\db`. For more info on this you may take a look [here](https://docs.mongodb.com/manual/reference/configuration-options/).\n\n7. After you have your database running, you need to start the game server. You can do it by executing the following command in the project main directory:\n\n```shell\nnode server.js\n```\n\n8. To run the app, execute the following command:\n\n```shell\ngulp\n```\n\n9. To run only the game client + unit tests, execute the following command:\n\n```shell\ngulp fe\n```\n\n10. To run only the back office app + unit test for it, execute the following command:\n\n```shell\ngulp bo\n```\n\n11. Browse to [http://localhost:8000](http://localhost:8000) to see the app.\n\n## How to create admin users\n\nI have been receiving queries by several people on how can they create admin users and decided to put the instructions here for anybody who needs them.\n\nFirst, for anyone who doesn't want to go through all the steps, I am uploading a sample JSON file that you can directly import in your database, in the `admins` collection. The [file](https://github.com/mihailgaberov/bingo/blob/master/admins.sample.json) contains only one user with the following credentials:\n\n```\nemail: testadmin@bingobigul.com\npassword: Bingo!@#\n```\n\n#### Steps:\n\n1. Start the main app by running 'gulp' in the root directory\n2. Start your local mongo instance by running 'mongod' in your terminal\n3. Start the game server by running 'node server.js' in the root directory (this assumes you have installed Node.js on your machine)\n4. Install [Postman](https://www.postman.com/) or [Insomnia](https://insomnia.rest/) (apps for dealing with RESTful APIs) and create a POST request, as it follows:\n\n   URL: http://localhost:8888/bingo-api/registerAdmin\n\n   The body of the request (should be in Form URL Encoded type):\n\n```\n  email: yourdesiredemail@address.com\n\n  name: yourdesiredname\n\n  password: yourdesiredpassword\n```\n\nIf successful, you should see a generated token in the response, e.g.\n\n{\n\"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZTlkM2MzNWQ4MTQzOTI1YTRmOGMyNjIiLCJlbWFpbCI6InRlc3RhZG1pbkBiaW5nb2JpZ3VsLmNvbSIsIm5hbWUiOiJBZG1pbiIsImV4cCI6MTU4Nzk2NzY2OSwiaWF0IjoxNTg3MzYyODY5fQ.BqDWdeqviG0rtfNoKXarpitylgZm1IcaFA7TfFgfsY4\"\n}\n\n:tada: To access back-office app, please use http://localhost:8000/back-office.html\n\nMIT License\n\nCopyright (c) 2016 - present Mihail Gaberov\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmihailgaberov%2Fbingo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmihailgaberov%2Fbingo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmihailgaberov%2Fbingo/lists"}