{"id":17481224,"url":"https://github.com/jamesgiu/quick-hit","last_synced_at":"2025-04-22T13:23:41.133Z","repository":{"id":42026771,"uuid":"363443373","full_name":"jamesgiu/quick-hit","owner":"jamesgiu","description":"Table tennis ELO application using React and Firebase","archived":false,"fork":false,"pushed_at":"2022-10-31T05:20:43.000Z","size":104959,"stargazers_count":12,"open_issues_count":14,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-10-19T01:18:34.060Z","etag":null,"topics":["elo","firebase","hacktoberfest","react","self-hosted","table-tennis"],"latest_commit_sha":null,"homepage":"https://jamesgiu.github.io/quick-hit/","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/jamesgiu.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}},"created_at":"2021-05-01T15:28:39.000Z","updated_at":"2024-04-18T00:55:24.000Z","dependencies_parsed_at":"2023-01-20T01:04:41.332Z","dependency_job_id":null,"html_url":"https://github.com/jamesgiu/quick-hit","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesgiu%2Fquick-hit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesgiu%2Fquick-hit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesgiu%2Fquick-hit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesgiu%2Fquick-hit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jamesgiu","download_url":"https://codeload.github.com/jamesgiu/quick-hit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250246858,"owners_count":21398951,"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":["elo","firebase","hacktoberfest","react","self-hosted","table-tennis"],"created_at":"2024-10-18T22:08:58.249Z","updated_at":"2025-04-22T13:23:41.107Z","avatar_url":"https://github.com/jamesgiu.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Deploy to GH Pages](https://github.com/jamesgiu/quick-hit/actions/workflows/deploy.yml/badge.svg?branch=main)](https://github.com/jamesgiu/quick-hit/actions/workflows/deploy.yml)\n[![Node.js CI](https://github.com/jamesgiu/quick-hit/actions/workflows/node.js.yml/badge.svg?branch=main)](https://github.com/jamesgiu/quick-hit/actions/workflows/node.js.yml)\n\n![image](https://user-images.githubusercontent.com/13777223/197453643-bb8ee2cb-d93f-4bb7-bb25-0ddec44cd147.png)\n\n# Quick Hit\n\nTable tennis tracking application using React and Firebase.\n\nHosted at: https://jamesgiu.github.io/quick-hit/\n\n## Commands\n\n### `npm start`\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### `npm run deploy`\n\nWill deploy the application to `github-pages` to be hosted.\n\nSee more: https://github.com/jamesgiu/quick-hit/deployments/activity_log?environment=github-pages\n\n### Other\n#### `npm run lint` and `npm run lint:fix`\n\nRuns `eslint` over the project.\n\n#### `npm run lint:css` and `npm run lint:css:fix` \n\nRuns `stylelint` over the project.\n\n#### `npm run style` and `npm run style:fix`\n\nRuns `prettier` over the project.\n\n## Contributing\n\nFeel free to contribute to any [Issues](https://github.com/jamesgiu/quick-hit/issues) or [make your own](https://github.com/jamesgiu/quick-hit/issues/new/choose)!\n\nThe guidelines are as follows:\n\n- There are no guidelines in the wild west.\n\n## Getting started with Firebase\n\n### Creating a Firebase Realtime Database\n\nThe .env file(s) should contain details for the application to reach your Firebase DB.\n\n`.env.development` will be used for `npm start`.\n\n`.env.production` will be used for `npm build`.\n\nThe following is an example file:\n\n```aidl\nREACT_APP_FB_URL=https://\u003cYOUR-DB\u003e.\u003cYOUR-REGION\u003e.firebasedatabase.app/\nREACT_APP_FB_ANALYTICS_UA=\"UA-123\"\n```\n\n### Creating the catalogue database\nThe catalogue will store references to all instances of QuickHit available. \n\n1. Visit https://console.firebase.google.com/u/1/ and select \"Add Project\"\n2. Then select 'Realtime Database'\n3. Create your new database, keep all settings default\n4. Once complete, the URL provided here will be the value to use as the `REACT_APP_FB_URL` in `.env`\n5. Import some dummy data to get the schema going, use the menu and select \"Import JSON\"\n6. Upload the committed file `db-example-catalogue.json` to get the schema initialised\n\n### Catalogue database entries\nThe below is an example of a catalogue entry for a QuickHit instance.\n\n```aidl\n{\n  \"instances\" : {\n    \"dbb0a47d-9a2a-40ef-900f-4e11b8dc5fd3 \" : {\n      \"fb_api_key\" : \"AIzaSyC-lBTbcM2aYfD5p7AgAoXJA30UwvpLnL4\",\n      \"fb_srv_acc_name\" : \"table-tennis@svc.acc\",\n      \"fb_url\" : \"https://table-tennis-testing-default-rtdb.asia-southeast1.firebasedatabase.app/\",\n      \"name\" : \"Demo Instance\",\n      \"restricted_happy_hour\" : true,\n      \"tournaments\" : true,\n      \"google_auth\": true\n    }\n  }\n}\n\n```\n#### fb_api_key\nRetrieved via Firebase using the following steps:\n1. On the console view (https://console.firebase.google.com/u/1/), click on the Settings cog next to \"Project Overview\"\n2. Click on \"general\"\n3. Take note of the \"Web API Key\", this will be used for `fb_api_key` in the catalogue database.\n#### fb_srv_acc_name\nRetrieved via Firebase using the following steps:\n1. On the console view (https://console.firebase.google.com/u/1/), select \"Authentication\" and then \"Get started\"\n2. Enable the Email/Password Sign-in method\n3. Go to \"Users\" then click \"Add user\"\n4. Add a service account and a password for it, this password will be prompted for when a user first uses the application.\n5. The service account user name will be used for `fb_srv_acc_name` in the catalogue database.\n#### fb_url\nRetrieved via Firebase using the following steps:\n1. On the console view (https://console.firebase.google.com/u/1/), select \"Realtime Database\"\n2. The URL will be displayed on the page (under \"Data\")\n#### restricted_happy_hour\nIf true, Happy Hour can only occur at 12:00PM or 4:00PM (better for a workplace!)\n#### tournaments\nIf true, tournaments will be enabled.\n#### google_auth\nIf true, Authentication via a Google Account provider will be enabled. Expects the Instance on Firebase to have\nGoogle as a Sign-In provider.\n\n### Creating an instance database\nAn instance database will store all the matches, players, and other data relevant to a particular instance of QuickHit.\n\n1. Visit https://console.firebase.google.com/u/1/ and select \"Add Project\"\n2. Then select 'Realtime Database'\n3. Create your new database, keep all settings default\n4. Once complete, the URL provided here will be the value to use as the `fb_url` in the catalogue database.\n5. Import some dummy data to get the schema going, use the menu and select \"Import JSON\"\n6. Upload the committed file `db-example.json` to get the schema initialised\n\n### Protecting the instance database\n\n1. On the console view (https://console.firebase.google.com/u/1/), select \"Authentication\" and then \"Users\"\n2. Copy the UUID of your newly added firebase service account (e.g. gSid15y7XJMC8E273OIjLjgaYig2)\n3. Go to \"Realtime Database\"\n4. Select \"Rules\"\n5. Change the Rules to only allow reads and writes from the authenticated service account user's UID:\n   ```aidl\n   {\n     \"rules\": {\n       \".read\": \"auth.uid == 'gSid15y7XJMC8E273OIjLjgaYig2'\",\n       \".write\": \"auth.uid == 'gSid15y7XJMC8E273OIjLjgaYig2'\"\n     }\n   }\n   ```\n\n## Screenshots\n\n![image](https://user-images.githubusercontent.com/13777223/194062100-1b523f3b-0489-4629-9da4-fc537c01e4cd.png)\n![image](https://user-images.githubusercontent.com/13777223/194063031-366e4014-06c0-4752-b32b-51be8c194612.png)\n![image](https://user-images.githubusercontent.com/13777223/194063062-51fc1675-cf55-47c1-b4eb-7f16adb8e1bb.png)\n![image](https://user-images.githubusercontent.com/13777223/194062177-ecc6a84b-273a-454f-a6ef-b428392bf01f.png)\n![image](https://user-images.githubusercontent.com/13777223/194062252-bb7dc3be-55e1-447d-9eee-786c8ec3830c.png)\n![image](https://user-images.githubusercontent.com/13777223/194062306-f8a06d28-012c-4fba-900f-2f712001792d.png)\n![image](https://user-images.githubusercontent.com/13777223/194062377-75e81c28-3be9-4e58-8bc9-fd21f2918631.png)\n![image](https://user-images.githubusercontent.com/13777223/194062418-f4116d65-f51b-4197-b11a-27414e5d7cd7.png)\n![image](https://user-images.githubusercontent.com/13777223/194062441-6764e263-f718-436b-a53f-137db6fc791f.png)\n![image](https://user-images.githubusercontent.com/13777223/194062500-ca9bcd6e-b128-4fba-a6e9-f84d65de356d.png)\n![image](https://user-images.githubusercontent.com/13777223/194062560-d2bf41d9-07c9-4373-a97e-accee91a6a2b.png)\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamesgiu%2Fquick-hit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjamesgiu%2Fquick-hit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamesgiu%2Fquick-hit/lists"}