Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.
TypeScript i18nextnext-authnextjspostgresqlprismareact-emailt3-stacktailwindcsstrpcturborepotypescriptzod
🔥 Remove orphaned code (#2683)
Luke Vella27c567210236
diff --git a/apps/landing/public/locales/en/common.json b/apps/landing/public/locales/en/common.jsonindex 112edc976..78c978d46 100644--- a/apps/landing/public/locales/en/common.json+++ b/apps/landing/public/locales/en/common.json@@ -22,12 +22,10 @@"login": "Login","notFoundDescription": "We couldn't find the page you're looking for.","notFoundTitle": "404 not found",- "openSource": "We're Open Source!","pricing": "Pricing","privacyPolicy": "Privacy Policy","signUp": "Sign Up","solutions": "Solutions",- "starOnGitHub": "Star us on GitHub","status": "Status","support": "Support","termsOfUse": "Terms of Use",diff --git a/apps/landing/src/app/[locale]/(main)/open-source-banner.tsx b/apps/landing/src/app/[locale]/(main)/open-source-banner.tsxdeleted file mode 100644index 11ea881ee..000000000--- a/apps/landing/src/app/[locale]/(main)/open-source-banner.tsx+++ /dev/null@@ -1,50 +0,0 @@-"use client";--import { cn } from "@rallly/ui";-import { ArrowUpRightIcon } from "lucide-react";-import React from "react";-import GithubIcon from "@/assets/github.svg";-import { Trans } from "@/i18n/client/trans";--export function OpenSourceBanner() {- const [visible, setVisible] = React.useState(true);-- React.useEffect(() => {- function setVisibility() {- setVisible(window.scrollY < 20);- }- window.addEventListener("scroll", setVisibility);- return () => {- window.removeEventListener("scroll", setVisibility);- };- }, []);-- return (- <div- className={cn(- "fixed top-0 z-50 flex h-11 w-full items-center justify-center gap-4 overflow-hidden rounded-none bg-gray-800 text-gray-100 text-sm transition-transform hover:underline",- {- "translate-y-0": visible,- "-translate-y-full": !visible,- },- )}- >- <a- target="_blank"- rel="noopener noreferrer"- href="https://github.com/lukevella/rallly"- className="absolute inset-0 flex items-center justify-center gap-3 px-4"- >- <GithubIcon className="size-4" />- <span className="truncate">- <Trans i18nKey="openSource" defaults="We're Open Source!" />- </span>- <span className="h-4 w-px bg-gray-500" />- <span className="truncate">- <Trans i18nKey="starOnGitHub" defaults="Star us on GitHub" />- </span>- <ArrowUpRightIcon className="size-4" />- </a>- </div>- );-}diff --git a/apps/web/public/locales/en/app.json b/apps/web/public/locales/en/app.jsonindex 04c0fa4e3..5ea9ab539 100644--- a/apps/web/public/locales/en/app.json+++ b/apps/web/public/locales/en/app.json@@ -373,7 +373,6 @@"limitedPollLifetime": "Limited Poll Lifetime","limitedPollLifetimeDescription": "Inactive polls are automatically deleted","loading": "Loading...",- "localeSyncToast": "Your language preferences have changed","location": "Location","locationCustomLink": "Custom link","locationDisplayText": "Display text",diff --git a/apps/web/src/app/[locale]/(optional-space)/new/back-button.tsx b/apps/web/src/app/[locale]/(optional-space)/new/back-button.tsxdeleted file mode 100644index 4e39600d6..000000000--- a/apps/web/src/app/[locale]/(optional-space)/new/back-button.tsx+++ /dev/null@@ -1,26 +0,0 @@-"use client";--import { Button } from "@rallly/ui/button";-import { Icon } from "@rallly/ui/icon";-import { ArrowLeftIcon } from "lucide-react";-import { useRouter } from "next/navigation";--import { Trans } from "@/i18n/client";--export function BackButton() {- const router = useRouter();-- return (- <Button- onClick={() => {- router.back();- }}- variant="ghost"- >- <Icon>- <ArrowLeftIcon />- </Icon>- <Trans i18nKey="back" defaults="Back" />- </Button>- );-}diff --git a/apps/web/src/components/container.tsx b/apps/web/src/components/container.tsxdeleted file mode 100644index f61a6a0a1..000000000--- a/apps/web/src/components/container.tsx+++ /dev/null@@ -1,10 +0,0 @@-import { cn } from "@rallly/ui";--export const Container = ({- children,- className,-}: React.PropsWithChildren<{ className?: string }>) => {- return (- <div className={cn("mx-auto max-w-7xl px-4", className)}>{children}</div>- );-};diff --git a/apps/web/src/components/frame.tsx b/apps/web/src/components/frame.tsxdeleted file mode 100644index 5ec755d8d..000000000--- a/apps/web/src/components/frame.tsx+++ /dev/null@@ -1,19 +0,0 @@-function Frame({ children }: { children: React.ReactNode }) {- return (- <div className="h-dvh bg-gray-100 p-8 dark:bg-gray-900">- <div className="flex h-full gap-6 rounded-2xl border bg-card shadow-sm">- {children}- </div>- </div>- );-}--function FrameSidebar({ children }: { children: React.ReactNode }) {- return <aside className="flex w-80 flex-col p-6">{children}</aside>;-}--function FrameContent({ children }: { children: React.ReactNode }) {- return <main className="flex flex-1 flex-col">{children}</main>;-}--export { Frame, FrameSidebar, FrameContent };diff --git a/apps/web/src/components/page-dialog.tsx b/apps/web/src/components/page-dialog.tsxdeleted file mode 100644index 1b074c9c3..000000000--- a/apps/web/src/components/page-dialog.tsx+++ /dev/null@@ -1,44 +0,0 @@-import { Container } from "@/components/container";-import type { IconComponent } from "@/types";--export const PageDialog = (- props: React.PropsWithChildren<{ icon?: IconComponent }>,-) => {- return (- <Container className="flex h-[calc(75vh)] items-center justify-center">- <div className="text-center">- {props.icon ? (- <props.icon className="inline-block size-14 text-primary" />- ) : null}- {props.children}- </div>- </Container>- );-};--export const PageDialogContent = (props: React.PropsWithChildren) => {- return <div className="mt-4 mb-6">{props.children}</div>;-};--export const PageDialogHeader = (props: React.PropsWithChildren) => {- return <div className="mt-4 mb-6 space-y-2">{props.children}</div>;-};--export const PageDialogFooter = (props: React.PropsWithChildren) => {- return (- <div className="mt-6 flex flex-col items-center justify-center gap-2.5 sm:flex-row">- {props.children}- </div>- );-};-export const PageDialogTitle = (props: React.PropsWithChildren) => {- return <h1 className="font-bold text-2xl">{props.children}</h1>;-};--export const PageDialogDescription = (props: React.PropsWithChildren) => {- return (- <p className="max-w-xl text-muted-foreground text-sm leading-relaxed">- {props.children}- </p>- );-};diff --git a/apps/web/src/components/time-zone-picker/timezone-utils.ts b/apps/web/src/components/time-zone-picker/timezone-utils.tsdeleted file mode 100644index c9518cc64..000000000--- a/apps/web/src/components/time-zone-picker/timezone-utils.ts+++ /dev/null@@ -1,33 +0,0 @@-export function getOffsetMinutes(iana: string): number {- const now = new Date();- const parts = new Intl.DateTimeFormat("en-US", {- timeZone: iana,- timeZoneName: "shortOffset",- }).formatToParts(now);-- const tzPart = parts.find((p) => p.type === "timeZoneName")?.value ?? "";-- // tzPart is like "GMT", "GMT+5:30", "GMT-8"- if (tzPart === "GMT") return 0;-- const match = tzPart.match(/GMT([+-])(\d+)(?::(\d+))?/);- if (!match) return 0;-- const sign = match[1] === "+" ? 1 : -1;- const hours = Number.parseInt(match[2], 10);- const minutes = Number.parseInt(match[3] ?? "0", 10);- return sign * (hours * 60 + minutes);-}--function formatOffset(offsetMinutes: number): string {- const sign = offsetMinutes >= 0 ? "+" : "-";- const abs = Math.abs(offsetMinutes);- const hours = Math.floor(abs / 60);- const minutes = abs % 60;- return `${sign}${String(hours).padStart(2, "0")}:${String(minutes).padStart(2, "0")}`;-}--export function getOffsetLabel(iana: string): string {- const offsetMinutes = getOffsetMinutes(iana);- return formatOffset(offsetMinutes);-}diff --git a/apps/web/src/features/conferencing/components/conferencing-link.tsx b/apps/web/src/features/conferencing/components/conferencing-link.tsxdeleted file mode 100644index e463473cb..000000000--- a/apps/web/src/features/conferencing/components/conferencing-link.tsx+++ /dev/null@@ -1,75 +0,0 @@-import { buttonVariants } from "@rallly/ui";-import { LinkIcon, PhoneIcon, VideoIcon } from "lucide-react";-import type { Conferencing } from "../schema";--export function ConferencingLink({- conferencing,-}: {- conferencing: Conferencing;-}) {- switch (conferencing.provider) {- case "phone":- return (- <a- href={- conferencing.extension- ? `tel:${conferencing.number},,${conferencing.extension}`- : `tel:${conferencing.number}`- }- rel="noreferrer"- className={buttonVariants({ variant: "ghost" })}- >- <PhoneIcon />- {conferencing.number}- </a>- );- case "zoom":- return (- <a- href={conferencing.uri}- target="_blank"- rel="noreferrer"- className={buttonVariants({ variant: "ghost" })}- >- <VideoIcon />- Zoom- </a>- );- case "meet":- return (- <a- href={conferencing.uri}- target="_blank"- rel="noreferrer"- className={buttonVariants({ variant: "ghost" })}- >- <VideoIcon />- Google Meet- </a>- );- case "teams":- return (- <a- href={conferencing.uri}- target="_blank"- rel="noreferrer"- className={buttonVariants({ variant: "ghost" })}- >- <VideoIcon />- Microsoft Teams- </a>- );- case "custom":- return (- <a- href={conferencing.uri}- target="_blank"- rel="noreferrer"- className={buttonVariants({ variant: "ghost" })}- >- <LinkIcon />- {conferencing.label}- </a>- );- }-}diff --git a/packages/billing/src/lib/get-pricing.ts b/packages/billing/src/lib/get-pricing.tsdeleted file mode 100644index 802f12be1..000000000--- a/packages/billing/src/lib/get-pricing.ts+++ /dev/null@@ -1,20 +0,0 @@-import { stripe } from "..";--export async function getPricing() {- const prices = await stripe.prices.list({- lookup_keys: ["pro-monthly", "pro-yearly"],- });-- const [monthly, yearly] = prices.data;-- return {- monthly: {- currency: monthly.currency,- price: monthly.unit_amount,- },- yearly: {- currency: yearly.currency,- price: yearly.unit_amount,- },- };-}diff --git a/packages/ui/src/action-bar.tsx b/packages/ui/src/action-bar.tsxdeleted file mode 100644index 03f90ce1f..000000000--- a/packages/ui/src/action-bar.tsx+++ /dev/null@@ -1,84 +0,0 @@-"use client";--import { Toolbar } from "@base-ui/react/toolbar";-import type { VariantProps } from "class-variance-authority";-import { Loader2Icon } from "lucide-react";-import type * as React from "react";-import { buttonVariants } from "./button-variants";-import { cn } from "./lib/utils";--function ActionBar({ className, children, ...props }: Toolbar.Root.Props) {- return (- <div className="pointer-events-none fixed inset-x-0 bottom-0 z-40 bg-linear-to-t from-25% from-gray-100/50 to-transparent dark:from-gray-900">- <Toolbar.Root- data-slot="action-bar"- className={cn(- "pointer-events-auto mx-auto flex max-w-xl items-center justify-center gap-3 px-4 pt-12 pb-[max(--spacing(4),env(safe-area-inset-bottom))] sm:pb-[max(--spacing(8),env(safe-area-inset-bottom))]",- className,- )}- {...props}- >- {children}- </Toolbar.Root>- </div>- );-}--function ActionBarButton({- className,- variant,- size = "lg",- loading,- disabled,- children,- ...props-}: Toolbar.Button.Props &- VariantProps<typeof buttonVariants> & { loading?: boolean }) {- return (- <Toolbar.Button- data-slot="action-bar-button"- className={cn(- "group",- buttonVariants({ variant, size }),- { "pointer-events-none": loading },- className,- )}- disabled={disabled || loading}- aria-busy={loading || undefined}- {...props}- >- {loading ? (- <Loader2Icon- data-icon="inline-start"- className="size-4 animate-spin opacity-75"- />- ) : null}- {children}- </Toolbar.Button>- );-}--function ActionBarSpacer({- className,- ...props-}: React.HTMLAttributes<HTMLDivElement>) {- return <div className={cn("flex-1", className)} {...props} />;-}--function ActionBarOffset({- className,- ...props-}: React.HTMLAttributes<HTMLDivElement>) {- return (- <div- aria-hidden- className={cn(- "h-[calc(--spacing(12)+max(--spacing(6),env(safe-area-inset-bottom)))] sm:h-[calc(--spacing(12)+max(--spacing(12),env(safe-area-inset-bottom)))]",- className,- )}- {...props}- />- );-}--export { ActionBar, ActionBarButton, ActionBarOffset, ActionBarSpacer };diff --git a/packages/ui/src/dot-pattern.tsx b/packages/ui/src/dot-pattern.tsxdeleted file mode 100644index f50da7ed5..000000000--- a/packages/ui/src/dot-pattern.tsx+++ /dev/null@@ -1,56 +0,0 @@-import { useId } from "react";--import { cn } from "./lib/utils";--interface DotPatternProps {- width?: number;- height?: number;- x?: number;- y?: number;- cx?: number;- cy?: number;- cr?: number;- className?: string;- [key: string]: unknown;-}-export function DotPattern({- width = 16,- height = 16,- x = 0,- y = 0,- cx = 1,- cy = 1,- cr = 1,- className,- ...props-}: DotPatternProps) {- const id = useId();-- return (- <svg- aria-hidden="true"- className={cn(- "pointer-events-none absolute inset-0 h-full w-full fill-gray-300",- className,- )}- {...props}- >- <defs>- <pattern- id={id}- width={width}- height={height}- patternUnits="userSpaceOnUse"- patternContentUnits="userSpaceOnUse"- x={x}- y={y}- >- <circle id="pattern-circle" cx={cx} cy={cy} r={cr} />- </pattern>- </defs>- <rect width="100%" height="100%" strokeWidth={0} fill={`url(#${id})`} />- </svg>- );-}--export default DotPattern;diff --git a/packages/ui/src/table.tsx b/packages/ui/src/table.tsxdeleted file mode 100644index 9487e795d..000000000--- a/packages/ui/src/table.tsx+++ /dev/null@@ -1,120 +0,0 @@-import * as React from "react";--import { cn } from "./lib/utils";--const Table = React.forwardRef<- HTMLTableElement,- React.HTMLAttributes<HTMLTableElement>->(({ className, ...props }, ref) => (- <div className="relative w-full overflow-auto">- <table- ref={ref}- className={cn("w-full caption-bottom text-sm", className)}- {...props}- />- </div>-));-Table.displayName = "Table";--const TableHeader = React.forwardRef<- HTMLTableSectionElement,- React.HTMLAttributes<HTMLTableSectionElement>->(({ className, ...props }, ref) => (- <thead ref={ref} className={cn("[&_tr]:border-b", className)} {...props} />-));-TableHeader.displayName = "TableHeader";--const TableBody = React.forwardRef<- HTMLTableSectionElement,- React.HTMLAttributes<HTMLTableSectionElement>->(({ className, ...props }, ref) => (- <tbody- ref={ref}- className={cn("[&_tr:last-child]:border-0", className)}- {...props}- />-));-TableBody.displayName = "TableBody";--const TableFooter = React.forwardRef<- HTMLTableSectionElement,- React.HTMLAttributes<HTMLTableSectionElement>->(({ className, ...props }, ref) => (- <tfoot- ref={ref}- className={cn(- "border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",- className,- )}- {...props}- />-));-TableFooter.displayName = "TableFooter";--const TableRow = React.forwardRef<- HTMLTableRowElement,- React.HTMLAttributes<HTMLTableRowElement>->(({ className, ...props }, ref) => (- <tr- ref={ref}- className={cn(- "group border-b hover:bg-muted/50 data-[state=selected]:bg-muted",- className,- )}- {...props}- />-));-TableRow.displayName = "TableRow";--const TableHead = React.forwardRef<- HTMLTableCellElement,- React.ThHTMLAttributes<HTMLTableCellElement>->(({ className, ...props }, ref) => (- <th- ref={ref}- className={cn(- "h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [[role=checkbox]]:*:translate-y-[2px]",- className,- )}- {...props}- />-));-TableHead.displayName = "TableHead";--const TableCell = React.forwardRef<- HTMLTableCellElement,- React.TdHTMLAttributes<HTMLTableCellElement>->(({ className, ...props }, ref) => (- <td- ref={ref}- className={cn(- "p-2 align-middle [&:has([role=checkbox])]:pr-0 [[role=checkbox]]:*:translate-y-[2px]",- className,- )}- {...props}- />-));-TableCell.displayName = "TableCell";--const TableCaption = React.forwardRef<- HTMLTableCaptionElement,- React.HTMLAttributes<HTMLTableCaptionElement>->(({ className, ...props }, ref) => (- <caption- ref={ref}- className={cn("mt-4 text-muted-foreground text-sm", className)}- {...props}- />-));-TableCaption.displayName = "TableCaption";--export {- Table,- TableBody,- TableCaption,- TableCell,- TableFooter,- TableHead,- TableHeader,- TableRow,-};diff --git a/packages/utils/src/safe-session-storage.ts b/packages/utils/src/safe-session-storage.tsdeleted file mode 100644index 53a89f386..000000000--- a/packages/utils/src/safe-session-storage.ts+++ /dev/null@@ -1,43 +0,0 @@-// Memory fallback when sessionStorage isn't available-const memoryStorage = new Map<string, string>();--/**- * Safe wrapper for sessionStorage with memory fallback- * Handles browser environments, private browsing modes, and SSR- */-export const safeSessionStorage = {- get(key: string): string | null {- try {- return typeof window !== "undefined"- ? window.sessionStorage.getItem(key)- : memoryStorage.get(key) || null;- } catch (error) {- console.warn("Error accessing sessionStorage:", error);- return memoryStorage.get(key) || null;- }- },-- set(key: string, value: string): void {- try {- if (typeof window !== "undefined") {- window.sessionStorage.setItem(key, value);- return;- }- } catch (error) {- console.warn("Error setting sessionStorage:", error);- }- memoryStorage.set(key, value);- },-- remove(key: string): void {- try {- if (typeof window !== "undefined") {- window.sessionStorage.removeItem(key);- return;- }- } catch (error) {- console.warn("Error deleting sessionStorage:", error);- }- memoryStorage.delete(key);- },-};diff --git a/packages/utils/src/sleep.ts b/packages/utils/src/sleep.tsdeleted file mode 100644index 0d7f188e1..000000000--- a/packages/utils/src/sleep.ts+++ /dev/null@@ -1,3 +0,0 @@-export function sleep(ms: number) {- return new Promise((resolve) => setTimeout(resolve, ms));-}