diff --git a/.firebase/hosting.YnVpbGQ.cache b/.firebase/hosting.YnVpbGQ.cache deleted file mode 100644 index dbe392c..0000000 --- a/.firebase/hosting.YnVpbGQ.cache +++ /dev/null @@ -1,14 +0,0 @@ -asset-manifest.json,1645915909787,9a3347b6a53d4fa5c0cf873428f9ead1f3c62e6d8bd244a16b8a9854f5bbfec1 -favicon.ico,1645915890134,b72f7455f00e4e58792d2bca892abb068e2213838c0316d6b7a0d6d16acd1955 -index.html,1645915909787,605ccd6ca0d8a9109398a1b5a462ed624c20be5da681516a1b344a7f0ce0dba3 -logo192.png,1645915890135,caff018b7f1e8fd481eb1c50d75b0ef236bcd5078b1d15c8bb348453fee30293 -logo512.png,1645915890136,191fc21360b4ccfb1cda11a1efb97f489ed22672ca83f4064316802bbfdd750e -manifest.json,1645915890137,341d52628782f8ac9290bbfc43298afccb47b7cbfcee146ae30cf0f46bc30900 -robots.txt,1645915890138,391d14b3c2f8c9143a27a28c7399585142228d4d1bdbe2c87ac946de411fa9a2 -static/css/main.4122a25e.css,1645915909798,78e6e4ea1d82c3ea9610b11fddbd744ba4d50ab218950dd0da5c1e5440be4662 -static/css/main.4122a25e.css.map,1645915909799,f2c76328876b03d88126d522e5b4961df1e8bbccdb77f65f7e85c4ba0e442c66 -static/js/787.67366841.chunk.js,1645915909798,fbaa59ab931c9f3bb124cc77e296b4f6e509bfe09bdfd7d266d37658a196595d -static/js/787.67366841.chunk.js.map,1645915909799,734ed7f3eae3105299f34b6186dc95858b886113d6a47392fdbf515c51f03f5d -static/js/main.19f3c7f7.js,1645915909798,4c80906a42ef211af86ab64cc65d2adc7eb5e656497bd680088fdcb0c83750ed -static/js/main.19f3c7f7.js.LICENSE.txt,1645915909798,20f1a6da8ff47fbc9ed05e589478c4a8f32f2112f9af908c5d0e139fbbcf2392 -static/js/main.19f3c7f7.js.map,1645915909799,e274f01f8976c60dbcb5b595bfa4a78e0e4e799538fcce4f9b927ff09cd796c9 diff --git a/.firebaserc b/.firebaserc index b9357f2..6a10bea 100644 --- a/.firebaserc +++ b/.firebaserc @@ -1,15 +1,15 @@ { "projects": { - "default": "guess-the-song-d74b8" + "default": "wotsong-app" }, "targets": { - "guess-the-song-d74b8": { + "wotsong-app": { "hosting": { - "test-guess-the-song": [ - "test-guess-the-song" + "test-wotsong-app": [ + "test-wotsong-app" ], - "guess-the-song": [ - "guess-the-song" + "wotsong-app": [ + "wotsong-app" ] } } diff --git a/.github/workflows/firebase-hosting-merge-prod.yml b/.github/workflows/firebase-hosting-merge-prod.yml index 00c5d43..a95eb97 100644 --- a/.github/workflows/firebase-hosting-merge-prod.yml +++ b/.github/workflows/firebase-hosting-merge-prod.yml @@ -33,15 +33,14 @@ jobs: REACT_APP_SPOTIFY_TOKEN_ENDPOINT: '${{ secrets.REACT_APP_SPOTIFY_TOKEN_ENDPOINT }}' REACT_APP_RECEIVER_APP_ID: '${{ secrets.REACT_APP_RECEIVER_APP_ID }}' REACT_APP_CAST_NAMESPACE: '${{ secrets.REACT_APP_CAST_NAMESPACE }}' - REACT_APP_ENV: 'dev' + REACT_APP_ENV: 'prod' steps: - uses: actions/checkout@v2 - - run: curl -o- -L https://yarnpkg.com/install.sh | bash - - run: yarn install && yarn lint && yarn build + - run: yarn build - uses: FirebaseExtended/action-hosting-deploy@v0 with: repoToken: '${{ secrets.GITHUB_TOKEN }}' - firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_GUESS_THE_SONG_D74B8 }}' - target: guess-the-song + firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_WOTSONG_APP }}' + target: wotsong-app channelId: live - projectId: guess-the-song-d74b8 + projectId: wotsong-app diff --git a/.github/workflows/firebase-hosting-merge-test.yml b/.github/workflows/firebase-hosting-merge-test.yml deleted file mode 100644 index 04bed69..0000000 --- a/.github/workflows/firebase-hosting-merge-test.yml +++ /dev/null @@ -1,47 +0,0 @@ -# This file was auto-generated by the Firebase CLI -# https://github.com/firebase/firebase-tools - -name: Deploy to Firebase Hosting on merge -'on': - push: - branches: - - develop - paths-ignore: - - 'README.md' - - 'firestore.rules' - - 'storage.rules' - - 'firestore.indexes.json' - - '.env.example' - - 'functions/**' - - '.github/**' - - '.vscode/**' -jobs: - build_and_deploy: - runs-on: ubuntu-latest - env: - HTTPS: true - REACT_APP_FIREBASE_API_KEY: '${{ secrets.REACT_APP_FIREBASE_API_KEY }}' - REACT_APP_FIREBASE_AUTH_DOMAIN: '${{ secrets.REACT_APP_FIREBASE_AUTH_DOMAIN }}' - REACT_APP_FIREBASE_PROJECT_ID: '${{ secrets.REACT_APP_FIREBASE_PROJECT_ID }}' - REACT_APP_FIREBASE_STORAGE_BUCKET: '${{ secrets.REACT_APP_FIREBASE_STORAGE_BUCKET }}' - REACT_APP_FIREBASE_MESSAGING_SENDER_ID: '${{ secrets.REACT_APP_FIREBASE_MESSAGING_SENDER_ID }}' - REACT_APP_FIREBASE_API_ID: '${{ secrets.REACT_APP_FIREBASE_API_ID }}' - REACT_APP_FIREBASE_MEASUREMENT_ID: '${{ secrets.REACT_APP_FIREBASE_MEASUREMENT_ID }}' - REACT_APP_SPOTIFY_CLIENT_ID: '${{ secrets.REACT_APP_SPOTIFY_CLIENT_ID }}' - REACT_APP_BASE_URL: '${{ secrets.REACT_APP_BASE_URL }}' - REACT_APP_SPOTIFY_AUTH_ENDPOINT: '${{ secrets.REACT_APP_SPOTIFY_AUTH_ENDPOINT }}' - REACT_APP_SPOTIFY_TOKEN_ENDPOINT: '${{ secrets.REACT_APP_SPOTIFY_TOKEN_ENDPOINT }}' - REACT_APP_RECEIVER_APP_ID: '${{ secrets.REACT_APP_RECEIVER_APP_ID }}' - REACT_APP_CAST_NAMESPACE: '${{ secrets.REACT_APP_CAST_NAMESPACE }}' - REACT_APP_ENV: 'dev' - steps: - - uses: actions/checkout@v2 - - run: curl -o- -L https://yarnpkg.com/install.sh | bash - - run: yarn install && yarn lint && yarn build - - uses: FirebaseExtended/action-hosting-deploy@v0 - with: - repoToken: '${{ secrets.GITHUB_TOKEN }}' - firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_GUESS_THE_SONG_D74B8 }}' - target: test-guess-the-song - channelId: live - projectId: guess-the-song-d74b8 diff --git a/.github/workflows/firebase-hosting-pull-request.yml b/.github/workflows/firebase-hosting-pull-request.yml index 5c9f210..cdc476f 100644 --- a/.github/workflows/firebase-hosting-pull-request.yml +++ b/.github/workflows/firebase-hosting-pull-request.yml @@ -42,6 +42,6 @@ jobs: - uses: FirebaseExtended/action-hosting-deploy@v0 with: repoToken: '${{ secrets.GITHUB_TOKEN }}' - firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_GUESS_THE_SONG_D74B8 }}' - target: test-scrollbar - projectId: guess-the-song-d74b8 + firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_WOTSONG_APP }}' + target: test-wotsong-app + projectId: wotsong-app diff --git a/README.md b/README.md index c1ca65b..d0953c8 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# Guess The Song +# WotSong - A Music Guessing Game that integrates with Chrome Cast -Challenge your on-demand knowledge about music titles and artists with Guess The Song. This game introduces a little light competition inbetween friends at gatherings where you can compete in identifying songs the fastest. +Challenge your on-demand knowledge about music titles and artists with WotSong. This game introduces a little light competition inbetween friends at gatherings where you can compete in identifying songs the fastest. A game session can be started and cast to your chromecast device on your television. Join game sessions on the mobile and quiz on your personally created playlists from Spotify... diff --git a/firebase-debug.log b/firebase-debug.log new file mode 100644 index 0000000..6ff5ff9 --- /dev/null +++ b/firebase-debug.log @@ -0,0 +1,59 @@ +[debug] [2022-02-28T20:12:50.162Z] ---------------------------------------------------------------------- +[debug] [2022-02-28T20:12:50.165Z] Command: /usr/local/bin/node /usr/local/bin/firebase deploy +[debug] [2022-02-28T20:12:50.166Z] CLI Version: 10.2.1 +[debug] [2022-02-28T20:12:50.166Z] Platform: darwin +[debug] [2022-02-28T20:12:50.166Z] Node Version: v16.14.0 +[debug] [2022-02-28T20:12:50.174Z] Time: Mon Feb 28 2022 21:12:50 GMT+0100 (Centraleuropæisk normaltid) +[debug] [2022-02-28T20:12:50.175Z] ---------------------------------------------------------------------- +[debug] +[debug] [2022-02-28T20:12:50.243Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"] +[debug] [2022-02-28T20:12:50.243Z] > authorizing via signed-in user (stephanboersma@googlemail.com) +[debug] [2022-02-28T20:12:50.244Z] [iam] checking project wotsong-app for permissions ["datastore.indexes.create","datastore.indexes.delete","datastore.indexes.list","datastore.indexes.update","firebase.projects.get","firebasehosting.sites.update"] +[debug] [2022-02-28T20:12:50.247Z] >>> [apiv2][query] POST https://cloudresourcemanager.googleapis.com/v1/projects/wotsong-app:testIamPermissions [none] +[debug] [2022-02-28T20:12:50.247Z] >>> [apiv2][body] POST https://cloudresourcemanager.googleapis.com/v1/projects/wotsong-app:testIamPermissions {"permissions":["datastore.indexes.create","datastore.indexes.delete","datastore.indexes.list","datastore.indexes.update","firebase.projects.get","firebasehosting.sites.update"]} +[debug] [2022-02-28T20:12:50.647Z] <<< [apiv2][status] POST https://cloudresourcemanager.googleapis.com/v1/projects/wotsong-app:testIamPermissions 200 +[debug] [2022-02-28T20:12:50.648Z] <<< [apiv2][body] POST https://cloudresourcemanager.googleapis.com/v1/projects/wotsong-app:testIamPermissions {"permissions":["datastore.indexes.create","datastore.indexes.delete","datastore.indexes.list","datastore.indexes.update","firebase.projects.get","firebasehosting.sites.update"]} +[debug] [2022-02-28T20:12:50.649Z] >>> [apiv2][query] GET https://firebase.googleapis.com/v1beta1/projects/wotsong-app [none] +[debug] [2022-02-28T20:12:51.049Z] <<< [apiv2][status] GET https://firebase.googleapis.com/v1beta1/projects/wotsong-app 200 +[debug] [2022-02-28T20:12:51.050Z] <<< [apiv2][body] GET https://firebase.googleapis.com/v1beta1/projects/wotsong-app {"projectId":"wotsong-app","projectNumber":"189007230557","displayName":"wotsong","name":"projects/wotsong-app","resources":{"hostingSite":"wotsong-app","storageBucket":"wotsong-app.appspot.com","locationId":"europe-west"},"state":"ACTIVE"} +[info] +[info] === Deploying to 'wotsong-app'... +[info] +[info] i deploying firestore, hosting +[info] i firestore: reading indexes from firestore.indexes.json... +[info] i cloud.firestore: checking firestore.rules for compilation errors... +[debug] [2022-02-28T20:12:51.055Z] >>> [apiv2][query] POST https://firebaserules.googleapis.com/v1/projects/wotsong-app:test [none] +[debug] [2022-02-28T20:12:51.055Z] >>> [apiv2][body] POST https://firebaserules.googleapis.com/v1/projects/wotsong-app:test [omitted] +[debug] [2022-02-28T20:12:51.974Z] <<< [apiv2][status] POST https://firebaserules.googleapis.com/v1/projects/wotsong-app:test 200 +[debug] [2022-02-28T20:12:51.974Z] <<< [apiv2][body] POST https://firebaserules.googleapis.com/v1/projects/wotsong-app:test {} +[info] ✔ cloud.firestore: rules file firestore.rules compiled successfully +[debug] [2022-02-28T20:12:51.976Z] >>> [apiv2][query] GET https://firebase.googleapis.com/v1beta1/projects/wotsong-app [none] +[debug] [2022-02-28T20:12:52.271Z] <<< [apiv2][status] GET https://firebase.googleapis.com/v1beta1/projects/wotsong-app 200 +[debug] [2022-02-28T20:12:52.271Z] <<< [apiv2][body] GET https://firebase.googleapis.com/v1beta1/projects/wotsong-app {"projectId":"wotsong-app","projectNumber":"189007230557","displayName":"wotsong","name":"projects/wotsong-app","resources":{"hostingSite":"wotsong-app","storageBucket":"wotsong-app.appspot.com","locationId":"europe-west"},"state":"ACTIVE"} +[debug] [2022-02-28T20:12:52.275Z] >>> [apiv2][query] POST https://firebasehosting.googleapis.com/v1beta1/projects/189007230557/sites/wotsong-app/versions [none] +[debug] [2022-02-28T20:12:52.275Z] >>> [apiv2][body] POST https://firebasehosting.googleapis.com/v1beta1/projects/189007230557/sites/wotsong-app/versions {"config":{"rewrites":[{"glob":"**","path":"/index.html"}]},"labels":{"deployment-tool":"cli-firebase"}} +[debug] [2022-02-28T20:12:52.276Z] >>> [apiv2][query] POST https://firebasehosting.googleapis.com/v1beta1/projects/189007230557/sites/test-wotsong-app/versions [none] +[debug] [2022-02-28T20:12:52.276Z] >>> [apiv2][body] POST https://firebasehosting.googleapis.com/v1beta1/projects/189007230557/sites/test-wotsong-app/versions {"config":{"rewrites":[{"glob":"**","path":"/index.html"}]},"labels":{"deployment-tool":"cli-firebase"}} +[debug] [2022-02-28T20:12:54.427Z] <<< [apiv2][status] POST https://firebasehosting.googleapis.com/v1beta1/projects/189007230557/sites/wotsong-app/versions 200 +[debug] [2022-02-28T20:12:54.427Z] <<< [apiv2][body] POST https://firebasehosting.googleapis.com/v1beta1/projects/189007230557/sites/wotsong-app/versions {"name":"projects/189007230557/sites/wotsong-app/versions/a754753f5c8e1216","status":"CREATED","config":{"rewrites":[{"glob":"**","path":"/index.html"}]},"labels":{"deployment-tool":"cli-firebase"}} +[debug] [2022-02-28T20:12:54.610Z] <<< [apiv2][status] POST https://firebasehosting.googleapis.com/v1beta1/projects/189007230557/sites/test-wotsong-app/versions 200 +[debug] [2022-02-28T20:12:54.610Z] <<< [apiv2][body] POST https://firebasehosting.googleapis.com/v1beta1/projects/189007230557/sites/test-wotsong-app/versions {"name":"projects/189007230557/sites/test-wotsong-app/versions/6c7be9a0a356897c","status":"CREATED","config":{"rewrites":[{"glob":"**","path":"/index.html"}]},"labels":{"deployment-tool":"cli-firebase"}} +[debug] [2022-02-28T20:12:54.614Z] > refreshing access token with scopes: ["email","https://www.googleapis.com/auth/cloud-platform","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","openid"] +[debug] [2022-02-28T20:12:54.614Z] >>> HTTP REQUEST POST https://www.googleapis.com/oauth2/v3/token + +[debug] [2022-02-28T20:12:54.620Z] >>> [apiv2][query] GET https://firebaserules.googleapis.com/v1/projects/wotsong-app/releases pageSize=10&pageToken= +[debug] [2022-02-28T20:12:54.773Z] <<< HTTP RESPONSE 200 {"date":"Mon, 28 Feb 2022 20:12:54 GMT","cache-control":"no-cache, no-store, max-age=0, must-revalidate","pragma":"no-cache","expires":"Mon, 01 Jan 1990 00:00:00 GMT","content-type":"application/json; charset=utf-8","vary":"X-Origin, Referer, Origin,Accept-Encoding","server":"scaffolding on HTTPServer2","x-xss-protection":"0","x-frame-options":"SAMEORIGIN","x-content-type-options":"nosniff","alt-svc":"h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000,h3-Q050=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\"","accept-ranges":"none","transfer-encoding":"chunked"} +[debug] [2022-02-28T20:12:54.828Z] >>> HTTP REQUEST GET https://firestore.googleapis.com/v1/projects/wotsong-app/databases/(default)/collectionGroups/-/indexes + +[debug] [2022-02-28T20:12:55.346Z] <<< HTTP RESPONSE 200 {"content-type":"application/json; charset=UTF-8","vary":"X-Origin, Referer, Origin,Accept-Encoding","date":"Mon, 28 Feb 2022 20:12:55 GMT","server":"ESF","cache-control":"private","x-xss-protection":"0","x-frame-options":"SAMEORIGIN","x-content-type-options":"nosniff","alt-svc":"h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000,h3-Q050=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\"","accept-ranges":"none","transfer-encoding":"chunked"} +[debug] [2022-02-28T20:12:55.348Z] >>> HTTP REQUEST GET https://firestore.googleapis.com/v1/projects/wotsong-app/databases/(default)/collectionGroups/-/fields?filter=indexConfig.usesAncestorConfig=false + +[debug] [2022-02-28T20:12:55.481Z] <<< [apiv2][status] GET https://firebaserules.googleapis.com/v1/projects/wotsong-app/releases 200 +[debug] [2022-02-28T20:12:55.481Z] <<< [apiv2][body] GET https://firebaserules.googleapis.com/v1/projects/wotsong-app/releases {"releases":[{"name":"projects/wotsong-app/releases/cloud.firestore","rulesetName":"projects/wotsong-app/rulesets/9405ec67-9090-425c-8c21-7481d4a40366","createTime":"2022-02-28T19:57:20.608377Z","updateTime":"2022-02-28T19:57:20.608377Z"}]} +[debug] [2022-02-28T20:12:55.482Z] > refreshing access token with scopes: [] +[debug] [2022-02-28T20:12:55.482Z] >>> HTTP REQUEST POST https://www.googleapis.com/oauth2/v3/token + +[debug] [2022-02-28T20:12:55.607Z] <<< HTTP RESPONSE 200 {"pragma":"no-cache","expires":"Mon, 01 Jan 1990 00:00:00 GMT","date":"Mon, 28 Feb 2022 20:12:55 GMT","cache-control":"no-cache, no-store, max-age=0, must-revalidate","content-type":"application/json; charset=utf-8","vary":"X-Origin, Referer, Origin,Accept-Encoding","server":"scaffolding on HTTPServer2","x-xss-protection":"0","x-frame-options":"SAMEORIGIN","x-content-type-options":"nosniff","alt-svc":"h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000,h3-Q050=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\"","accept-ranges":"none","transfer-encoding":"chunked"} +[debug] [2022-02-28T20:12:55.660Z] >>> [apiv2][query] GET https://firebaserules.googleapis.com/v1/projects/wotsong-app/rulesets/9405ec67-9090-425c-8c21-7481d4a40366 [none] +[debug] [2022-02-28T20:12:55.728Z] <<< HTTP RESPONSE 200 {"content-type":"application/json; charset=UTF-8","vary":"X-Origin, Referer, Origin,Accept-Encoding","date":"Mon, 28 Feb 2022 20:12:55 GMT","server":"ESF","cache-control":"private","x-xss-protection":"0","x-frame-options":"SAMEORIGIN","x-content-type-options":"nosniff","alt-svc":"h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000,h3-Q050=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\"","accept-ranges":"none","transfer-encoding":"chunked"} +[info] ✔ firestore: deployed indexes in firestore.indexes.json successfully diff --git a/firebase.json b/firebase.json index 80ed58e..04b697d 100644 --- a/firebase.json +++ b/firebase.json @@ -4,7 +4,7 @@ "indexes": "firestore.indexes.json" }, "hosting": [{ - "target": "guess-the-song", + "target": "wotsong-app", "public": "build", "ignore": [ "firebase.json", @@ -19,7 +19,7 @@ ] }, { - "target": "test-guess-the-song", + "target": "test-wotsong-app", "public": "build", "ignore": [ "firebase.json", diff --git a/firestore.rules b/firestore.rules index 341425d..c38e3ae 100644 --- a/firestore.rules +++ b/firestore.rules @@ -2,7 +2,7 @@ rules_version = '2'; service cloud.firestore { match /databases/{database}/documents { match /{document=**} { - allow read, write; + allow read, write: if false; } } } \ No newline at end of file diff --git a/package.json b/package.json index d7c2b6b..585ca62 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "guess-game", + "name": "wotsong-app", "version": "0.1.0", "private": true, "dependencies": {