Skip to content

[SaaS #7] Landing page: marketing/signup page at taskflow.com root #95

@macwilling

Description

@macwilling

Overview

Create the public-facing landing page at taskflow.com (the root domain). Anyone can sign up and get their own {slug}.taskflow.com account. This is the growth surface for the SaaS.

Context

Currently app/page.tsx redirects to /dashboard (or similar). With SaaS routing, taskflow.com (no subdomain) is the marketing + signup entry point. Tenant subdomains ({slug}.taskflow.com) are the app.

Changes

app/page.tsx (root)

Create or replace with a landing page for taskflow.com. Minimum viable content:

  • Headline + brief value prop
  • "Get started free" CTA → /auth/register
  • "Log in" link → /auth/login
  • Clean, on-brand design (Geist Sans, accent color #0969da, dark mode)

This does NOT need to be a full marketing site — a clean, focused signup-first page is fine for launch.

app/auth/register/page.tsx

  • Remove any ALLOW_REGISTRATION conditional gating
  • The registration form should be fully functional for anyone visiting taskflow.com/auth/register
  • After successful registration, redirect to https://{slug}.taskflow.com/dashboard
    • Use window.location.href = \https://${slug}.${process.env.NEXT_PUBLIC_BASE_DOMAIN}/dashboard`` in the client after the server action returns the new slug

app/auth/login/page.tsx

  • This page lives on taskflow.com (the root domain, not a tenant subdomain)
  • After successful login: redirect to https://${user.app_metadata.tenant_slug}.${BASE_DOMAIN}/dashboard
  • If login happens at {slug}.taskflow.com/auth/login (e.g. direct navigation): still works — same redirect logic

What "root domain" means in middleware

  • proxy.ts: when getTenantSlugFromHost() returns null (no subdomain), allow access to /, /auth/login, /auth/register, and public static routes without auth
  • Any other path on the root domain (e.g. taskflow.com/dashboard) → redirect to login

Key Files

  • app/page.tsx
  • app/auth/register/page.tsx
  • app/auth/login/page.tsx
  • proxy.ts (root domain route handling)

Design Notes

  • Match existing design system: Tailwind + shadcn/ui, Geist Sans, dark mode from day one
  • Keep it minimal — this is a developer/consultant tool, not a consumer app
  • See GitHub's sign-in page aesthetic as a reference (clean, information-dense)

Testing

  • Visiting taskflow.com shows the landing page (not a redirect to dashboard)
  • "Get started" button navigates to registration form
  • Completing registration creates tenant and redirects to {slug}.taskflow.com/dashboard
  • Visiting taskflow.com/dashboard redirects to login, not 404
  • npm run build passes

Depends On

Issue #92 (auth callback must handle cross-origin post-registration redirect)

Blocks

Issue #8 (E2E tests cover the signup flow)

Metadata

Metadata

Assignees

No one assigned

    Labels

    saas-migrationTrue multi-tenant SaaS migration

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions