Skip to content

Commit 14e60a1

Browse files
authored
Migrate Streams API (#773)
* feat: resilient redis connection * feat: migrate some logic to fastify * feat: remove fastify * feat: refactor API structure * feat: migrate to fastify * feat: deploy fastify * feat: remove legacy api * feat: remove legacy api * feat: pull db schema * feat: try new streams api * feat: add bullmq * fix: type error * fix: reliable redis connection * feat: change API schema * feat: separate prompts endpoint * feat: update schema * feat: minor polishing * chore: remove CLI generated files
1 parent 6b7f87e commit 14e60a1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+6871
-3923
lines changed

.github/workflows/deploy.api.staging.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
echo "Setting application secrets..."
6969
flyctl secrets set --stage --app "$FLY_APP_NAME" \
7070
REDIS_URL="${{ secrets.REDIS_URL }}" \
71-
SERVER_PORT="${{ secrets.SERVER_PORT }}" \
71+
PORT="${{ secrets.PORT }}" \
7272
MAX_CHAT_MESSAGES="${{ secrets.MAX_CHAT_MESSAGES }}" \
7373
PROMPT_MIN_DURATION_SECS="${{ secrets.PROMPT_MIN_DURATION_SECS }}" \
7474
NEXT_PUBLIC_MULTIPLAYER_STREAM_KEY="${{ secrets.NEXT_PUBLIC_MULTIPLAYER_STREAM_KEY }}" \

apps/api/.dockerignore

Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
node_modules
2+
npm-debug.log*
3+
yarn-debug.log*
4+
yarn-error.log*
5+
.pnpm-debug.log*
6+
7+
# Testing
8+
coverage
9+
.nyc_output
10+
11+
# Next.js
12+
.next
13+
14+
# production
15+
build
16+
dist
17+
18+
# misc
19+
.DS_Store
20+
*.pem
21+
.env*
22+
23+
# debug
24+
.vscode/
25+
.idea/
26+
27+
# Runtime data
28+
pids
29+
*.pid
30+
*.seed
31+
*.pid.lock
32+
33+
# Coverage directory used by tools like istanbul
34+
coverage
35+
*.lcov
36+
37+
# nyc test coverage
38+
.nyc_output
39+
40+
# node-waf configuration
41+
.lock-wscript
42+
43+
# Compiled binary addons
44+
build/Release
45+
46+
# Dependency directories
47+
node_modules/
48+
jspm_packages/
49+
50+
# Optional npm cache directory
51+
.npm
52+
53+
# Optional eslint cache
54+
.eslintcache
55+
56+
# Optional REPL history
57+
.node_repl_history
58+
59+
# Output of 'npm pack'
60+
*.tgz
61+
62+
# Yarn Integrity file
63+
.yarn-integrity
64+
65+
# TypeScript cache
66+
*.tsbuildinfo
67+
68+
# Optional npm cache directory
69+
.npm
70+
71+
# Optional eslint cache
72+
.eslintcache
73+
74+
# Microbundle cache
75+
.rpt2_cache/
76+
.rts2_cache_cjs/
77+
.rts2_cache_es/
78+
.rts2_cache_umd/
79+
80+
# Optional REPL history
81+
.node_repl_history
82+
83+
# Output of 'npm pack'
84+
*.tgz
85+
86+
# Yarn Integrity file
87+
.yarn-integrity
88+
89+
# dotenv environment variables file
90+
.env
91+
.env.test
92+
.env.production
93+
94+
# parcel-bundler cache (https://parceljs.org/)
95+
.cache
96+
.parcel-cache
97+
98+
# Next.js build output
99+
.next
100+
101+
# Nuxt.js build / generate output
102+
.nuxt
103+
dist
104+
105+
# Gatsby files
106+
.cache/
107+
public
108+
109+
# Storybook build outputs
110+
.out
111+
.storybook-out
112+
113+
# Temporary folders
114+
tmp/
115+
temp/
116+
117+
# Logs
118+
logs
119+
*.log
120+
121+
# Editor directories and files
122+
.vscode/
123+
.idea
124+
*.suo
125+
*.ntvs*
126+
*.njsproj
127+
*.sln
128+
*.sw?
129+
130+
# OS generated files
131+
.DS_Store
132+
.DS_Store?
133+
._*
134+
.Spotlight-V100
135+
.Trashes
136+
ehthumbs.db
137+
Thumbs.db
138+
139+
# Test files
140+
test/
141+
*.test.ts
142+
*.test.js
143+
*.spec.ts
144+
*.spec.js
145+
146+
# Documentation
147+
README.md
148+
*.md
149+
150+
# Git
151+
.git
152+
.gitignore
153+
154+
# Docker
155+
Dockerfile*
156+
.dockerignore

apps/api/.gitignore

Lines changed: 65 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,65 @@
1-
target/
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
6+
# Runtime data
7+
pids
8+
*.pid
9+
*.seed
10+
11+
# Directory for instrumented libs generated by jscoverage/JSCover
12+
lib-cov
13+
14+
# Coverage directory used by tools like istanbul
15+
coverage
16+
17+
# nyc test coverage
18+
.nyc_output
19+
20+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
21+
.grunt
22+
23+
# node-waf configuration
24+
.lock-wscript
25+
26+
# Compiled binary addons (http://nodejs.org/api/addons.html)
27+
build/Release
28+
29+
# Dependency directories
30+
node_modules
31+
jspm_packages
32+
33+
# Optional npm cache directory
34+
.npm
35+
36+
# Optional REPL history
37+
.node_repl_history
38+
39+
# 0x
40+
profile-*
41+
42+
# mac files
43+
.DS_Store
44+
45+
# vim swap files
46+
*.swp
47+
48+
# webstorm
49+
.idea
50+
51+
# vscode
52+
.vscode
53+
*code-workspace
54+
55+
# clinic
56+
profile*
57+
*clinic*
58+
*flamegraph*
59+
60+
# generated code
61+
examples/typescript-server.js
62+
test/types/index.js
63+
64+
# compiled app
65+
dist

0 commit comments

Comments
 (0)