Skip to content

Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.

⚡️ Apply vercel-doctor fixes: parallel awaits, unoptimized SVG icons, dead files (#3263)

Luke Vella8656f0e911a1
diff --git a/apps/web/biome.json b/apps/web/biome.json
index 0b056f36e..f8fd43b7b 100644
--- a/apps/web/biome.json
+++ b/apps/web/biome.json
@@ -17,7 +17,8 @@
"@/lib/posthog": {
"message": "User-attributed analytics events must go through track() from @/lib/posthog so guest person-profile handling cannot be forgotten at capture sites. The raw client is reserved for non-capture APIs (feature flags, identity merge) in allowlisted files (see overrides in apps/web/biome.json).",
"importNames": ["posthog"]
- }
+ },
+ "next/link": "Import { Link } from \"@/components/link\" instead: it defaults prefetch to false so viewport prefetches do not bill a server render per visible link. Sidebar nav uses HoverPrefetchLink."
},
"patterns": [
{
@@ -50,7 +51,8 @@
"@/lib/posthog": {
"message": "User-attributed analytics events must go through track() from @/lib/posthog so guest person-profile handling cannot be forgotten at capture sites. The raw client is reserved for non-capture APIs (feature flags, identity merge) in allowlisted files (see overrides in apps/web/biome.json).",
"importNames": ["posthog"]
- }
+ },
+ "next/link": "Import { Link } from \"@/components/link\" instead: it defaults prefetch to false so viewport prefetches do not bill a server render per visible link. Sidebar nav uses HoverPrefetchLink."
},
"patterns": [
{
@@ -87,7 +89,8 @@
"@/lib/posthog": {
"message": "User-attributed analytics events must go through track() from @/lib/posthog so guest person-profile handling cannot be forgotten at capture sites. The raw client is reserved for non-capture APIs (feature flags, identity merge) in allowlisted files (see overrides in apps/web/biome.json).",
"importNames": ["posthog"]
- }
+ },
+ "next/link": "Import { Link } from \"@/components/link\" instead: it defaults prefetch to false so viewport prefetches do not bill a server render per visible link. Sidebar nav uses HoverPrefetchLink."
},
"patterns": [
{
@@ -124,12 +127,13 @@
"@/lib/posthog": {
"message": "User-attributed analytics events must go through track() from @/lib/posthog so guest person-profile handling cannot be forgotten at capture sites. The raw client is reserved for non-capture APIs (feature flags, identity merge) in allowlisted files (see overrides in apps/web/biome.json).",
"importNames": ["posthog"]
- }
+ },
+ "next/link": "Import { Link } from \"@/components/link\" instead: it defaults prefetch to false so viewport prefetches do not bill a server render per visible link. Sidebar nav uses HoverPrefetchLink."
},
"patterns": [
{
"group": ["@/features/**/data"],
- "message": "Pages, layouts and route components read through feature loaders (features/<domain>/loaders.ts), never data.ts directly — the loader owns the session gate that proves scope. Existing violations are on the migration allowlist (see overrides in apps/web/biome.json)."
+ "message": "Pages, layouts and route components read through feature loaders (features/<domain>/loaders.ts), never data.ts directly \u2014 the loader owns the session gate that proves scope. Existing violations are on the migration allowlist (see overrides in apps/web/biome.json)."
},
{
"group": ["@/utils", "@/utils/**"],
@@ -161,7 +165,8 @@
"@/lib/posthog": {
"message": "User-attributed analytics events must go through track() from @/lib/posthog so guest person-profile handling cannot be forgotten at capture sites. The raw client is reserved for non-capture APIs (feature flags, identity merge) in allowlisted files (see overrides in apps/web/biome.json).",
"importNames": ["posthog"]
- }
+ },
+ "next/link": "Import { Link } from \"@/components/link\" instead: it defaults prefetch to false so viewport prefetches do not bill a server render per visible link. Sidebar nav uses HoverPrefetchLink."
},
"patterns": [
{
@@ -199,7 +204,8 @@
"@/lib/posthog": {
"message": "User-attributed analytics events must go through track() from @/lib/posthog so guest person-profile handling cannot be forgotten at capture sites. The raw client is reserved for non-capture APIs (feature flags, identity merge) in allowlisted files (see overrides in apps/web/biome.json).",
"importNames": ["posthog"]
- }
+ },
+ "next/link": "Import { Link } from \"@/components/link\" instead: it defaults prefetch to false so viewport prefetches do not bill a server render per visible link. Sidebar nav uses HoverPrefetchLink."
},
"patterns": [
{
@@ -232,7 +238,8 @@
"@/lib/posthog": {
"message": "User-attributed analytics events must go through track() from @/lib/posthog so guest person-profile handling cannot be forgotten at capture sites. The raw client is reserved for non-capture APIs (feature flags, identity merge) in allowlisted files (see overrides in apps/web/biome.json).",
"importNames": ["posthog"]
- }
+ },
+ "next/link": "Import { Link } from \"@/components/link\" instead: it defaults prefetch to false so viewport prefetches do not bill a server render per visible link. Sidebar nav uses HoverPrefetchLink."
},
"patterns": [
{
@@ -268,7 +275,8 @@
"@/lib/posthog": {
"message": "User-attributed analytics events must go through track() from @/lib/posthog so guest person-profile handling cannot be forgotten at capture sites. The raw client is reserved for non-capture APIs (feature flags, identity merge) in allowlisted files (see overrides in apps/web/biome.json).",
"importNames": ["posthog"]
- }
+ },
+ "next/link": "Import { Link } from \"@/components/link\" instead: it defaults prefetch to false so viewport prefetches do not bill a server render per visible link. Sidebar nav uses HoverPrefetchLink."
},
"patterns": [
{
@@ -314,7 +322,8 @@
"@/lib/posthog": {
"message": "User-attributed analytics events must go through track() from @/lib/posthog so guest person-profile handling cannot be forgotten at capture sites. The raw client is reserved for non-capture APIs (feature flags, identity merge) in allowlisted files (see overrides in apps/web/biome.json).",
"importNames": ["posthog"]
- }
+ },
+ "next/link": "Import { Link } from \"@/components/link\" instead: it defaults prefetch to false so viewport prefetches do not bill a server render per visible link. Sidebar nav uses HoverPrefetchLink."
},
"patterns": [
{
@@ -371,7 +380,8 @@
"@/lib/posthog": {
"message": "User-attributed analytics events must go through track() from @/lib/posthog so guest person-profile handling cannot be forgotten at capture sites. The raw client is reserved for non-capture APIs (feature flags, identity merge) in allowlisted files (see overrides in apps/web/biome.json).",
"importNames": ["posthog"]
- }
+ },
+ "next/link": "Import { Link } from \"@/components/link\" instead: it defaults prefetch to false so viewport prefetches do not bill a server render per visible link. Sidebar nav uses HoverPrefetchLink."
},
"patterns": [
{
@@ -403,7 +413,8 @@
"@/lib/posthog": {
"message": "User-attributed analytics events must go through track() from @/lib/posthog so guest person-profile handling cannot be forgotten at capture sites. The raw client is reserved for non-capture APIs (feature flags, identity merge) in allowlisted files (see overrides in apps/web/biome.json).",
"importNames": ["posthog"]
- }
+ },
+ "next/link": "Import { Link } from \"@/components/link\" instead: it defaults prefetch to false so viewport prefetches do not bill a server render per visible link. Sidebar nav uses HoverPrefetchLink."
},
"patterns": [
{
@@ -445,7 +456,8 @@
"@/lib/posthog": {
"message": "User-attributed analytics events must go through track() from @/lib/posthog so guest person-profile handling cannot be forgotten at capture sites. The raw client is reserved for non-capture APIs (feature flags, identity merge) in allowlisted files (see overrides in apps/web/biome.json).",
"importNames": ["posthog"]
- }
+ },
+ "next/link": "Import { Link } from \"@/components/link\" instead: it defaults prefetch to false so viewport prefetches do not bill a server render per visible link. Sidebar nav uses HoverPrefetchLink."
},
"patterns": [
{
@@ -483,7 +495,8 @@
"@/lib/posthog": {
"message": "User-attributed analytics events must go through track() from @/lib/posthog so guest person-profile handling cannot be forgotten at capture sites. The raw client is reserved for non-capture APIs (feature flags, identity merge) in allowlisted files (see overrides in apps/web/biome.json).",
"importNames": ["posthog"]
- }
+ },
+ "next/link": "Import { Link } from \"@/components/link\" instead: it defaults prefetch to false so viewport prefetches do not bill a server render per visible link. Sidebar nav uses HoverPrefetchLink."
}
}
}
@@ -505,7 +518,8 @@
"options": {
"paths": {
"dayjs": "Use the formatters in `@/lib/datetime` for display. dayjs is only allowed in files on the migration allowlist (see overrides in biome.json).",
- "@/lib/dayjs": "Use the formatters in `@/lib/datetime` for display. dayjs is only allowed in files on the migration allowlist (see overrides in biome.json)."
+ "@/lib/dayjs": "Use the formatters in `@/lib/datetime` for display. dayjs is only allowed in files on the migration allowlist (see overrides in biome.json).",
+ "next/link": "Import { Link } from \"@/components/link\" instead: it defaults prefetch to false so viewport prefetches do not bill a server render per visible link. Sidebar nav uses HoverPrefetchLink."
},
"patterns": [
{
@@ -563,6 +577,46 @@
}
}
}
+ },
+ {
+ "includes": [
+ "src/components/link.tsx",
+ "src/components/hover-prefetch-link.tsx"
+ ],
+ "linter": {
+ "rules": {
+ "style": {
+ "noRestrictedImports": {
+ "level": "error",
+ "options": {
+ "paths": {
+ "dayjs": "Use the formatters in `@/lib/datetime` for display. dayjs is only allowed in files on the migration allowlist (see overrides in biome.json).",
+ "@/lib/dayjs": "Use the formatters in `@/lib/datetime` for display. dayjs is only allowed in files on the migration allowlist (see overrides in biome.json).",
+ "@rallly/database": "Database access is confined to the DAL: only features/**/data.ts and features/**/mutations.ts may import @rallly/database. Existing violations are on the migration allowlist (see overrides in apps/web/biome.json).",
+ "@/lib/posthog": {
+ "message": "User-attributed analytics events must go through track() from @/lib/posthog so guest person-profile handling cannot be forgotten at capture sites. The raw client is reserved for non-capture APIs (feature flags, identity merge) in allowlisted files (see overrides in apps/web/biome.json).",
+ "importNames": ["posthog"]
+ }
+ },
+ "patterns": [
+ {
+ "group": ["@/features/**"],
+ "message": "components/ is domain-agnostic UI and must not depend on features/. Move domain components into features/<domain>/components/. Existing violations are on the migration allowlist (see overrides in apps/web/biome.json)."
+ },
+ {
+ "group": ["@/app", "@/app/**"],
+ "message": "Only files inside app/ may import from app/. Routes are thin adapters; shared code belongs in features/, components/, or lib/."
+ },
+ {
+ "group": ["@/utils", "@/utils/**"],
+ "message": "src/utils is dissolved. Generic helpers live in @/lib/utils, infrastructure in @/lib, domain code in the owning feature."
+ }
+ ]
+ }
+ }
+ }
+ }
+ }
}
]
}
diff --git a/apps/web/src/app/[locale]/(auth)/components/link-with-redirect-to.tsx b/apps/web/src/app/[locale]/(auth)/components/link-with-redirect-to.tsx
index 64d855c31..0a3653f7b 100644
--- a/apps/web/src/app/[locale]/(auth)/components/link-with-redirect-to.tsx
+++ b/apps/web/src/app/[locale]/(auth)/components/link-with-redirect-to.tsx
@@ -1,7 +1,7 @@
"use client";
-import Link from "next/link";
import { useSearchParams } from "next/navigation";
+import { Link } from "@/components/link";
import { validateRedirectUrl } from "@/lib/utils/redirect";
export function LinkWithRedirectTo({
diff --git a/apps/web/src/app/[locale]/(auth)/login/components/login-email-form.tsx b/apps/web/src/app/[locale]/(auth)/login/components/login-email-form.tsx
index 7dc60dd8b..b668a03b1 100644
--- a/apps/web/src/app/[locale]/(auth)/login/components/login-email-form.tsx
+++ b/apps/web/src/app/[locale]/(auth)/login/components/login-email-form.tsx
@@ -11,13 +11,12 @@ import {
FormMessage,
} from "@rallly/ui/form";
import { Input } from "@rallly/ui/input";
-import Link from "next/link";
import { useRouter, useSearchParams } from "next/navigation";
import React from "react";
import { useForm } from "react-hook-form";
import * as z from "zod";
-
import { setVerificationEmail } from "@/app/[locale]/(auth)/login/actions";
+import { Link } from "@/components/link";
import { Turnstile } from "@/components/turnstile";
import { Trans, useTranslation } from "@/i18n/client";
import { authClient } from "@/lib/auth-client";
diff --git a/apps/web/src/app/[locale]/(optional-space)/new/page.tsx b/apps/web/src/app/[locale]/(optional-space)/new/page.tsx
index 971aeba2e..57863f7c6 100644
--- a/apps/web/src/app/[locale]/(optional-space)/new/page.tsx
+++ b/apps/web/src/app/[locale]/(optional-space)/new/page.tsx
@@ -8,8 +8,8 @@ import {
} from "@rallly/ui/breadcrumb";
import { BarChart2Icon } from "lucide-react";
import type { Metadata } from "next";
-import Link from "next/link";
import { redirect } from "next/navigation";
+import { Link } from "@/components/link";
import { BrandStyle } from "@/features/branding/components/brand-style";
import { loadInstancePolicy } from "@/features/instance-policy/loaders";
import { CreatePoll } from "@/features/poll/components/create-poll";
diff --git a/apps/web/src/app/[locale]/(optional-space)/poll/[urlId]/edit-details/page.tsx b/apps/web/src/app/[locale]/(optional-space)/poll/[urlId]/edit-details/page.tsx
index cfc3fd7de..7f7849080 100644
--- a/apps/web/src/app/[locale]/(optional-space)/poll/[urlId]/edit-details/page.tsx
+++ b/apps/web/src/app/[locale]/(optional-space)/poll/[urlId]/edit-details/page.tsx
@@ -10,9 +10,9 @@ import {
CardTitle,
} from "@rallly/ui/card";
import { Form } from "@rallly/ui/form";
-import Link from "next/link";
import { useRouter } from "next/navigation";
import { useForm } from "react-hook-form";
+import { Link } from "@/components/link";
import { PollDetailsForm } from "@/features/poll/components/forms/poll-details-form";
import { useUpdatePollMutation } from "@/features/poll/components/mutations";
import { usePoll } from "@/features/poll/components/poll-context";
diff --git a/apps/web/src/app/[locale]/(optional-space)/poll/[urlId]/edit-options/page.tsx b/apps/web/src/app/[locale]/(optional-space)/poll/[urlId]/edit-options/page.tsx
index 18cbd01fb..2a32598e4 100644
--- a/apps/web/src/app/[locale]/(optional-space)/poll/[urlId]/edit-options/page.tsx
+++ b/apps/web/src/app/[locale]/(optional-space)/poll/[urlId]/edit-options/page.tsx
@@ -3,9 +3,9 @@ import { buttonVariants } from "@rallly/ui";
import { Button } from "@rallly/ui/button";
import { CardFooter } from "@rallly/ui/card";
import { Form } from "@rallly/ui/form";
-import Link from "next/link";
import { useRouter } from "next/navigation";
import { useForm } from "react-hook-form";
+import { Link } from "@/components/link";
import { useModalContext } from "@/components/modal/modal-provider";
import PollOptionsForm from "@/features/poll/components/forms/poll-options-form/poll-options-form";
import { useUpdatePollMutation } from "@/features/poll/components/mutations";
diff --git a/apps/web/src/app/[locale]/(optional-space)/poll/[urlId]/edit-settings/page.tsx b/apps/web/src/app/[locale]/(optional-space)/poll/[urlId]/edit-settings/page.tsx
index caa47a8ac..5a0414099 100644
--- a/apps/web/src/app/[locale]/(optional-space)/poll/[urlId]/edit-settings/page.tsx
+++ b/apps/web/src/app/[locale]/(optional-space)/poll/[urlId]/edit-settings/page.tsx
@@ -3,9 +3,9 @@ import { buttonVariants } from "@rallly/ui";
import { Button } from "@rallly/ui/button";
import { CardFooter } from "@rallly/ui/card";
import { Form } from "@rallly/ui/form";
-import Link from "next/link";
import { useRouter } from "next/navigation";
import { useForm } from "react-hook-form";
+import { Link } from "@/components/link";
import { usePoll } from "@/features/poll/client";
import { PollSettingsForm } from "@/features/poll/components/forms/poll-settings";
import { useUpdatePollMutation } from "@/features/poll/components/mutations";
diff --git a/apps/web/src/app/[locale]/(space)/(dashboard)/components/control-panel-menu-item.tsx b/apps/web/src/app/[locale]/(space)/(dashboard)/components/control-panel-menu-item.tsx
index 4229a20df..5bce4706c 100644
--- a/apps/web/src/app/[locale]/(space)/(dashboard)/components/control-panel-menu-item.tsx
+++ b/apps/web/src/app/[locale]/(space)/(dashboard)/components/control-panel-menu-item.tsx
@@ -2,7 +2,7 @@
import { SidebarMenuButton, SidebarMenuItem } from "@rallly/ui/sidebar";
import { GaugeIcon } from "lucide-react";
-import Link from "next/link";
+import { HoverPrefetchLink } from "@/components/hover-prefetch-link";
import { useUser } from "@/features/user/client";
import { Trans } from "@/i18n/client";
@@ -15,7 +15,7 @@ export function ControlPanelMenuItem() {
return (
<SidebarMenuItem>
- <SidebarMenuButton render={<Link href="/control-panel" />}>
+ <SidebarMenuButton render={<HoverPrefetchLink href="/control-panel" />}>
<GaugeIcon />
<Trans i18nKey="controlPanel" defaults="Control Panel" />
</SidebarMenuButton>
diff --git a/apps/web/src/app/[locale]/(space)/(dashboard)/layout.tsx b/apps/web/src/app/[locale]/(space)/(dashboard)/layout.tsx
index dc1ec783d..1cdb4097d 100644
--- a/apps/web/src/app/[locale]/(space)/(dashboard)/layout.tsx
+++ b/apps/web/src/app/[locale]/(space)/(dashboard)/layout.tsx
@@ -12,7 +12,7 @@ import {
SidebarSeparator,
} from "@rallly/ui/sidebar";
import { SettingsIcon } from "lucide-react";
-import Link from "next/link";
+import { HoverPrefetchLink } from "@/components/hover-prefetch-link";
import { LicenseLimitWarning } from "@/features/licensing/components/license-limit-warning";
import { CommandMenu } from "@/features/navigation/components/command-menu";
import { SpaceDropdown } from "@/features/space/components/space-dropdown";
@@ -62,7 +62,9 @@ export default async function Layout({
</IfFeatureEnabled>
<ControlPanelMenuItem />
<SidebarMenuItem>
- <SidebarMenuButton render={<Link href="/settings/profile" />}>
+ <SidebarMenuButton
+ render={<HoverPrefetchLink href="/settings/profile" />}
+ >
<SettingsIcon />
<Trans i18nKey="settings" defaults="Settings" />
</SidebarMenuButton>
diff --git a/apps/web/src/app/[locale]/(space)/(dashboard)/members/members-page.tsx b/apps/web/src/app/[locale]/(space)/(dashboard)/members/members-page.tsx
index fc4e3abda..806b21995 100644
--- a/apps/web/src/app/[locale]/(space)/(dashboard)/members/members-page.tsx
+++ b/apps/web/src/app/[locale]/(space)/(dashboard)/members/members-page.tsx
@@ -7,7 +7,7 @@ import {
} from "@rallly/ui/alert";
import { Badge } from "@rallly/ui/badge";
import { InfoIcon, SparklesIcon } from "lucide-react";
-import Link from "next/link";
+import { Link } from "@/components/link";
import { OptimizedAvatarImage } from "@/components/optimized-avatar-image";
import { PageHeaderActions } from "@/components/page-layout";
import { StackedList, StackedListItem } from "@/components/stacked-list";
diff --git a/apps/web/src/app/[locale]/(space)/(dashboard)/password-setup-alert.tsx b/apps/web/src/app/[locale]/(space)/(dashboard)/password-setup-alert.tsx
index f13dc8ce0..0fc8b3713 100644
--- a/apps/web/src/app/[locale]/(space)/(dashboard)/password-setup-alert.tsx
+++ b/apps/web/src/app/[locale]/(space)/(dashboard)/password-setup-alert.tsx
@@ -11,8 +11,8 @@ import { KeyRoundIcon } from "lucide-react";
import { AnimatePresence } from "motion/react";
import * as m from "motion/react-m";
import dynamic from "next/dynamic";
-import Link from "next/link";
import { useLocalStorage } from "react-use";
+import { Link } from "@/components/link";
import { Trans } from "@/i18n/client";
export const PasswordSetupAlert = dynamic(
diff --git a/apps/web/src/app/[locale]/(space)/(dashboard)/polls/[pollId]/layout.tsx b/apps/web/src/app/[locale]/(space)/(dashboard)/polls/[pollId]/layout.tsx
index 6e3686866..53f8dfeff 100644
--- a/apps/web/src/app/[locale]/(space)/(dashboard)/polls/[pollId]/layout.tsx
+++ b/apps/web/src/app/[locale]/(space)/(dashboard)/polls/[pollId]/layout.tsx
@@ -1,9 +1,9 @@
import { buttonVariants } from "@rallly/ui";
import { Skeleton } from "@rallly/ui/skeleton";
import { ArrowLeftIcon } from "lucide-react";
-import Link from "next/link";
import { notFound } from "next/navigation";
import { Suspense } from "react";
+import { Link } from "@/components/link";
import {
PageContainer,
PageContent,
diff --git a/apps/web/src/app/[locale]/(space)/(dashboard)/polls/[pollId]/poll-shell-tabs.tsx b/apps/web/src/app/[locale]/(space)/(dashboard)/polls/[pollId]/poll-shell-tabs.tsx
index 1290b7c95..72dcaef53 100644
--- a/apps/web/src/app/[locale]/(space)/(dashboard)/polls/[pollId]/poll-shell-tabs.tsx
+++ b/apps/web/src/app/[locale]/(space)/(dashboard)/polls/[pollId]/poll-shell-tabs.tsx
@@ -1,8 +1,8 @@
"use client";
import { cn } from "@rallly/ui";
-import Link from "next/link";
import { usePathname } from "next/navigation";
+import { Link } from "@/components/link";
import { Trans } from "@/i18n/client";
export function PollShellTabs() {
diff --git a/apps/web/src/app/[locale]/(space)/(dashboard)/polls/polls-page.tsx b/apps/web/src/app/[locale]/(space)/(dashboard)/polls/polls-page.tsx
index e87368c4a..b9fe52485 100644
--- a/apps/web/src/app/[locale]/(space)/(dashboard)/polls/polls-page.tsx
+++ b/apps/web/src/app/[locale]/(space)/(dashboard)/polls/polls-page.tsx
@@ -2,7 +2,6 @@
import { buttonVariants } from "@rallly/ui";
import { CircleStopIcon, InboxIcon, PlusIcon } from "lucide-react";
-import Link from "next/link";
import { useSearchParams } from "next/navigation";
import {
EmptyState,
@@ -11,6 +10,7 @@ import {
EmptyStateIcon,
EmptyStateTitle,
} from "@/components/empty-state";
+import { Link } from "@/components/link";
import { MemberSelector } from "@/components/member-selector";
import {
PageContainer,
diff --git a/apps/web/src/app/[locale]/(space)/settings/api-keys/components/api-usage-limits.tsx b/apps/web/src/app/[locale]/(space)/settings/api-keys/components/api-usage-limits.tsx
index 440c906db..578c7442c 100644
--- a/apps/web/src/app/[locale]/(space)/settings/api-keys/components/api-usage-limits.tsx
+++ b/apps/web/src/app/[locale]/(space)/settings/api-keys/components/api-usage-limits.tsx
@@ -1,7 +1,7 @@
"use client";
import { ArrowUpRightIcon } from "lucide-react";
-import Link from "next/link";
+import { Link } from "@/components/link";
import {
API_RATE_LIMIT_PER_DAY,
API_RATE_LIMIT_PER_MINUTE,
diff --git a/apps/web/src/app/[locale]/(space)/settings/calendars/components/connect-calendar-dropdown.tsx b/apps/web/src/app/[locale]/(space)/settings/calendars/components/connect-calendar-dropdown.tsx
index 69d951427..11d4f5945 100644
--- a/apps/web/src/app/[locale]/(space)/settings/calendars/components/connect-calendar-dropdown.tsx
+++ b/apps/web/src/app/[locale]/(space)/settings/calendars/components/connect-calendar-dropdown.tsx
@@ -32,6 +32,7 @@ export function ConnectCalendarDropdown() {
width={16}
height={16}
alt="Google Calendar"
+ unoptimized
/>
<Trans i18nKey="connectGoogleCalendar" defaults="Google Calendar" />
</DropdownMenuItem>
@@ -45,6 +46,7 @@ export function ConnectCalendarDropdown() {
width={16}
height={16}
alt="Microsoft Calendar"
+ unoptimized
/>
<Trans
i18nKey="connectMicrosoftCalendar"
diff --git a/apps/web/src/app/[locale]/(space)/settings/layout.tsx b/apps/web/src/app/[locale]/(space)/settings/layout.tsx
index a8d3548db..70c0823a5 100644
--- a/apps/web/src/app/[locale]/(space)/settings/layout.tsx
+++ b/apps/web/src/app/[locale]/(space)/settings/layout.tsx
@@ -15,8 +15,8 @@ import {
SidebarTrigger,
} from "@rallly/ui/sidebar";
import { ArrowLeftIcon, SettingsIcon } from "lucide-react";
-import Link from "next/link";
import type React from "react";
+import { HoverPrefetchLink } from "@/components/hover-prefetch-link";
import { NavUser } from "@/features/user/components/nav-user";
import { Trans } from "@/i18n/client";
import {
@@ -34,7 +34,7 @@ export default function Layout({ children }: { children?: React.ReactNode }) {
<SidebarGroupContent>
<SidebarMenu>
<SidebarMenuItem className="flex items-center gap-3">
- <Link
+ <HoverPrefetchLink
href="/"
className={buttonVariants({
variant: "ghost",
@@ -45,7 +45,7 @@ export default function Layout({ children }: { children?: React.ReactNode }) {
<span className="sr-only">
<Trans i18nKey="back" defaults="Back" />
</span>
- </Link>
+ </HoverPrefetchLink>
<span className="font-medium text-sm">
<Trans i18nKey="settings" defaults="Settings" />
</span>
diff --git a/apps/web/src/app/[locale]/accept-invite/[inviteId]/page.tsx b/apps/web/src/app/[locale]/accept-invite/[inviteId]/page.tsx
index 594037964..45884ca00 100644
--- a/apps/web/src/app/[locale]/accept-invite/[inviteId]/page.tsx
+++ b/apps/web/src/app/[locale]/accept-invite/[inviteId]/page.tsx
@@ -16,29 +16,30 @@ export default async function JoinPage({
params: Promise<{ inviteId: string }>;
}) {
const { inviteId } = await params;
- const user = await requireUser();
-
- const invite = await prisma.spaceMemberInvite.findUnique({
- where: {
- id: inviteId,
- },
- select: {
- spaceId: true,
- email: true,
- role: true,
- invitedBy: {
- select: {
- name: true,
- },
+ const [user, invite] = await Promise.all([
+ requireUser(),
+ prisma.spaceMemberInvite.findUnique({
+ where: {
+ id: inviteId,
},
- space: {
- select: {
- name: true,
- image: true,
+ select: {
+ spaceId: true,
+ email: true,
+ role: true,
+ invitedBy: {
+ select: {
+ name: true,
+ },
+ },
+ space: {
+ select: {
+ name: true,
+ image: true,
+ },
},
},
- },
- });
+ }),
+ ]);
if (!invite) {
notFound();
@@ -114,20 +115,22 @@ export async function generateMetadata({
params: Promise<{ inviteId: string }>;
}) {
const { inviteId } = await params;
- const { t } = await getTranslation();
- const invite = await prisma.spaceMemberInvite.findUnique({
- where: {
- id: inviteId,
- },
- select: {
- spaceId: true,
- space: {
- select: {
- name: true,
+ const [{ t }, invite] = await Promise.all([
+ getTranslation(),
+ prisma.spaceMemberInvite.findUnique({
+ where: {
+ id: inviteId,
+ },
+ select: {
+ spaceId: true,
+ space: {
+ select: {
+ name: true,
+ },
},
},
- },
- });
+ }),
+ ]);
if (!invite) {
notFound();
diff --git a/apps/web/src/app/[locale]/admin-setup/page.tsx b/apps/web/src/app/[locale]/admin-setup/page.tsx
index 4ba19f70e..4f644e9b9 100644
--- a/apps/web/src/app/[locale]/admin-setup/page.tsx
+++ b/apps/web/src/app/[locale]/admin-setup/page.tsx
@@ -1,7 +1,6 @@
import { buttonVariants } from "@rallly/ui";
import { CrownIcon, LockIcon } from "lucide-react";
import type { Metadata } from "next";
-import Link from "next/link";
import { redirect } from "next/navigation";
import {
EmptyState,
@@ -11,6 +10,7 @@ import {
EmptyStateTitle,
} from "@/components/empty-state";
import { IfCloudHosted, IfSelfHosted } from "@/components/environment";
+import { Link } from "@/components/link";
import { isInitialAdmin } from "@/features/instance-settings/utils";
import { getCurrentUser } from "@/features/user/loaders";
import { Trans } from "@/i18n/client";
diff --git a/apps/web/src/app/[locale]/control-panel/nav-item.tsx b/apps/web/src/app/[locale]/control-panel/nav-item.tsx
index 45508831d..b8b678326 100644
--- a/apps/web/src/app/[locale]/control-panel/nav-item.tsx
+++ b/apps/web/src/app/[locale]/control-panel/nav-item.tsx
@@ -1,8 +1,8 @@
"use client";
import { SidebarMenuButton, SidebarMenuItem } from "@rallly/ui/sidebar";
-import Link from "next/link";
import { usePathname } from "next/navigation";
+import { Link } from "@/components/link";
export function NavItem({
href,
diff --git a/apps/web/src/app/[locale]/control-panel/page.tsx b/apps/web/src/app/[locale]/control-panel/page.tsx
index ff3567f26..d02a13fb3 100644
--- a/apps/web/src/app/[locale]/control-panel/page.tsx
+++ b/apps/web/src/app/[locale]/control-panel/page.tsx
@@ -8,7 +8,7 @@ import {
UsersIcon,
} from "lucide-react";
import type { Metadata } from "next";
-import Link from "next/link";
+import { Link } from "@/components/link";
import { PageIcon } from "@/components/page-icons";
import {
SettingsPage,
diff --git a/apps/web/src/app/[locale]/e/[id]/components/user-dropdown.tsx b/apps/web/src/app/[locale]/e/[id]/components/user-dropdown.tsx
index 0fc3668d6..7be02a605 100644
--- a/apps/web/src/app/[locale]/e/[id]/components/user-dropdown.tsx
+++ b/apps/web/src/app/[locale]/e/[id]/components/user-dropdown.tsx
@@ -11,8 +11,8 @@ import {
DropdownMenuTrigger,
} from "@rallly/ui/dropdown-menu";
import { LogOutIcon, Settings2Icon, UserIcon } from "lucide-react";
-import Link from "next/link";
import { useRouter } from "next/navigation";
+import { Link } from "@/components/link";
import { OptimizedAvatarImage } from "@/components/optimized-avatar-image";
import { Trans, useTranslation } from "@/i18n/client";
import { signOut } from "@/lib/auth-client";
diff --git a/apps/web/src/app/[locale]/e/[id]/page.tsx b/apps/web/src/app/[locale]/e/[id]/page.tsx
index 684406b4c..109c1fee7 100644
--- a/apps/web/src/app/[locale]/e/[id]/page.tsx
+++ b/apps/web/src/app/[locale]/e/[id]/page.tsx
@@ -4,12 +4,12 @@ import { MarkdownDescription } from "@rallly/ui/markdown-description";
import { absoluteUrl } from "@rallly/utils/absolute-url";
import { MapPinIcon } from "lucide-react";
import type { Metadata } from "next";
-import Link from "next/link";
import { notFound } from "next/navigation";
import { cache } from "react";
import { SpaceBranding } from "@/app/[locale]/e/[id]/components/space-branding";
import { UserDropdown } from "@/app/[locale]/e/[id]/components/user-dropdown";
import LogoMarkGray from "@/assets/logo-mark-gray.svg";
+import { Link } from "@/components/link";
import { OptimizedAvatarImage } from "@/components/optimized-avatar-image";
import { SessionRefresher } from "@/components/session-refresher";
import { BrandStyle } from "@/features/branding/components/brand-style";
@@ -99,9 +99,9 @@ export default async function EventPage({
? branding.primaryColor
: null;
- const session = await getSession();
- const { t } = await getTranslation();
- const [locale, deviceDateTimeConfig] = await Promise.all([
+ const [session, { t }, locale, deviceDateTimeConfig] = await Promise.all([
+ getSession(),
+ getTranslation(),
getLocale(),
getDeviceDateTimeConfig(),
]);
diff --git a/apps/web/src/app/[locale]/error.tsx b/apps/web/src/app/[locale]/error.tsx
index 5b8923d08..480255987 100644
--- a/apps/web/src/app/[locale]/error.tsx
+++ b/apps/web/src/app/[locale]/error.tsx
@@ -4,10 +4,10 @@ import { buttonVariants } from "@rallly/ui";
import { Button } from "@rallly/ui/button";
import * as Sentry from "@sentry/nextjs";
import { GithubIcon, HomeIcon, LifeBuoyIcon, PlusIcon } from "lucide-react";
-import Link from "next/link";
import { useRouter } from "next/navigation";
import React from "react";
import { ErrorPage, ErrorPageLinkItem } from "@/components/error-page";
+import { Link } from "@/components/link";
import { DefaultLogo } from "@/features/branding/components/default-logo";
import { Trans } from "@/i18n/client";
import { signOut } from "@/lib/auth-client";
diff --git a/apps/web/src/app/[locale]/invite/[urlId]/invite-page.tsx b/apps/web/src/app/[locale]/invite/[urlId]/invite-page.tsx
index f3cf88104..e66e872bc 100644
--- a/apps/web/src/app/[locale]/invite/[urlId]/invite-page.tsx
+++ b/apps/web/src/app/[locale]/invite/[urlId]/invite-page.tsx
@@ -2,7 +2,7 @@
import { buttonVariants, cn } from "@rallly/ui";
import { Alert, AlertAction, AlertDescription } from "@rallly/ui/alert";
import { ArrowUpRightIcon, CrownIcon } from "lucide-react";
-import Link from "next/link";
+import { Link } from "@/components/link";
import { usePoll } from "@/features/poll/client";
import { CommentsSheet } from "@/features/poll/components/comments-sheet";
import { EventCard } from "@/features/poll/components/event-card";
diff --git a/apps/web/src/app/[locale]/invite/[urlId]/page.tsx b/apps/web/src/app/[locale]/invite/[urlId]/page.tsx
index 1cfa5f19b..bc2f743db 100644
--- a/apps/web/src/app/[locale]/invite/[urlId]/page.tsx
+++ b/apps/web/src/app/[locale]/invite/[urlId]/page.tsx
@@ -49,14 +49,15 @@ export default async function Page(props: {
}) {
const params = await props.params;
- await getPollMetadata(params.urlId);
-
- const trpc = await createPublicSSRHelper();
+ const [, trpc, searchParams] = await Promise.all([
+ getPollMetadata(params.urlId),
+ createPublicSSRHelper(),
+ props.searchParams,
+ ]);
// `invite` is the param older invite emails carry; both name the same
// token and the client reads them the same way. A repeated param arrives
// as an array; only a single value is a token.
- const searchParams = await props.searchParams;
const token = [searchParams.token, searchParams.invite].find(
(value): value is string => typeof value === "string",
);
diff --git a/apps/web/src/app/[locale]/maintenance/page.tsx b/apps/web/src/app/[locale]/maintenance/page.tsx
index 56916986c..71d705b58 100644
--- a/apps/web/src/app/[locale]/maintenance/page.tsx
+++ b/apps/web/src/app/[locale]/maintenance/page.tsx
@@ -1,7 +1,6 @@
import { buttonVariants } from "@rallly/ui";
-import Link from "next/link";
-
import { ErrorPage } from "@/components/error-page";
+import { Link } from "@/components/link";
import { DefaultLogo } from "@/features/branding/components/default-logo";
import { getTranslation } from "@/i18n/server";
diff --git a/apps/web/src/app/[locale]/not-found.tsx b/apps/web/src/app/[locale]/not-found.tsx
index 650702d9c..d6a01b2d5 100644
--- a/apps/web/src/app/[locale]/not-found.tsx
+++ b/apps/web/src/app/[locale]/not-found.tsx
@@ -1,8 +1,7 @@
import { buttonVariants } from "@rallly/ui";
import { GithubIcon, HomeIcon, LifeBuoyIcon, PlusIcon } from "lucide-react";
-import Link from "next/link";
-
import { ErrorPage, ErrorPageLinkItem } from "@/components/error-page";
+import { Link } from "@/components/link";
import { DefaultLogo } from "@/features/branding/components/default-logo";
import { getTranslation } from "@/i18n/server";
diff --git a/apps/web/src/app/[locale]/quick-create/page.tsx b/apps/web/src/app/[locale]/quick-create/page.tsx
index b7df4c851..8be03587e 100644
--- a/apps/web/src/app/[locale]/quick-create/page.tsx
+++ b/apps/web/src/app/[locale]/quick-create/page.tsx
@@ -2,8 +2,8 @@ import { buttonVariants } from "@rallly/ui";
import { Card } from "@rallly/ui/card";
import { LogInIcon } from "lucide-react";
import type { Metadata } from "next";
-import Link from "next/link";
import { notFound } from "next/navigation";
+import { Link } from "@/components/link";
import { QuickCreateWidget } from "@/features/quick-create/components/quick-create-widget";
import { isQuickCreateEnabled } from "@/features/quick-create/constants";
import { getTranslation } from "@/i18n/server";
diff --git a/apps/web/src/app/[locale]/unsubscribe/[token]/components/mute-poll-form.tsx b/apps/web/src/app/[locale]/unsubscribe/[token]/components/mute-poll-form.tsx
index bf6b7a531..b52ee7ce3 100644
--- a/apps/web/src/app/[locale]/unsubscribe/[token]/components/mute-poll-form.tsx
+++ b/apps/web/src/app/[locale]/unsubscribe/[token]/components/mute-poll-form.tsx
@@ -3,8 +3,8 @@
import { buttonVariants } from "@rallly/ui";
import { Button } from "@rallly/ui/button";
import { BellOffIcon } from "lucide-react";
-import Link from "next/link";
import React from "react";
+import { Link } from "@/components/link";
import { unsubscribeWithTokenAction } from "@/features/notifications/actions";
import { Trans } from "@/i18n/client";
import { useSafeAction } from "@/lib/safe-action/client";
diff --git a/apps/web/src/app/[locale]/unsubscribe/[token]/page.tsx b/apps/web/src/app/[locale]/unsubscribe/[token]/page.tsx
index 465ee6c0f..62fd73961 100644
--- a/apps/web/src/app/[locale]/unsubscribe/[token]/page.tsx
+++ b/apps/web/src/app/[locale]/unsubscribe/[token]/page.tsx
@@ -12,8 +12,10 @@ export default async function UnsubscribePage({
params: Promise<{ token: string }>;
}) {
const { token } = await params;
- const { t, i18n } = await getTranslation();
- const target = await loadUnsubscribeTarget(token);
+ const [{ t, i18n }, target] = await Promise.all([
+ getTranslation(),
+ loadUnsubscribeTarget(token),
+ ]);
return (
<div className="flex min-h-dvh flex-col items-center gap-12 py-12">
diff --git a/apps/web/src/components/error-page.tsx b/apps/web/src/components/error-page.tsx
index eef844431..44a0a72fa 100644
--- a/apps/web/src/components/error-page.tsx
+++ b/apps/web/src/components/error-page.tsx
@@ -1,7 +1,7 @@
"use client";
import { ChevronRightIcon } from "lucide-react";
-import Link from "next/link";
+import { Link } from "@/components/link";
export function ErrorPage({
logo,
diff --git a/apps/web/src/components/link.tsx b/apps/web/src/components/link.tsx
new file mode 100644
index 000000000..3880663ec
--- /dev/null
+++ b/apps/web/src/components/link.tsx
@@ -0,0 +1,11 @@
+import NextLink from "next/link";
+import type React from "react";
+
+export type LinkProps = React.ComponentProps<typeof NextLink>;
+
+// Next prefetches every Link that enters the viewport, which bills a server
+// render per visible link. Default it off; opt in per link where an instant
+// navigation is worth the compute (sidebar nav uses HoverPrefetchLink).
+export function Link({ prefetch = false, ...props }: LinkProps) {
+ return <NextLink prefetch={prefetch} {...props} />;
+}
diff --git a/apps/web/src/components/login-link.tsx b/apps/web/src/components/login-link.tsx
index 1902ccfba..454dc836a 100644
--- a/apps/web/src/components/login-link.tsx
+++ b/apps/web/src/components/login-link.tsx
@@ -1,7 +1,7 @@
-import type { LinkProps } from "next/link";
-import Link from "next/link";
import { usePathname } from "next/navigation";
import React from "react";
+import type { LinkProps } from "@/components/link";
+import { Link } from "@/components/link";
export const LoginLink = React.forwardRef<
HTMLAnchorElement,
diff --git a/apps/web/src/components/register-link.tsx b/apps/web/src/components/register-link.tsx
index 7b5c6cc2a..61bd66898 100644
--- a/apps/web/src/components/register-link.tsx
+++ b/apps/web/src/components/register-link.tsx
@@ -1,7 +1,7 @@
-import type { LinkProps } from "next/link";
-import Link from "next/link";
import { usePathname, useRouter } from "next/navigation";
import React from "react";
+import type { LinkProps } from "@/components/link";
+import { Link } from "@/components/link";
export const RegisterLink = React.forwardRef<
HTMLAnchorElement,
diff --git a/apps/web/src/features/auth/components/sso-provider.tsx b/apps/web/src/features/auth/components/sso-provider.tsx
index 57985c85a..12afc0171 100644
--- a/apps/web/src/features/auth/components/sso-provider.tsx
+++ b/apps/web/src/features/auth/components/sso-provider.tsx
@@ -8,11 +8,27 @@ import { validateRedirectUrl } from "@/lib/utils/redirect";
function SSOImage({ provider }: { provider: string }) {
if (provider === "google") {
- return <Image src="/static/google.svg" width={16} alt="" height={16} />;
+ return (
+ <Image
+ src="/static/google.svg"
+ width={16}
+ alt=""
+ height={16}
+ unoptimized
+ />
+ );
}
if (provider === "microsoft-entra-id" || provider === "microsoft") {
- return <Image src="/static/microsoft.svg" width={16} alt="" height={16} />;
+ return (
+ <Image
+ src="/static/microsoft.svg"
+ width={16}
+ alt=""
+ height={16}
+ unoptimized
+ />
+ );
}
if (provider === "oidc") {
diff --git a/apps/web/src/features/event-types/client.tsx b/apps/web/src/features/event-types/client.tsx
deleted file mode 100644
index a12ad4c90..000000000
--- a/apps/web/src/features/event-types/client.tsx
+++ /dev/null
@@ -1,7 +0,0 @@
-"use client";
-
-import { useFeatureFlag } from "@/lib/feature-flags/client";
-
-export function useEventTypesEnabled() {
- return useFeatureFlag("eventTypes");
-}
diff --git a/apps/web/src/features/licensing/components/license-limit-warning.tsx b/apps/web/src/features/licensing/components/license-limit-warning.tsx
index a3d89d284..f8efa8030 100644
--- a/apps/web/src/features/licensing/components/license-limit-warning.tsx
+++ b/apps/web/src/features/licensing/components/license-limit-warning.tsx
@@ -1,5 +1,5 @@
-import Link from "next/link";
import { Trans } from "react-i18next/TransWithoutContext";
+import { Link } from "@/components/link";
import { DEFAULT_SEAT_LIMIT } from "@/features/licensing/constants";
import { loadInstanceLicense } from "@/features/licensing/data";
import { getUserCount } from "@/features/user/data";
diff --git a/apps/web/src/features/poll/components/create-poll.tsx b/apps/web/src/features/poll/components/create-poll.tsx
index c9f643bb1..ce5ae35ad 100644
--- a/apps/web/src/features/poll/components/create-poll.tsx
+++ b/apps/web/src/features/poll/components/create-poll.tsx
@@ -13,11 +13,11 @@ import { Form } from "@rallly/ui/form";
import { Popover, PopoverContent, PopoverTrigger } from "@rallly/ui/popover";
import { toast } from "@rallly/ui/sonner";
import { ArrowLeftIcon, CheckIcon } from "lucide-react";
-import Link from "next/link";
import { useRouter } from "next/navigation";
import React from "react";
import { useForm, useFormContext } from "react-hook-form";
import useFormPersist from "react-hook-form-persist";
+import { Link } from "@/components/link";
import { PollDetailsForm } from "@/features/poll/components/forms/poll-details-form";
import PollOptionsForm from "@/features/poll/components/forms/poll-options-form/poll-options-form";
import { PollSettingsForm } from "@/features/poll/components/forms/poll-settings";
diff --git a/apps/web/src/features/poll/components/manage-poll.tsx b/apps/web/src/features/poll/components/manage-poll.tsx
index 0c4ad8909..6674e6c16 100644
--- a/apps/web/src/features/poll/components/manage-poll.tsx
+++ b/apps/web/src/features/poll/components/manage-poll.tsx
@@ -19,9 +19,9 @@ import {
TableIcon,
TrashIcon,
} from "lucide-react";
-import Link from "next/link";
import * as React from "react";
import { DuplicateDialog } from "@/app/[locale]/(optional-space)/poll/[urlId]/duplicate-dialog";
+import { Link } from "@/components/link";
import { showPayWall, useIsFree } from "@/features/billing/client";
import { ProBadge } from "@/features/billing/components/pro-badge";
import { usePoll } from "@/features/poll/client";
diff --git a/apps/web/src/features/poll/components/new-participant-modal.tsx b/apps/web/src/features/poll/components/new-participant-modal.tsx
index da9762f3c..ae6e1384c 100644
--- a/apps/web/src/features/poll/components/new-participant-modal.tsx
+++ b/apps/web/src/features/poll/components/new-participant-modal.tsx
@@ -24,11 +24,11 @@ import { MaxCharLength } from "@rallly/ui/max-char-length";
import { Textarea } from "@rallly/ui/textarea";
import { TRPCClientError } from "@trpc/client";
import { CircleCheckIcon, PlusIcon } from "lucide-react";
-import Link from "next/link";
import * as React from "react";
import { useForm } from "react-hook-form";
import * as z from "zod";
import { IfCloudHosted } from "@/components/environment";
+import { Link } from "@/components/link";
import { usePoll } from "@/features/poll/client";
import {
useAddParticipantMutation,
diff --git a/apps/web/src/features/poll/components/poll-footer.tsx b/apps/web/src/features/poll/components/poll-footer.tsx
index ace8095c7..85ae43da3 100644
--- a/apps/web/src/features/poll/components/poll-footer.tsx
+++ b/apps/web/src/features/poll/components/poll-footer.tsx
@@ -1,7 +1,7 @@
"use client";
import { posthog } from "@rallly/posthog/client";
-import Link from "next/link";
import { InstanceFooterLinks } from "@/components/instance-footer-links";
+import { Link } from "@/components/link";
import { useBranding } from "@/features/branding/client";
import { usePoll } from "@/features/poll/client";
import { Trans } from "@/i18n/client";
diff --git a/apps/web/src/features/poll/components/poll-layout.tsx b/apps/web/src/features/poll/components/poll-layout.tsx
index dce18578e..94278f0c5 100644
--- a/apps/web/src/features/poll/components/poll-layout.tsx
+++ b/apps/web/src/features/poll/components/poll-layout.tsx
@@ -8,9 +8,9 @@ import {
BreadcrumbSeparator,
} from "@rallly/ui/breadcrumb";
import { BarChart2Icon } from "lucide-react";
-import Link from "next/link";
import { useParams, usePathname } from "next/navigation";
import type React from "react";
+import { Link } from "@/components/link";
import { usePoll } from "@/features/poll/client";
import ManagePoll from "@/features/poll/components/manage-poll";
import { NotificationToggle } from "@/features/poll/components/notification-toggle";
diff --git a/apps/web/src/features/poll/components/truncated-linkify.tsx b/apps/web/src/features/poll/components/truncated-linkify.tsx
index 724bc4134..ccccf4234 100644
--- a/apps/web/src/features/poll/components/truncated-linkify.tsx
+++ b/apps/web/src/features/poll/components/truncated-linkify.tsx
@@ -1,7 +1,7 @@
import { Tooltip, TooltipContent, TooltipTrigger } from "@rallly/ui/tooltip";
import Linkify from "linkify-react";
-import Link from "next/link";
import type * as React from "react";
+import { Link } from "@/components/link";
export const truncateLink = (href: string, text: string, key: number) => {
const textWithoutProtocol = text.replace(/^https?:\/\//i, "");
diff --git a/apps/web/src/features/quick-create/components/quick-create-button.tsx b/apps/web/src/features/quick-create/components/quick-create-button.tsx
index 1a1b4a6b9..863b94263 100644
--- a/apps/web/src/features/quick-create/components/quick-create-button.tsx
+++ b/apps/web/src/features/quick-create/components/quick-create-button.tsx
@@ -1,7 +1,7 @@
import { buttonVariants } from "@rallly/ui";
import { ZapIcon } from "lucide-react";
-import Link from "next/link";
import { Trans } from "react-i18next/TransWithoutContext";
+import { Link } from "@/components/link";
import { getTranslation } from "@/i18n/server";
diff --git a/apps/web/src/features/quick-create/components/quick-create-widget.tsx b/apps/web/src/features/quick-create/components/quick-create-widget.tsx
index 32908d4fa..89c811de2 100644
--- a/apps/web/src/features/quick-create/components/quick-create-widget.tsx
+++ b/apps/web/src/features/quick-create/components/quick-create-widget.tsx
@@ -1,7 +1,7 @@
import { buttonVariants } from "@rallly/ui";
import { CheckIcon, PlusIcon, ZapIcon } from "lucide-react";
-import Link from "next/link";
import { Trans } from "react-i18next/TransWithoutContext";
+import { Link } from "@/components/link";
import { PollPageIcon } from "@/components/page-icons";
import { getGuestPolls } from "@/features/quick-create/data";
diff --git a/apps/web/src/features/space/components/space-dropdown.tsx b/apps/web/src/features/space/components/space-dropdown.tsx
index fcd90fb0f..6ca87b238 100644
--- a/apps/web/src/features/space/components/space-dropdown.tsx
+++ b/apps/web/src/features/space/components/space-dropdown.tsx
@@ -19,8 +19,8 @@ import {
SettingsIcon,
UserPlusIcon,
} from "lucide-react";
-import Link from "next/link";
import React from "react";
+import { Link } from "@/components/link";
import { RouterLoadingIndicator } from "@/components/router-loading-indicator";
import { setActiveSpaceAction } from "@/features/space/actions";
import { useSpace } from "@/features/space/client";
diff --git a/apps/web/src/features/user/components/nav-user.tsx b/apps/web/src/features/user/components/nav-user.tsx
index fc5ce7b91..4694fa227 100644
--- a/apps/web/src/features/user/components/nav-user.tsx
+++ b/apps/web/src/features/user/components/nav-user.tsx
@@ -24,9 +24,9 @@ import {
SunMoonIcon,
UserIcon,
} from "lucide-react";
-import Link from "next/link";
import { useRouter } from "next/navigation";
import React from "react";
+import { Link } from "@/components/link";
import { OptimizedAvatarImage } from "@/components/optimized-avatar-image";
import { RouterLoadingIndicator } from "@/components/router-loading-indicator";
import { useUser } from "@/features/user/client";
diff --git a/apps/web/src/features/user/components/user-dropdown.tsx b/apps/web/src/features/user/components/user-dropdown.tsx
index 9800ee528..998d3a492 100644
--- a/apps/web/src/features/user/components/user-dropdown.tsx
+++ b/apps/web/src/features/user/components/user-dropdown.tsx
@@ -26,8 +26,8 @@ import {
SunMoonIcon,
UserIcon,
} from "lucide-react";
-import Link from "next/link";
import { useRouter } from "next/navigation";
+import { Link } from "@/components/link";
import { OptimizedAvatarImage } from "@/components/optimized-avatar-image";
import { useUser } from "@/features/user/client";
import { Trans, useTranslation } from "@/i18n/client";
diff --git a/apps/web/src/lib/use-toast-progress.ts b/apps/web/src/lib/use-toast-progress.ts
deleted file mode 100644
index be3b43f79..000000000
--- a/apps/web/src/lib/use-toast-progress.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-"use client";
-
-import { toast } from "@rallly/ui/sonner";
-import { useTranslation } from "@/i18n/client";
-
-export function useToastProgress() {
- const { t } = useTranslation();
- return <T>(promise: Promise<T>) =>
- toast.promise(promise, {
- loading: t("saving", { defaultValue: "Saving..." }),
- success: t("saved", { defaultValue: "Saved" }),
- error: t("unexpectedError", { defaultValue: "Unexpected error" }),
- });
-}
diff --git a/apps/web/src/lib/utils/is-valid-name.ts b/apps/web/src/lib/utils/is-valid-name.ts
deleted file mode 100644
index f8e01f23d..000000000
--- a/apps/web/src/lib/utils/is-valid-name.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * Checks if a string contains contact information like URLs, email addresses, or phone numbers
- * Returns true if the string is a valid personal/company name (no contact info)
- * Returns false if the string contains contact information
- */
-export function isValidName(value: string) {
- // Check for URL patterns
- // First check for common prefixes to avoid false positives with names like "Dr. Smith"
- if (/(https?:\/\/|www\.|http:|https:)/.test(value)) {
- return false;
- }
-
- // Common TLDs that would indicate a URL
- const commonTLDs = /\.(com|org|net|edu|gov|io|co|me|app|dev|info)(\s|$|\/)/i;
- if (commonTLDs.test(value)) {
- return false;
- }
-
- // Check for email patterns
- const emailPattern = /.+@.+\..+/i;
- if (emailPattern.test(value)) {
- return false;
- }
-
- // Check for phone number patterns (various formats)
- const phonePattern = /\+?[\d\s()\-.]{7,}/;
- if (phonePattern.test(value)) {
- return false;
- }
-
- return true;
-}
diff --git a/apps/web/src/trpc/types.ts b/apps/web/src/trpc/types.ts
deleted file mode 100644
index 678f3f3e5..000000000
--- a/apps/web/src/trpc/types.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-export type RegistrationTokenPayload = {
- name: string;
- email: string;
- locale?: string;
- timeZone?: string;
- code: string;
-};
-
-export type RegisteredUserSession = {
- isGuest: false;
- id: string;
- name: string;
- email: string;
-};
-
-export type GuestUserSession = {
- isGuest: true;
- id: string;
-};
-
-export type UserSession = GuestUserSession | RegisteredUserSession;
diff --git a/apps/web/src/types.ts b/apps/web/src/types.ts
deleted file mode 100644
index 964fac813..000000000
--- a/apps/web/src/types.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-import type React from "react";
-import type { JSX } from "react";
-
-export type ReactTag = keyof JSX.IntrinsicElements;
-
-export type PropsOf<TTag extends ReactTag> = TTag extends React.ElementType
- ? React.ComponentProps<TTag>
- : never;
-
-export type PropsWithClassName<TProps extends Record<string, unknown>> =
- React.PropsWithChildren<TProps> & {
- className?: string;
- };
-
-// biome-ignore lint/complexity/noBannedTypes: Fix this later
-export type IconComponent<TProps extends Record<string, unknown> = {}> =
- React.ComponentType<
- React.PropsWithChildren<TProps> & {
- className?: string;
- }
- >;