Skip to content
Open
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
20 changes: 20 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# ===== Connection Mode =====
# Choose ONE of the following modes:

# Mode 1: Direct API Key (for Google AI Studio)
# Create your own API KEY at https://aistudio.google.com/apikey
#REACT_APP_GEMINI_API_KEY=''

# Mode 2: Proxy Mode (for Vertex AI - recommended)
REACT_APP_PROXY_URL=ws://localhost:8080/api/ws

# ===== Vertex AI Configuration (for backend proxy) =====
GOOGLE_PROJECT_ID=your-project-id
GOOGLE_LOCATION=us-central1
GEMINI_MODEL_ID=gemini-live-2.5-flash-preview-native-audio
# Use absolute path or path relative to where server is run
GOOGLE_KEY_FILE=/path/to/your/service-account-key.json

# ===== Server Configuration =====
PROXY_PORT=8080
PROXY_HOST=0.0.0.0
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

# dependencies
/node_modules
/server/node_modules
/.pnp
.pnp.js

Expand All @@ -13,11 +14,24 @@

# misc
.DS_Store
.env
.env.local
.env.development.local
.env.test.local
.env.production.local

# IDE
.idea/
.vscode/

# Google Cloud credentials
*.json
!package.json
!package-lock.json
!tsconfig.json
!pnpm-lock.yaml

npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
20 changes: 20 additions & 0 deletions server/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "live-api-proxy-server",
"version": "0.1.0",
"type": "module",
"scripts": {
"dev": "bun --env-file=../.env run --watch src/index.ts",
"start": "bun run src/index.ts"
},
"dependencies": {
"@fastify/cors": "^11.1.0",
"@fastify/websocket": "^11.1.0",
"@google/genai": "^1.0.0",
"fastify": "^5.2.1"
},
"devDependencies": {
"@types/node": "^22.0.0",
"pino-pretty": "^13.1.3",
"typescript": "^5.6.3"
}
}
Loading