From c15f07523bed072a9cb662baeebc4986ed845b90 Mon Sep 17 00:00:00 2001 From: btkcodedev Date: Sat, 11 Jan 2025 11:23:16 +0530 Subject: [PATCH 1/6] Update README.md vercel url --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3526677..730b88b 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Here’s a speedy summary: - Your analytics lineup features Aspect Analysis, a Word Sentiment Heatmap (for those feelings), Advanced Text Analysis, Groq Business Analytics, Keyphrase Analysis, and a handy Competitor Comparison. - Check it out at: - [https://growwithanalysr.web.app/](https://growwithanalysr.web.app/) - Production - - [https://growwithanalysr.vercel.app/](https://growwithanalysr-staging.vercel.app/) - Experimental, for new features + - [https://growwithanalysr-staging.vercel.app/](https://growwithanalysr-staging.vercel.app/) - Experimental, for new features ## 🏗️ Architecture ![image](https://github.com/user-attachments/assets/0abe96f6-414a-42d2-aa0d-d0950a7da194) From a09691f726280375cb9816875d6c605ce5d8eea8 Mon Sep 17 00:00:00 2001 From: btkcodedev Date: Sat, 11 Jan 2025 11:28:27 +0530 Subject: [PATCH 2/6] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 730b88b..a1e34fe 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Here’s a speedy summary: - **1.0.0** - With your customer reviews in Motherduck, along with your chosen business stack and areas of interest, Analysr is ready to dish out some insightful analytics. To sweeten the deal, Groq is also integrated to help you navigate all your growth phases. - - Your analytics lineup features Aspect Analysis, a Word Sentiment Heatmap (for those feelings), Advanced Text Analysis, Groq Business Analytics, Keyphrase Analysis, and a handy Competitor Comparison. + - Your analytics lineup features Aspect Analysis, a Word Sentiment Heatmap (for those feelings), Advanced Text Analysis, Groq Business Analytics, Keyphrase Analysis, and a handy Competitive Advantage. - Check it out at: - [https://growwithanalysr.web.app/](https://growwithanalysr.web.app/) - Production - [https://growwithanalysr-staging.vercel.app/](https://growwithanalysr-staging.vercel.app/) - Experimental, for new features @@ -69,7 +69,7 @@ ATTACH 'md:_share/my_db/de60469b-3a05-4d74-bf63-4c1549dd55b6'; - **Advanced Text Analysis:** Delve deeper into the nuances of customer language. - **Groq Business Analytics:** Access data-driven insights to inform your growth strategy. - **Keyphrase Analysis:** Identify and analyze key phrases that matter to your customers. -- **Competitor Comparison:** Benchmark your performance against competitors. +- **Competitive advantage:** Benchmark your reviews to know your current positive/negative sentiment advantage. ## 🛠️ Technology Stack From 639f7c5f44e3738132f276edff0b509fb2db9d9f Mon Sep 17 00:00:00 2001 From: btkcodedev Date: Sat, 11 Jan 2025 14:54:59 +0530 Subject: [PATCH 3/6] fix urls --- .env.example | 8 ++------ package.json | 2 +- src/config/services/index.ts | 6 ++---- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/.env.example b/.env.example index d2a5ef4..fc9d777 100644 --- a/.env.example +++ b/.env.example @@ -1,6 +1,2 @@ -AIRBYTE_SUPABASE_PROXY_URL = "https://xxxxxx/functions/v1/xxxxx/airbyte"; -AIRBYTE_LOCAL_PROXY_URL = "/api/airbyte"; -AIRBYTE_API_BASE_URL = "https://api.airbyte.com/v1"; -GROQ_SUPABASE_PROXY_URL = "https://xxxxxxx/functions/v1/xxxxx/groq"; -GROQ_LOCAL_PROXY_URL = "/api/groq"; -GROQ_API_BASE_URL = "https://api.groq.com/v1"; +AIRBYTE_SUPABASE_PROXY_URL = "https://xxxxxx.supabase/functions/v1/xxxxx/airbyte" +GROQ_SUPABASE_PROXY_URL = "https://xxxxxxx.supabase/functions/v1/xxxxx/groq" diff --git a/package.json b/package.json index b27956c..df92843 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "analysr", "private": true, - "version": "1.0.13", + "version": "1.0.14", "type": "module", "scripts": { "dev": "vite", diff --git a/src/config/services/index.ts b/src/config/services/index.ts index 050d5da..750deb1 100644 --- a/src/config/services/index.ts +++ b/src/config/services/index.ts @@ -1,7 +1,5 @@ -export const AIRBYTE_SUPABASE_PROXY_URL = "https://lejxudxaxuqfkhtgddoe.supabase.co/functions/v1/apiProxy/airbyte"; export const AIRBYTE_LOCAL_PROXY_URL = "/api/airbyte"; export const AIRBYTE_API_BASE_URL = "https://api.airbyte.com/v1"; -export const GROQ_SUPABASE_PROXY_URL = "https://lejxudxaxuqfkhtgddoe.supabase.co/functions/v1/apiProxy/groq"; export const GROQ_LOCAL_PROXY_URL = "/api/groq"; export const GROQ_API_BASE_URL = "https://api.groq.com/v1"; @@ -9,12 +7,12 @@ export const getAirbyteApiUrl = () => { if (import.meta.env.DEV) { return AIRBYTE_LOCAL_PROXY_URL; } - return AIRBYTE_SUPABASE_PROXY_URL; + return import.meta.env.AIRBYTE_SUPABASE_PROXY_URL; }; export const getGroqApiUrl = () => { if (import.meta.env.DEV) { return GROQ_LOCAL_PROXY_URL; } - return GROQ_SUPABASE_PROXY_URL; + return import.meta.env.GROQ_SUPABASE_PROXY_URL; }; From f7d907c515df36403e5c2335d8163b17f0aae79d Mon Sep 17 00:00:00 2001 From: btkcodedev Date: Sat, 11 Jan 2025 15:09:40 +0530 Subject: [PATCH 4/6] update workflows to use VITE_ --- .env.example | 4 ++-- .github/workflows/firebase-hosting-merge.yml | 7 ++++++- .github/workflows/firebase-hosting-pull-request.yml | 7 ++++++- src/config/services/index.ts | 4 ++-- src/vite-env.d.ts | 4 +++- 5 files changed, 19 insertions(+), 7 deletions(-) diff --git a/.env.example b/.env.example index fc9d777..2ed692f 100644 --- a/.env.example +++ b/.env.example @@ -1,2 +1,2 @@ -AIRBYTE_SUPABASE_PROXY_URL = "https://xxxxxx.supabase/functions/v1/xxxxx/airbyte" -GROQ_SUPABASE_PROXY_URL = "https://xxxxxxx.supabase/functions/v1/xxxxx/groq" +VITE_AIRBYTE_SUPABASE_PROXY_URL = "https://xxxxxx.supabase/functions/v1/xxxxx/airbyte" +VITE_GROQ_SUPABASE_PROXY_URL = "https://xxxxxxx.supabase/functions/v1/xxxxx/groq" diff --git a/.github/workflows/firebase-hosting-merge.yml b/.github/workflows/firebase-hosting-merge.yml index e2c193c..b08778b 100644 --- a/.github/workflows/firebase-hosting-merge.yml +++ b/.github/workflows/firebase-hosting-merge.yml @@ -11,7 +11,12 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - run: npm ci && npm run build + - run: npm ci + - name: Set Environment Variables for Build + run: | + echo "VITE_AIRBYTE_SUPABASE_PROXY_URL=${{ secrets.AIRBYTE_SUPABASE_PROXY_URL }}" >> .env + echo "VITE_GROQ_SUPABASE_PROXY_URL=${{ secrets.GROQ_SUPABASE_PROXY_URL }}" >> .env + - run: npm run build - uses: FirebaseExtended/action-hosting-deploy@v0 with: repoToken: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/firebase-hosting-pull-request.yml b/.github/workflows/firebase-hosting-pull-request.yml index 4183ecd..c667c7c 100644 --- a/.github/workflows/firebase-hosting-pull-request.yml +++ b/.github/workflows/firebase-hosting-pull-request.yml @@ -13,7 +13,12 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - run: npm ci && npm run build + - run: npm ci + - name: Set Environment Variables for Build + run: | + echo "VITE_AIRBYTE_SUPABASE_PROXY_URL=${{ secrets.AIRBYTE_SUPABASE_PROXY_URL }}" >> .env + echo "VITE_GROQ_SUPABASE_PROXY_URL=${{ secrets.GROQ_SUPABASE_PROXY_URL }}" >> .env + - run: npm run build - uses: FirebaseExtended/action-hosting-deploy@v0 with: repoToken: ${{ secrets.GITHUB_TOKEN }} diff --git a/src/config/services/index.ts b/src/config/services/index.ts index 750deb1..d3ff178 100644 --- a/src/config/services/index.ts +++ b/src/config/services/index.ts @@ -7,12 +7,12 @@ export const getAirbyteApiUrl = () => { if (import.meta.env.DEV) { return AIRBYTE_LOCAL_PROXY_URL; } - return import.meta.env.AIRBYTE_SUPABASE_PROXY_URL; + return import.meta.env.VITE_AIRBYTE_SUPABASE_PROXY_URL; }; export const getGroqApiUrl = () => { if (import.meta.env.DEV) { return GROQ_LOCAL_PROXY_URL; } - return import.meta.env.GROQ_SUPABASE_PROXY_URL; + return import.meta.env.VITE_GROQ_SUPABASE_PROXY_URL; }; diff --git a/src/vite-env.d.ts b/src/vite-env.d.ts index 27384a7..8a655ba 100644 --- a/src/vite-env.d.ts +++ b/src/vite-env.d.ts @@ -1,7 +1,9 @@ /// interface ImportMetaEnv { - readonly VITE_MOTHERDUCK_TOKEN: string + readonly VITE_MOTHERDUCK_TOKEN: string; + readonly VITE_AIRBYTE_SUPABASE_PROXY_URL: string; + readonly VITE_GROQ_SUPABASE_PROXY_URL: string; } interface ImportMeta { From 04571e83a0f381b324bbcc31e520553fb4ce1bd9 Mon Sep 17 00:00:00 2001 From: btkcodedev Date: Sat, 11 Jan 2025 15:44:23 +0530 Subject: [PATCH 5/6] remove redundant variables --- vite.config.ts | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/vite.config.ts b/vite.config.ts index 6c2cd53..f212cde 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -11,10 +11,6 @@ import { export default defineConfig(({ mode }) => { loadEnv(mode, process.cwd(), ""); - const AIRBYTE_API_PROXY_URL = AB_PROX; - const AIRBYTE_API_BASE_URL = AB_BASE; - const GROQ_API_PROXY_URL = GROQ_PROX; - const GROQ_API_BASE_URL = GROQ_BASE; return { plugins: [react()], server: { @@ -29,8 +25,8 @@ export default defineConfig(({ mode }) => { Expires: "0", }, proxy: { - [AIRBYTE_API_PROXY_URL]: { - target: AIRBYTE_API_BASE_URL, + [AB_PROX]: { + target: AB_BASE, changeOrigin: true, rewrite: (path) => path.replace(/^\/api\/airbyte/, ""), configure: (proxy, _options) => { @@ -52,8 +48,8 @@ export default defineConfig(({ mode }) => { }); }, }, - [GROQ_API_PROXY_URL]: { - target: GROQ_API_BASE_URL, + [GROQ_PROX]: { + target: GROQ_BASE, changeOrigin: true, rewrite: (path) => path.replace(/^\/api\/groq/, ""), configure: (proxy, _options) => { From 417227e3e8998e837dc80cb10ca482f04364ce21 Mon Sep 17 00:00:00 2001 From: btkcodedev Date: Sat, 11 Jan 2025 21:13:59 +0530 Subject: [PATCH 6/6] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index a1e34fe..b18c870 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,9 @@ Here’s a speedy summary: - [https://growwithanalysr.web.app/](https://growwithanalysr.web.app/) - Production - [https://growwithanalysr-staging.vercel.app/](https://growwithanalysr-staging.vercel.app/) - Experimental, for new features +## 📽️ Demonstration video +[![Analysr Demo](https://img.youtube.com/vi/K7LROVzU16A/0.jpg)](https://www.youtube.com/watch?v=K7LROVzU16A) + ## 🏗️ Architecture ![image](https://github.com/user-attachments/assets/0abe96f6-414a-42d2-aa0d-d0950a7da194)