Skip to content

Commit a109b5f

Browse files
Update readme and env examples (#57)
* Update readme and env examples * Update port * Fix typo * Update README.md
1 parent 4def2da commit a109b5f

File tree

8 files changed

+81
-77
lines changed

8 files changed

+81
-77
lines changed

deep-sea-stories/.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
FISHJAM_ID=
22
FISHJAM_MANAGEMENT_TOKEN=
3-
ELEVENLABS_API_KEY=
3+
GEMINI_API_KEY=

deep-sea-stories/README.md

Lines changed: 79 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,79 @@
1-
# Deep Sea Stories Example App
1+
# Deep Sea Stories
2+
3+
Deep Sea Stories is a real-time, audio-driven game where players solve mysteries with the help of an AI riddle master.
4+
5+
https://github.com/user-attachments/assets/a88f872e-f707-4014-8855-0a55375ce998
6+
7+
Check out our [blog post](https://fishjam.swmansion.com/blog/voice-ai-how-we-built-a-multi-speaker-ai-agent-using-gemini) to learn more!
8+
9+
## Running Locally
10+
11+
Before running locally, make sure to copy `.env.example` to `.env` and set the following values:
12+
13+
```bash
14+
FISHJAM_ID=...
15+
FISHJAM_MANAGEMENT_TOKEN=...
16+
GEMINI_API_KEY=...
17+
```
18+
19+
- You can get `FISHJAM_ID` and `FISHJAM_MANAGEMENT_TOKEN` for free by logging in at <https://fishjam.io/app>.
20+
- You can generate `GEMINI_API_KEY` for free at <https://aistudio.google.com/api-keys>.
21+
22+
### Docker Compose (Recommended)
23+
24+
The easiest way to run the app is with [Docker Compose](https://docs.docker.com/compose/install/).
25+
26+
```bash
27+
docker compose up --build
28+
```
29+
30+
You can then access the UI at <http://localhost:5000>
31+
32+
### Running Manually
33+
34+
If you can't use [docker compose](#docker-compose-recommended) to run the project, then you can follow the following steps to run the demo.
35+
36+
### Requirements
37+
- [Node.js](https://nodejs.org/en/download) `>= 24`
38+
- Yarn `4.9.2` (via [Corepack](https://github.com/nodejs/corepack))
39+
40+
1. Install dependencies from the repo root:
41+
```bash
42+
corepack enable
43+
yarn install
44+
```
45+
2. Configure environment variables:
46+
- Backend (`packages/backend/.env`):
47+
```bash
48+
FISHJAM_ID="your-fishjam-id"
49+
FISHJAM_MANAGEMENT_TOKEN="your-management-token"
50+
GEMINI_API_KEY="your-gemini-api-key"
51+
```
52+
- Web (`packages/web/.env` or `packages/web/.env.local`):
53+
```bash
54+
VITE_FISHJAM_ID="your-fishjam-id"
55+
VITE_BACKEND_URL="http://localhost:8000/api/v1"
56+
```
57+
3. Start the backend (from repo root):
58+
```bash
59+
yarn workspace @deep-sea-stories/backend start
60+
```
61+
4. Start the web client in another terminal (from repo root):
62+
```bash
63+
yarn workspace @deep-sea-stories/web start
64+
```
65+
5. Open the UI at <http://localhost:5173>.
66+
67+
## Repo Structure
68+
69+
- `packages/backend`: Fishjam Agent which talks with Google Gemini Live API.
70+
- `packages/web`: Web client, which connects to the backend and Fishjam in the browser.
71+
- `packages/common`: Shared TypeScript types and utilities.
72+
- `docker-compose.yml` + `nginx.conf`: Container setup with a reverse proxy.
73+
74+
### Tech Stack
75+
76+
- Yarn workspaces monorepo with Fastify + tRPC (backend), React + Vite (frontend).
77+
- [Fishjam](https://fishjam.swmansion.com) for real-time videoconferencing capabilities.
78+
- [Gemini Live API](https://ai.google.dev/gemini-api/docs/live) for AI riddle master backend.
79+

deep-sea-stories/docker-compose.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ services:
1010
- PORT=8000
1111
- FISHJAM_ID=${FISHJAM_ID}
1212
- FISHJAM_MANAGEMENT_TOKEN=${FISHJAM_MANAGEMENT_TOKEN}
13-
- ELEVENLABS_API_KEY=${ELEVENLABS_API_KEY}
1413
- GEMINI_API_KEY=${GEMINI_API_KEY}
1514
restart: unless-stopped
1615

@@ -21,8 +20,6 @@ services:
2120
args:
2221
- VITE_FISHJAM_ID=${FISHJAM_ID}
2322
- VITE_BACKEND_URL=${BACKEND_URL:-/api/v1}
24-
environment:
25-
- VITE_BACKEND_URL=/api/v1
2623
restart: unless-stopped
2724
depends_on:
2825
- backend
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
FISHJAM_ID="your-fishjam-id"
22
FISHJAM_MANAGEMENT_TOKEN="your-management-token"
3-
ELEVENLABS_API_KEY="your-elevenlabs-api-key"
43
GEMINI_API_KEY="your-gemini-api-key"

deep-sea-stories/packages/backend/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
"types": "./src/index.ts",
1313
"dependencies": {
1414
"@deep-sea-stories/common": "workspace:*",
15-
"@elevenlabs/elevenlabs-js": "^2.20.0",
1615
"@fastify/cors": "^11.1.0",
1716
"@fishjam-cloud/js-server-sdk": "^0.22.0",
1817
"@google/genai": "^1.30.0",

deep-sea-stories/packages/backend/src/config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ export const configSchema = z.object({
1515
PORT: z.coerce.number().int().default(8000),
1616
FISHJAM_ID: z.string(),
1717
FISHJAM_MANAGEMENT_TOKEN: z.string(),
18-
ELEVENLABS_API_KEY: z.string(),
1918
GEMINI_API_KEY: z.string().optional(),
2019
GOOGLE_GENAI_USE_VERTEXAI: z
2120
.string()

deep-sea-stories/packages/backend/tests/config.test.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -65,19 +65,10 @@ describe('Configuration', () => {
6565
});
6666
}, 'Should throw when required FISHJAM_MANAGEMENT_TOKEN is missing');
6767

68-
assert.throws(() => {
69-
configSchema.parse({
70-
FISHJAM_ID: 'test-id',
71-
FISHJAM_MANAGEMENT_TOKEN: 'test-token',
72-
GEMINI_API_KEY: 'test-gemini-key',
73-
});
74-
}, 'Should throw when required ELEVENLABS_API_KEY is missing');
75-
7668
assert.doesNotThrow(() => {
7769
configSchema.parse({
7870
FISHJAM_ID: 'test-id',
7971
FISHJAM_MANAGEMENT_TOKEN: 'test-token',
80-
ELEVENLABS_API_KEY: 'test-api-key',
8172
GEMINI_API_KEY: 'test-gemini-key',
8273
});
8374
}, 'Should not throw with all required fields');
@@ -87,7 +78,6 @@ describe('Configuration', () => {
8778
const config = configSchema.parse({
8879
FISHJAM_ID: 'test-id',
8980
FISHJAM_MANAGEMENT_TOKEN: 'test-token',
90-
ELEVENLABS_API_KEY: 'test-api-key',
9181
GEMINI_API_KEY: 'test-gemini-key',
9282
});
9383

@@ -98,7 +88,6 @@ describe('Configuration', () => {
9888
const config = configSchema.parse({
9989
FISHJAM_ID: 'test-id',
10090
FISHJAM_MANAGEMENT_TOKEN: 'test-token',
101-
ELEVENLABS_API_KEY: 'test-api-key',
10291
GEMINI_API_KEY: 'test-gemini-key',
10392
PORT: '3000',
10493
});

deep-sea-stories/yarn.lock

Lines changed: 1 addition & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,6 @@ __metadata:
319319
resolution: "@deep-sea-stories/backend@workspace:packages/backend"
320320
dependencies:
321321
"@deep-sea-stories/common": "workspace:*"
322-
"@elevenlabs/elevenlabs-js": "npm:^2.20.0"
323322
"@fastify/cors": "npm:^11.1.0"
324323
"@fishjam-cloud/js-server-sdk": "npm:^0.22.0"
325324
"@google/genai": "npm:^1.30.0"
@@ -385,17 +384,6 @@ __metadata:
385384
languageName: unknown
386385
linkType: soft
387386

388-
"@elevenlabs/elevenlabs-js@npm:^2.20.0":
389-
version: 2.22.0
390-
resolution: "@elevenlabs/elevenlabs-js@npm:2.22.0"
391-
dependencies:
392-
command-exists: "npm:^1.2.9"
393-
node-fetch: "npm:^2.7.0"
394-
ws: "npm:^8.18.3"
395-
checksum: 10c0/398fcc850b8d9b1735d090fc0579138b54923ac945ec11941d3375c3733857ed37e126db289010f2de039b55f82cbff8f7596f36d049ffa728e86b85b6eb6a6b
396-
languageName: node
397-
linkType: hard
398-
399387
"@emnapi/core@npm:^1.5.0":
400388
version: 1.5.0
401389
resolution: "@emnapi/core@npm:1.5.0"
@@ -2215,13 +2203,6 @@ __metadata:
22152203
languageName: node
22162204
linkType: hard
22172205

2218-
"command-exists@npm:^1.2.9":
2219-
version: 1.2.9
2220-
resolution: "command-exists@npm:1.2.9"
2221-
checksum: 10c0/75040240062de46cd6cd43e6b3032a8b0494525c89d3962e280dde665103f8cc304a8b313a5aa541b91da2f5a9af75c5959dc3a77893a2726407a5e9a0234c16
2222-
languageName: node
2223-
linkType: hard
2224-
22252206
"commander@npm:^5.1.0":
22262207
version: 5.1.0
22272208
resolution: "commander@npm:5.1.0"
@@ -3521,20 +3502,6 @@ __metadata:
35213502
languageName: node
35223503
linkType: hard
35233504

3524-
"node-fetch@npm:^2.7.0":
3525-
version: 2.7.0
3526-
resolution: "node-fetch@npm:2.7.0"
3527-
dependencies:
3528-
whatwg-url: "npm:^5.0.0"
3529-
peerDependencies:
3530-
encoding: ^0.1.0
3531-
peerDependenciesMeta:
3532-
encoding:
3533-
optional: true
3534-
checksum: 10c0/b55786b6028208e6fbe594ccccc213cab67a72899c9234eb59dba51062a299ea853210fcf526998eaa2867b0963ad72338824450905679ff0fa304b8c5093ae8
3535-
languageName: node
3536-
linkType: hard
3537-
35383505
"node-fetch@npm:^3.3.2":
35393506
version: 3.3.2
35403507
resolution: "node-fetch@npm:3.3.2"
@@ -4312,13 +4279,6 @@ __metadata:
43124279
languageName: node
43134280
linkType: hard
43144281

4315-
"tr46@npm:~0.0.3":
4316-
version: 0.0.3
4317-
resolution: "tr46@npm:0.0.3"
4318-
checksum: 10c0/047cb209a6b60c742f05c9d3ace8fa510bff609995c129a37ace03476a9b12db4dbf975e74600830ef0796e18882b2381fb5fb1f6b4f96b832c374de3ab91a11
4319-
languageName: node
4320-
linkType: hard
4321-
43224282
"tslib@npm:^2.0.0, tslib@npm:^2.1.0, tslib@npm:^2.4.0":
43234283
version: 2.8.1
43244284
resolution: "tslib@npm:2.8.1"
@@ -4529,23 +4489,6 @@ __metadata:
45294489
languageName: node
45304490
linkType: hard
45314491

4532-
"webidl-conversions@npm:^3.0.0":
4533-
version: 3.0.1
4534-
resolution: "webidl-conversions@npm:3.0.1"
4535-
checksum: 10c0/5612d5f3e54760a797052eb4927f0ddc01383550f542ccd33d5238cfd65aeed392a45ad38364970d0a0f4fea32e1f4d231b3d8dac4a3bdd385e5cf802ae097db
4536-
languageName: node
4537-
linkType: hard
4538-
4539-
"whatwg-url@npm:^5.0.0":
4540-
version: 5.0.0
4541-
resolution: "whatwg-url@npm:5.0.0"
4542-
dependencies:
4543-
tr46: "npm:~0.0.3"
4544-
webidl-conversions: "npm:^3.0.0"
4545-
checksum: 10c0/1588bed84d10b72d5eec1d0faa0722ba1962f1821e7539c535558fb5398d223b0c50d8acab950b8c488b4ba69043fd833cc2697056b167d8ad46fac3995a55d5
4546-
languageName: node
4547-
linkType: hard
4548-
45494492
"which@npm:^2.0.1":
45504493
version: 2.0.2
45514494
resolution: "which@npm:2.0.2"
@@ -4597,7 +4540,7 @@ __metadata:
45974540
languageName: node
45984541
linkType: hard
45994542

4600-
"ws@npm:^8.18.0, ws@npm:^8.18.3":
4543+
"ws@npm:^8.18.0":
46014544
version: 8.18.3
46024545
resolution: "ws@npm:8.18.3"
46034546
peerDependencies:

0 commit comments

Comments
 (0)