diff --git a/.gitignore b/.gitignore index c2658d7d..5bbf8847 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,6 @@ 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 b6292209..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` @@ -181,6 +187,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 diff --git a/packages/backend/.gitignore b/packages/backend/.gitignore index b667a045..987e4095 100644 --- a/packages/backend/.gitignore +++ b/packages/backend/.gitignore @@ -1,2 +1,3 @@ db dist +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 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 new file mode 100644 index 00000000..ed25da52 --- /dev/null +++ b/packages/frontend/.env.example @@ -0,0 +1,6 @@ +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/.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" + } + } } 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; 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: -