Skip to content

Commit

Permalink
Merge pull request #17 from btkcodedev/staging
Browse files Browse the repository at this point in the history
v1.0.14: Staging
  • Loading branch information
btkcodedev authored Jan 11, 2025
2 parents 8589b80 + 417227e commit 540843d
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 25 deletions.
8 changes: 2 additions & 6 deletions .env.example
Original file line number Diff line number Diff line change
@@ -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";
VITE_AIRBYTE_SUPABASE_PROXY_URL = "https://xxxxxx.supabase/functions/v1/xxxxx/airbyte"
VITE_GROQ_SUPABASE_PROXY_URL = "https://xxxxxxx.supabase/functions/v1/xxxxx/groq"
7 changes: 6 additions & 1 deletion .github/workflows/firebase-hosting-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/firebase-hosting-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@ 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:
- <code>[https://growwithanalysr.web.app/](https://growwithanalysr.web.app/) - Production</code>
- <code>[https://growwithanalysr.vercel.app/](https://growwithanalysr-staging.vercel.app/) - Experimental, for new features</code>
- <code>[https://growwithanalysr-staging.vercel.app/](https://growwithanalysr-staging.vercel.app/) - Experimental, for new features</code>

## 📽️ 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)
Expand Down Expand Up @@ -69,7 +72,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

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "analysr",
"private": true,
"version": "1.0.13",
"version": "1.0.14",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
6 changes: 2 additions & 4 deletions src/config/services/index.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
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";

export const getAirbyteApiUrl = () => {
if (import.meta.env.DEV) {
return AIRBYTE_LOCAL_PROXY_URL;
}
return 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 GROQ_SUPABASE_PROXY_URL;
return import.meta.env.VITE_GROQ_SUPABASE_PROXY_URL;
};
4 changes: 3 additions & 1 deletion src/vite-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
/// <reference types="vite/client" />

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 {
Expand Down
12 changes: 4 additions & 8 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand All @@ -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) => {
Expand All @@ -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) => {
Expand Down

0 comments on commit 540843d

Please sign in to comment.