diff --git a/backend/Dockerfile b/backend/Dockerfile
index 6e0a28e..9fc59a1 100644
--- a/backend/Dockerfile
+++ b/backend/Dockerfile
@@ -20,7 +20,8 @@ ENV PATH="/root/.local/bin:${PATH}"
FROM base AS deps
# Copy only dependency metadata first for better build caching
-COPY pyproject.toml uv.lock ./
+# NOTE: compose builds backend with repo-root context, so files live under /backend.
+COPY backend/pyproject.toml backend/uv.lock ./
# Create venv and sync deps (including runtime)
RUN uv sync --frozen --no-dev
diff --git a/frontend/Dockerfile b/frontend/Dockerfile
index 4a87dcd..fb396bf 100644
--- a/frontend/Dockerfile
+++ b/frontend/Dockerfile
@@ -28,7 +28,8 @@ ENV NODE_ENV=production
ENV NEXT_PUBLIC_API_URL=http://localhost:8000
COPY --from=builder /app/.next ./.next
-COPY --from=builder /app/public ./public
+# `public/` is optional in Next.js apps; repo may not have it.
+# Avoid failing the build when the directory is absent.
COPY --from=builder /app/package.json ./package.json
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/next.config.ts ./next.config.ts
diff --git a/frontend/cypress/e2e/clerk_login.cy.ts b/frontend/cypress/e2e/clerk_login.cy.ts
new file mode 100644
index 0000000..369213a
--- /dev/null
+++ b/frontend/cypress/e2e/clerk_login.cy.ts
@@ -0,0 +1,19 @@
+describe("Clerk login (OTP)", () => {
+ it("can sign in via Clerk modal", () => {
+ // Skip unless explicitly configured.
+ const clerkOrigin = Cypress.env("CLERK_ORIGIN");
+ const email = Cypress.env("CLERK_TEST_EMAIL");
+ const otp = Cypress.env("CLERK_TEST_OTP");
+
+ if (!clerkOrigin || !email || !otp) {
+ cy.log("Skipping: missing CYPRESS_CLERK_ORIGIN / CYPRESS_CLERK_TEST_EMAIL / CYPRESS_CLERK_TEST_OTP");
+ return;
+ }
+
+ cy.visit("/activity");
+ cy.loginWithClerkOtp();
+
+ // After login, the SignedIn UI should render.
+ cy.contains(/live feed/i, { timeout: 20_000 }).should("be.visible");
+ });
+});
diff --git a/frontend/cypress/support/commands.ts b/frontend/cypress/support/commands.ts
new file mode 100644
index 0000000..43e0a07
--- /dev/null
+++ b/frontend/cypress/support/commands.ts
@@ -0,0 +1,100 @@
+///
+
+type ClerkOtpLoginOptions = {
+ clerkOrigin: string;
+ email: string;
+ otp: string;
+};
+
+function requireEnv(name: string): string {
+ const value = Cypress.env(name) as string | undefined;
+ if (!value) {
+ throw new Error(
+ `Missing Cypress env var ${name}. ` +
+ `Set it via CYPRESS_${name}=... in CI/local before running Clerk login tests.`,
+ );
+ }
+ return value;
+}
+
+function normalizeOrigin(value: string): string {
+ try {
+ const url = new URL(value);
+ return url.origin;
+ } catch {
+ // allow providing just an origin-like string
+ return value.replace(/\/$/, "");
+ }
+}
+
+Cypress.Commands.add("loginWithClerkOtp", () => {
+ const clerkOrigin = normalizeOrigin(requireEnv("CLERK_ORIGIN"));
+ const email = requireEnv("CLERK_TEST_EMAIL");
+ const otp = requireEnv("CLERK_TEST_OTP");
+
+ const opts: ClerkOtpLoginOptions = { clerkOrigin, email, otp };
+
+ // Trigger the modal from the app first.
+ cy.get('[data-testid="activity-signin"]').click({ force: true });
+
+ // The Clerk UI is typically hosted on a different origin (clerk.accounts.dev / clerk.com).
+ // Use cy.origin to drive the UI in Chrome.
+ cy.origin(
+ opts.clerkOrigin,
+ { args: { email: opts.email, otp: opts.otp } },
+ ({ email, otp }) => {
+ // Email / identifier input
+ cy.get('input[type="email"], input[name="identifier"], input[autocomplete="email"]', {
+ timeout: 20_000,
+ })
+ .first()
+ .clear()
+ .type(email, { delay: 10 });
+
+ // Submit / continue
+ cy.get('button[type="submit"], button')
+ .contains(/continue|sign in|send|next/i)
+ .click({ force: true });
+
+ // OTP input - Clerk commonly uses autocomplete=one-time-code
+ cy.get('input[autocomplete="one-time-code"], input[name*="code"], input[inputmode="numeric"]', {
+ timeout: 20_000,
+ })
+ .first()
+ .clear()
+ .type(otp, { delay: 10 });
+
+ // Final submit (some flows auto-submit)
+ cy.get("body").then(($body) => {
+ const hasSubmit = $body
+ .find('button[type="submit"], button')
+ .toArray()
+ .some((el) => /verify|continue|sign in|confirm/i.test(el.textContent || ""));
+ if (hasSubmit) {
+ cy.get('button[type="submit"], button')
+ .contains(/verify|continue|sign in|confirm/i)
+ .click({ force: true });
+ }
+ });
+ },
+ );
+});
+
+declare global {
+ // eslint-disable-next-line @typescript-eslint/no-namespace
+ namespace Cypress {
+ interface Chainable {
+ /**
+ * Logs in via the real Clerk modal using deterministic OTP credentials.
+ *
+ * Requires env vars:
+ * - CYPRESS_CLERK_ORIGIN (e.g. https://.clerk.accounts.dev)
+ * - CYPRESS_CLERK_TEST_EMAIL
+ * - CYPRESS_CLERK_TEST_OTP
+ */
+ loginWithClerkOtp(): Chainable;
+ }
+ }
+}
+
+export {};
diff --git a/frontend/cypress/support/e2e.ts b/frontend/cypress/support/e2e.ts
index 818758d..8c97169 100644
--- a/frontend/cypress/support/e2e.ts
+++ b/frontend/cypress/support/e2e.ts
@@ -1,2 +1,4 @@
// Cypress support file.
// Place global hooks/commands here.
+
+import "./commands";
diff --git a/frontend/src/app/activity/page.tsx b/frontend/src/app/activity/page.tsx
index b038db4..a44a7ed 100644
--- a/frontend/src/app/activity/page.tsx
+++ b/frontend/src/app/activity/page.tsx
@@ -302,7 +302,9 @@ export default function ActivityPage() {
forceRedirectUrl="/activity"
signUpForceRedirectUrl="/activity"
>
-
+