From cfd129fb96299c9e9b5709a2f4e544649a323882 Mon Sep 17 00:00:00 2001 From: Vivian Phung Date: Mon, 26 Feb 2024 16:57:49 -0500 Subject: [PATCH 1/6] frontend ignore .env and change image --- .gitignore | 4 ++++ packages/frontend/.env.example | 5 +++++ packages/frontend/.gitignore | 1 + packages/frontend/src/context/Web3ModalProvider.tsx | 4 +++- 4 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 packages/frontend/.env.example diff --git a/.gitignore b/.gitignore index c2658d7d..af6e1d2d 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,5 @@ node_modules/ +yarn-error.log +.yarnrc.yml +.yarn/ + diff --git a/packages/frontend/.env.example b/packages/frontend/.env.example new file mode 100644 index 00000000..a460a683 --- /dev/null +++ b/packages/frontend/.env.example @@ -0,0 +1,5 @@ +REACT_APP_SERVER_URL = 'http://localhost:8000' + +REACT_APP_GITHUB_CLIENT_ID = +REACT_APP_GITHUB_TEMPLATE_REPO = +REACT_APP_WALLET_CONNECT_ID = \ No newline at end of file diff --git a/packages/frontend/.gitignore b/packages/frontend/.gitignore index 4d29575d..8692cf66 100644 --- a/packages/frontend/.gitignore +++ b/packages/frontend/.gitignore @@ -13,6 +13,7 @@ # misc .DS_Store +.env .env.local .env.development.local .env.test.local diff --git a/packages/frontend/src/context/Web3ModalProvider.tsx b/packages/frontend/src/context/Web3ModalProvider.tsx index 3b2363c2..c482588f 100644 --- a/packages/frontend/src/context/Web3ModalProvider.tsx +++ b/packages/frontend/src/context/Web3ModalProvider.tsx @@ -28,7 +28,9 @@ const metadata = { name: 'Web3Modal', description: 'Snowball Web3Modal', url: window.location.origin, - icons: ['https://avatars.githubusercontent.com/u/37784886'], + icons: [ + 'https://raw.githubusercontent.com/snowball-tools/mediakit/main/assets/logo.svg', + ], }; const chains = [mainnet, arbitrum] as const; From dbb928cd2fe1453ac1abfc02981b0a29ea693aba Mon Sep 17 00:00:00 2001 From: Vivian Phung Date: Mon, 26 Feb 2024 17:02:42 -0500 Subject: [PATCH 2/6] cleanup gitignore example --- .gitignore | 1 - packages/frontend/.env | 6 ----- packages/frontend/.env.example | 1 + yarn-error.log | 48 ---------------------------------- 4 files changed, 1 insertion(+), 55 deletions(-) delete mode 100644 packages/frontend/.env delete mode 100644 yarn-error.log diff --git a/.gitignore b/.gitignore index af6e1d2d..f6a00b4e 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,3 @@ node_modules/ yarn-error.log .yarnrc.yml .yarn/ - diff --git a/packages/frontend/.env b/packages/frontend/.env deleted file mode 100644 index c73b8fe2..00000000 --- a/packages/frontend/.env +++ /dev/null @@ -1,6 +0,0 @@ -REACT_APP_SERVER_URL = 'http://localhost:8000' - -REACT_APP_GITHUB_CLIENT_ID = -REACT_APP_GITHUB_TEMPLATE_REPO = - -REACT_APP_WALLET_CONNECT_ID = diff --git a/packages/frontend/.env.example b/packages/frontend/.env.example index a460a683..ed25da52 100644 --- a/packages/frontend/.env.example +++ b/packages/frontend/.env.example @@ -2,4 +2,5 @@ REACT_APP_SERVER_URL = 'http://localhost:8000' REACT_APP_GITHUB_CLIENT_ID = REACT_APP_GITHUB_TEMPLATE_REPO = + REACT_APP_WALLET_CONNECT_ID = \ No newline at end of file diff --git a/yarn-error.log b/yarn-error.log deleted file mode 100644 index d530169f..00000000 --- a/yarn-error.log +++ /dev/null @@ -1,48 +0,0 @@ -Arguments: - /Users/vivianphung/.nvm/versions/node/v18.19.0/bin/node /Users/vivianphung/Desktop/snowballtools-base/.yarn/releases/yarn-classic.cjs install - -PATH: - /Users/vivianphung/.proto/shims:/Users/vivianphung/.proto/bin:/Users/vivianphung/.nvm/versions/node/v18.19.0/bin:/usr/local/share/npm/bin:/usr/local/bin:/usr/local/sbin:~/bin:/usr/local/share/npm/bin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin:/Users/vivianphung/.proto/shims:/Users/vivianphung/.proto/bin:/Users/vivianphung/.nvm/versions/node/v18.19.0/bin:/usr/local/share/npm/bin:/usr/local/sbin:~/bin:/opt/local/bin:/opt/local/sbin:/Applications/Visual Studio Code.app/Contents/Resources/app/bin:/Users/vivianphung/.rvm/bin:/Applications/Visual Studio Code.app/Contents/Resources/app/bin - -Yarn version: - 1.22.19 - -Node version: - 18.19.0 - -Platform: - darwin arm64 - -Trace: - SyntaxError: /Users/vivianphung/Desktop/snowballtools-base/packages/frontend/package.json: Unexpected token < in JSON at position 163 - at JSON.parse () - at /Users/vivianphung/Desktop/snowballtools-base/.yarn/releases/yarn-classic.cjs:1104:57 - at Generator.next () - at step (/Users/vivianphung/Desktop/snowballtools-base/.yarn/releases/yarn-classic.cjs:310:30) - at /Users/vivianphung/Desktop/snowballtools-base/.yarn/releases/yarn-classic.cjs:321:13 - -npm manifest: - { - "name": "snowball-tools", - "private": true, - "workspaces": [ - "packages/*" - ], - "dependencies": {}, - "devDependencies": { - "husky": "^8.0.3", - "lerna": "^8.0.0", - "depcheck": "^1.4.2" - }, - "scripts": { - "prepare": "husky install", - "build": "lerna run build --stream", - "lint": "lerna run lint --stream -- --max-warnings=0" - } - } - -yarn manifest: - No manifest - -Lockfile: - From ece9a2ecec81a0a0484db6d020c7aa59f6266614 Mon Sep 17 00:00:00 2001 From: Vivian Phung Date: Mon, 26 Feb 2024 17:08:22 -0500 Subject: [PATCH 3/6] update readme --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index b6292209..a00412dc 100644 --- a/README.md +++ b/README.md @@ -181,6 +181,12 @@ cd packages/frontend ``` +- Rename [.env.example](packages/frontend/.env.example) to `.env` + + ```bash + mv .env.example .env + ``` + - Copy the GitHub OAuth app client ID from previous steps and set it in frontend [.env](packages/frontend/.env) file ```env From 7f11d8818d2c29a63ad6604bcc9e6b350eae1204 Mon Sep 17 00:00:00 2001 From: Vivian Phung Date: Mon, 26 Feb 2024 17:08:58 -0500 Subject: [PATCH 4/6] update eslint with react version --- packages/frontend/.eslintrc.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/frontend/.eslintrc.json b/packages/frontend/.eslintrc.json index e7f396b4..a06db087 100644 --- a/packages/frontend/.eslintrc.json +++ b/packages/frontend/.eslintrc.json @@ -16,5 +16,10 @@ "plugin:react/recommended", "plugin:@typescript-eslint/recommended", "plugin:prettier/recommended" - ] + ], + "settings": { + "react": { + "version": "detect" + } + } } From ef7c673698a8540c32acd79aef1cb58fa9563083 Mon Sep 17 00:00:00 2001 From: Vivian Phung Date: Mon, 26 Feb 2024 17:22:47 -0500 Subject: [PATCH 5/6] ignore environments backend folder --- packages/backend/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/backend/.gitignore b/packages/backend/.gitignore index b667a045..75c81f52 100644 --- a/packages/backend/.gitignore +++ b/packages/backend/.gitignore @@ -1,2 +1,3 @@ db dist +environments \ No newline at end of file From 50749055bf502d56384c14e8982e08149922f567 Mon Sep 17 00:00:00 2001 From: Vivian Phung Date: Mon, 26 Feb 2024 17:33:44 -0500 Subject: [PATCH 6/6] ignore backend env file and readme --- .gitignore | 2 ++ README.md | 6 ++++++ packages/backend/.gitignore | 2 +- .../backend/environments/{local.toml => local.toml.example} | 0 4 files changed, 9 insertions(+), 1 deletion(-) rename packages/backend/environments/{local.toml => local.toml.example} (100%) diff --git a/.gitignore b/.gitignore index f6a00b4e..5bbf8847 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ node_modules/ yarn-error.log .yarnrc.yml .yarn/ + +packages/backend/environments/local.toml \ No newline at end of file diff --git a/README.md b/README.md index a00412dc..8c2354c8 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,12 @@ cd packages/backend ``` +- Rename backend config file from [environments/local.toml.example](packages/backend/environments/local.toml.example) to `local.toml` + + ```bash + mv environments/local.toml.example environments/local.toml + ``` + - Set `gitHub.oAuth.clientId` and `gitHub.oAuth.clientSecret` in backend [config file](packages/backend/environments/local.toml) - Client ID and secret will be available after [creating an OAuth app](https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/creating-an-oauth-app) - In "Homepage URL", type `http://localhost:3000` diff --git a/packages/backend/.gitignore b/packages/backend/.gitignore index 75c81f52..987e4095 100644 --- a/packages/backend/.gitignore +++ b/packages/backend/.gitignore @@ -1,3 +1,3 @@ db dist -environments \ No newline at end of file +environments/local.toml \ No newline at end of file diff --git a/packages/backend/environments/local.toml b/packages/backend/environments/local.toml.example similarity index 100% rename from packages/backend/environments/local.toml rename to packages/backend/environments/local.toml.example