Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20
15 changes: 9 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 7 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,21 @@
"private": true,
"version": "0.0.0",
"type": "module",
"engines": {
"node": ">=18.0.0"
},
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"dependencies": {
"react": "^19.2.3",
"@cloudinary/react": "^1.13.0",
"@cloudinary/url-gen": "^1.19.0",
"@google/genai": "^1.37.0",
"react": "^19.2.3",
"react-dom": "^19.2.3",
"recharts": "^3.6.0",
"@cloudinary/react": "^1.13.0",
"@cloudinary/url-gen": "^1.19.0"
"recharts": "^3.6.0"
},
"devDependencies": {
"@types/node": "^22.14.0",
Expand Down
6 changes: 3 additions & 3 deletions services/cloudinaryService.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// services/cloudinaryService.ts
import { Cloudinary } from '@cloudinary/url-gen';

// These will be set via environment variables
// These will be set via environment variables - using import.meta.env for Vite
export const CLOUDINARY_CONFIG = {
cloudName: process.env.VITE_CLOUDINARY_CLOUD_NAME || 'demo',
uploadPreset: process.env.VITE_CLOUDINARY_UPLOAD_PRESET || 'unsigned_upload'
cloudName: import.meta.env.VITE_CLOUDINARY_CLOUD_NAME || 'demo',
uploadPreset: import.meta.env.VITE_CLOUDINARY_UPLOAD_PRESET || 'unsigned_upload'
};

// Warn if using default values
Expand Down
2 changes: 1 addition & 1 deletion services/geminiService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ If a user asks about pricing, direct them to use the "B2B Quote" or WhatsApp but

export class GeminiService {
private getAI() {
return new GoogleGenAI({ apiKey: process.env.API_KEY });
return new GoogleGenAI({ apiKey: import.meta.env.VITE_API_KEY || import.meta.env.API_KEY || '' });
}

async *streamTech(prompt: string) {
Expand Down
12 changes: 12 additions & 0 deletions vercel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://openapi.vercel.sh/vercel.json",
"buildCommand": "npm run build",
"outputDirectory": "dist",
"framework": "vite",
"rewrites": [
{
"source": "/(.*)",
"destination": "/index.html"
}
]
}
12 changes: 12 additions & 0 deletions vite-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/// <reference types="vite/client" />

interface ImportMetaEnv {
readonly VITE_CLOUDINARY_CLOUD_NAME: string;
readonly VITE_CLOUDINARY_UPLOAD_PRESET: string;
readonly VITE_API_KEY: string;
readonly API_KEY: string;
}

interface ImportMeta {
readonly env: ImportMetaEnv;
}