Skip to content

box: Add local box run #753

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jun 4, 2025
Merged
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
30 changes: 18 additions & 12 deletions apps/app/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ CLERK_SECRET_KEY=""
CLERK_WEBHOOK_SECRET=""
RESEND_AUDIENCE_ID=""
RESEND_FROM=""
DATABASE_URL=""
RESEND_TOKEN=""
STRIPE_SECRET_KEY=""
STRIPE_WEBHOOK_SECRET=""
Expand All @@ -14,13 +13,16 @@ BETTERSTACK_URL=""
FLAGS_SECRET=""
ARCJET_KEY=""
MIXPANEL_PROJECT_TOKEN=""
SUPABASE_URL=""
SUPABASE_ANON_KEY=""
SUPABASE_SERVICE_ROLE_KEY=""

# Default values for local dev supabase
SUPABASE_URL="http://127.0.0.1:8000"
SUPABASE_ANON_KEY="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyAgCiAgICAicm9sZSI6ICJhbm9uIiwKICAgICJpc3MiOiAic3VwYWJhc2UtZGVtbyIsCiAgICAiaWF0IjogMTY0MTc2OTIwMCwKICAgICJleHAiOiAxNzk5NTM1NjAwCn0.dc_X5iR_VP_qT0zsiyj_I_OZ2T9FtRU2BBNWN8Bu4GE"
SUPABASE_SERVICE_ROLE_KEY="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyAgCiAgICAicm9sZSI6ICJzZXJ2aWNlX3JvbGUiLAogICAgImlzcyI6ICJzdXBhYmFzZS1kZW1vIiwKICAgICJpYXQiOiAxNjQxNzY5MjAwLAogICAgImV4cCI6IDE3OTk1MzU2MDAKfQ.DaYlNEoUrrEn2Ig7tqibS-PHK5vgusbcbo7X36XVt4Q"
DATABASE_URL="postgres://postgres:your-super-secret-and-long-postgres-password@127.0.0.1:5433/postgres"

# Gateway stream status URL - this will be appended with ${streamId}/status
STREAM_STATUS_ENDPOINT_URL="https://ai.livepeer.monster/live/video-to-video"
STREAM_STATUS_ENDPOINT_URL="http://127.0.0.1:5936/live/video-to-video"
STREAM_STATUS_ENDPOINT_USER="ai-gateway-livepeer"
STREAM_STATUS_ENDPOINT_PASSWORD=""
STREAM_STATUS_ENDPOINT_URL_SECONDARY="https://ai2.livepeer.monster/live/video-to-video"

# Client
Expand All @@ -37,21 +39,25 @@ NEXT_PUBLIC_WEB_URL="http://localhost:3001"
NEXT_PUBLIC_DOCS_URL="http://localhost:3004"
NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL="http://localhost:3000"
NEXT_PUBLIC_AI_WEBRTC_BASE_URL="https://mediamtx.server/aiWebrtc/"
NEXT_PUBLIC_WHIP_URL="https://ai.livepeer.monster/aiWebrtc/"
NEXT_PUBLIC_WHIP_URL="http://127.0.0.1:8889/"
NEXT_PUBLIC_AI_GATEWAY_API_BASE_URL="http://127.0.0.1:5936/"
NEXT_PUBLIC_WHIP_URL_SECONDARY="https://ai2.livepeer.monster/aiWebrtc/"
NEXT_PUBLIC_RTMP_URL="rtmp://rtmp.livepeer.monster/live/"
NEXT_PUBLIC_RTMP_URL_SECONDARY="rtmp://ai2.livepeer.monster:1936/"
NEXT_PUBLIC_LIVEPEER_STUDIO_API_KEY=""
NEXT_PUBLIC_LIVEPEER_STUDIO_API_KEY="fake-key"
NEXT_PUBLIC_LIVEPEER_STUDIO_API_URL="https://livepeer.studio.server/api"
NEXT_PUBLIC_INTERCOM_APP_ID=""
NEXT_PUBLIC_INTERCOM_APP_ID="fake-id"
NEXT_PUBLIC_SITE_PASSWORD=""
NEXT_PUBLIC_HUBSPOT_PORTAL_ID=""
NEXT_PUBLIC_HUBSPOT_FORM_ID=""
NEXT_PUBLIC_HUBSPOT_PORTAL_ID="fake-id"
NEXT_PUBLIC_HUBSPOT_FORM_ID="fake-id"
NEXT_PUBLIC_HUBSPOT_FORM_ID_CAPACITY="fake-id"
NEXT_PUBLIC_HOTJAR_ID=""
NEXT_PUBLIC_GOOGLE_ANALYTICS_ID=""
NEXT_PUBLIC_TRANSFORMED_PLAYBACK_ID=""
NEXT_PUBLIC_ORIGINAL_PLAYBACK_ID=""
NEXT_PUBLIC_MULTIPLAYER_STREAM_KEY=""

GCP_BUCKET_NAME=livepeer-clips-staging
GCP_CREDENTIALS="
GCP_CREDENTIALS=""

NEXT_PUBLIC_USE_PRIVY_MOCK="true"
2 changes: 1 addition & 1 deletion apps/app/components/welcome/featured/BentoGridOverlay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export const BentoGridOverlay = () => {
fetch(`/api/clips/user?page=0&limit=48`)
.then(res => res.json())
.then(data => {
setMyClips(data.clips);
setMyClips(data.clips ?? []);
setIsLoadingMyClips(false);
})
.catch(error => {
Expand Down
6 changes: 1 addition & 5 deletions apps/app/components/welcome/featured/MainContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,17 +80,13 @@ export const MainContent = () => {
<div className="w-full h-full flex items-center justify-center">
<Loader2 className="h-6 w-6 animate-spin text-muted-foreground" />
</div>
) : stream?.output_playback_id ? (
) : (
<>
<div className="relative w-full h-full">
<LivepeerPlayer />
</div>
{!isPlaying && <Overlay />}
</>
) : (
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed this, because I think we don't need it. In staging/prod, we never have a situation when the stream is without output_playback_id. And for the local run, it should not be required.

<div className="w-full h-full flex items-center justify-center text-muted-foreground">
Waiting for stream to start...
</div>
)}
</>
);
Expand Down
14 changes: 8 additions & 6 deletions apps/app/lib/serverEnv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const ServerEnvironmentConfig = z.object({
supabase: SupabaseConfig,
gateway: GatewayConfig,
gateway_secondary: GatewayConfig.optional(),
kafka: KafkaConfig,
kafka: KafkaConfig.optional(),
gcp: GCPConfig,
});

Expand Down Expand Up @@ -64,11 +64,13 @@ const serverOnlyEnvConfig = {
process.env.STREAM_STATUS_ENDPOINT_PASSWORD,
}
: undefined,
kafka: {
bootstrapServers: process.env.KAFKA_BOOTSTRAP_NODE,
username: process.env.KAFKA_USER,
password: process.env.KAFKA_PASSWORD,
},
kafka: process.env.KAFKA_BOOTSTRAP_NODE
? {
bootstrapServers: process.env.KAFKA_BOOTSTRAP_NODE,
username: process.env.KAFKA_USER,
password: process.env.KAFKA_PASSWORD,
}
: undefined,
gcp: {
bucketName: process.env.GCP_BUCKET_NAME,
credentials: process.env.GCP_CREDENTIALS,
Expand Down