diff --git a/apps/web/Dockerfile b/apps/web/Dockerfile index 46eeb102..d1a60846 100644 --- a/apps/web/Dockerfile +++ b/apps/web/Dockerfile @@ -21,6 +21,12 @@ COPY packages/auth/ packages/auth/ ENV NODE_ENV production ENV NEXT_TELEMETRY_DISABLED 1 +# Set build-time environment variables for validation +ENV DATABASE_URL="postgresql://opencut:opencutthegoat@localhost:5432/opencut" +ENV BETTER_AUTH_SECRET="build-time-secret" +ENV UPSTASH_REDIS_REST_URL="http://localhost:8079" +ENV UPSTASH_REDIS_REST_TOKEN="example_token" +ENV NEXT_PUBLIC_BETTER_AUTH_URL="http://localhost:3000" WORKDIR /app/apps/web RUN bun run build diff --git a/apps/web/drizzle.config.ts b/apps/web/drizzle.config.ts index 87547bd0..6b7a1605 100644 --- a/apps/web/drizzle.config.ts +++ b/apps/web/drizzle.config.ts @@ -1,9 +1,8 @@ import type { Config } from "drizzle-kit"; import * as dotenv from "dotenv"; -import { env } from "@/env"; // Load the right env file based on environment -if (env.NODE_ENV === "production") { +if (process.env.NODE_ENV === "production") { dotenv.config({ path: ".env.production" }); } else { dotenv.config({ path: ".env.local" }); @@ -13,8 +12,8 @@ export default { schema: "../../packages/db/src/schema.ts", dialect: "postgresql", dbCredentials: { - url: env.DATABASE_URL, + url: process.env.DATABASE_URL!, }, out: "./migrations", - strict: env.NODE_ENV === "production", + strict: process.env.NODE_ENV === "production", } satisfies Config; diff --git a/apps/web/src/app/(auth)/login/page.tsx b/apps/web/src/app/(auth)/login/page.tsx index ec79bd7f..f28cd191 100644 --- a/apps/web/src/app/(auth)/login/page.tsx +++ b/apps/web/src/app/(auth)/login/page.tsx @@ -119,7 +119,11 @@ const LoginPage = () => { className="w-full h-11" size="lg" > - {isEmailLoading ? : "Sign in"} + {isEmailLoading ? ( + + ) : ( + "Sign in" + )} @@ -137,6 +141,6 @@ const LoginPage = () => { ); -} +}; export default memo(LoginPage); diff --git a/apps/web/src/app/(auth)/signup/page.tsx b/apps/web/src/app/(auth)/signup/page.tsx index e9705213..c3a0f899 100644 --- a/apps/web/src/app/(auth)/signup/page.tsx +++ b/apps/web/src/app/(auth)/signup/page.tsx @@ -157,6 +157,6 @@ const SignUpPage = () => { ); -} +}; export default memo(SignUpPage); diff --git a/apps/web/src/app/api/auth/[...all]/route.ts b/apps/web/src/app/api/auth/[...all]/route.ts index 393fb7e7..55510dcb 100644 --- a/apps/web/src/app/api/auth/[...all]/route.ts +++ b/apps/web/src/app/api/auth/[...all]/route.ts @@ -1,4 +1,4 @@ -import { auth } from "@opencut/auth/server"; +import { auth } from "@opencut/auth"; import { toNextJsHandler } from "better-auth/next-js"; export const { POST, GET } = toNextJsHandler(auth); \ No newline at end of file diff --git a/apps/web/src/app/api/waitlist/route.ts b/apps/web/src/app/api/waitlist/route.ts index f62e24e9..e5c9fd94 100644 --- a/apps/web/src/app/api/waitlist/route.ts +++ b/apps/web/src/app/api/waitlist/route.ts @@ -1,6 +1,5 @@ import { NextRequest, NextResponse } from "next/server"; -import { db, eq } from "@opencut/db"; -import { waitlist } from "@opencut/db/schema"; +import { db, eq, waitlist } from "@opencut/db"; import { checkBotId } from "botid/server"; import { nanoid } from "nanoid"; import { waitlistRateLimit } from "@/lib/rate-limit"; diff --git a/apps/web/src/components/editor-header.tsx b/apps/web/src/components/editor-header.tsx index c4081c75..3b51e182 100644 --- a/apps/web/src/components/editor-header.tsx +++ b/apps/web/src/components/editor-header.tsx @@ -7,6 +7,7 @@ import { useTimelineStore } from "@/stores/timeline-store"; import { HeaderBase } from "./header-base"; import { formatTimeCode } from "@/lib/time"; import { useProjectStore } from "@/stores/project-store"; +import { KeyboardShortcutsHelp } from "./keyboard-shortcuts-help"; export function EditorHeader() { const { getTotalDuration } = useTimelineStore(); @@ -43,6 +44,7 @@ export function EditorHeader() { const rightContent = (