-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
saas-migrationTrue multi-tenant SaaS migrationTrue multi-tenant SaaS migration
Milestone
Description
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_REGISTRATIONconditional 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
- Use
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: whengetTenantSlugFromHost()returnsnull(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.tsxapp/auth/register/page.tsxapp/auth/login/page.tsxproxy.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.comshows 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/dashboardredirects to login, not 404 npm run buildpasses
Depends On
Issue #92 (auth callback must handle cross-origin post-registration redirect)
Blocks
Issue #8 (E2E tests cover the signup flow)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
saas-migrationTrue multi-tenant SaaS migrationTrue multi-tenant SaaS migration