Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
277 changes: 1 addition & 276 deletions app/bun.lock

Large diffs are not rendered by default.

5 changes: 0 additions & 5 deletions app/example.env
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ ORIGIN="http://localhost:3000"
# Neon Postgres connection string
DATABASE_URL=

# Neon Auth environment variables for Next.js
NEXT_PUBLIC_STACK_PROJECT_ID=
NEXT_PUBLIC_STACK_PUBLISHABLE_CLIENT_KEY=
STACK_SECRET_SERVER_KEY=

# Public media bucket; uploads are optional locally (values from `vercel env pull`)
MEDIA_PUBLIC_URL="https://media.allthings.dev"
MEDIA_UPLOAD_URL=
Expand Down
1 change: 0 additions & 1 deletion app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
"@radix-ui/react-tooltip": "^1.2.8",
"@resvg/resvg-js": "^2.6.2",
"@sentry/nextjs": "^10.29.0",
"@stackframe/stack": "^2.8.36",
"@types/heic-convert": "^2.1.0",
"better-env": "^0.3.2",
"class-variance-authority": "^0.7.1",
Expand Down
6 changes: 0 additions & 6 deletions app/src/app/handler/[...stack]/page.tsx

This file was deleted.

3 changes: 0 additions & 3 deletions app/src/app/handler/loading.tsx

This file was deleted.

24 changes: 9 additions & 15 deletions app/src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import type { Metadata } from "next";
import { StackProvider, StackTheme } from "@stackframe/stack";
import { stackServerApp } from "../lib/stack";
import { Geist, Geist_Mono } from "next/font/google";
import "./globals.css";
import { ThemeProvider } from "@/components/theme-provider";
Expand Down Expand Up @@ -86,19 +84,15 @@ export default function RootLayout({
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
>
<JsonLd data={organizationJsonLd(url)} />
<StackProvider app={stackServerApp}>
<StackTheme>
<ThemeProvider
attribute="class"
defaultTheme="system"
enableSystem
disableTransitionOnChange
>
{children}
<Toaster />
</ThemeProvider>
</StackTheme>
</StackProvider>
<ThemeProvider
attribute="class"
defaultTheme="system"
enableSystem
disableTransitionOnChange
>
{children}
<Toaster />
</ThemeProvider>
</body>
</html>
);
Expand Down
21 changes: 0 additions & 21 deletions app/src/components/auth-nav.tsx

This file was deleted.

9 changes: 1 addition & 8 deletions app/src/components/page-layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,11 @@ import { HomeIcon } from "lucide-react";
import Link from "next/link";
import { Button } from "@/components/ui/button";
import { TopNav } from "@/components/top-nav";
import { AuthNav } from "@/components/auth-nav";
import { stackServerApp } from "@/lib/stack";
import { toClientUser } from "@/lib/client-user";

export async function PageLayout({ children }: { children: React.ReactNode }) {
const headersList = await headers();
const pathname = headersList.get("x-pathname") || "/";

// Whether someone is signed in, for TopNav's mobile menu.
const user = await stackServerApp.getUser();
const clientUser = user ? toClientUser(user) : null;

return (
<div className="min-h-[100dvh] max-w-[100vw] w-full flex flex-col">
<header className="w-full px-4 lg:px-6 h-14 flex items-center">
Expand All @@ -25,7 +18,7 @@ export async function PageLayout({ children }: { children: React.ReactNode }) {
</Link>
</Button>
)}
<TopNav authNav={<AuthNav />} user={clientUser} />
<TopNav />
</header>
<main className="w-full flex flex-col items-center justify-center">
{children}
Expand Down
54 changes: 4 additions & 50 deletions app/src/components/top-nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,12 @@ import {
PopoverContent,
PopoverTrigger,
} from "@/components/ui/popover";
import { MenuIcon, LogOut } from "lucide-react";
import { MenuIcon } from "lucide-react";
import { cn } from "@/lib/utils";
import Link from "next/link";
import { ModeToggle } from "@/components/theme-toggle";
import type { ClientUser } from "@/lib/client-user";

interface TopNavProps {
authNav: React.ReactNode;
user?: ClientUser | null;
}

export function TopNav({ authNav, user }: TopNavProps) {
export function TopNav() {
return (
<nav className="ml-auto flex items-center gap-4">
{/* Mobile: Dark mode toggle and hamburger menu side by side */}
Expand All @@ -30,34 +24,21 @@ export function TopNav({ authNav, user }: TopNavProps) {
<MenuIcon className="w-6 h-6" />
</PopoverTrigger>
<PopoverContent align="end" className="w-56 p-4">
<LinkList user={user} isMobile={true} />
<LinkList />
</PopoverContent>
</Popover>
</div>

{/* Desktop: Original layout */}
<LinkList className="hidden md:flex" />
<div className="hidden md:flex items-center gap-4">
{authNav}
<ModeToggle />
</div>
</nav>
);
}

function LinkList({
className,
user,
isMobile = false,
}: {
className?: string;
user?: ClientUser | null;
isMobile?: boolean;
}) {
const handleSignOut = () => {
window.location.href = "/handler/sign-out";
};

function LinkList({ className }: { className?: string }) {
return (
<ul className={cn("flex flex-col md:flex-row gap-3 md:gap-6", className)}>
<li>
Expand All @@ -76,33 +57,6 @@ function LinkList({
Past speakers
</Link>
</li>

{/* Mobile: Add auth links directly to nav menu */}
{isMobile && user && (
<>
<li className="pt-3 border-t border-border">
<button
onClick={handleSignOut}
className="flex items-center gap-2 text-sm font-medium hover:underline underline-offset-4 transition-colors duration-200 py-2 focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 rounded-sm text-red-600 hover:text-red-700 w-full text-left"
>
<LogOut className="h-4 w-4" />
Sign Out
</button>
</li>
</>
)}

{/* Mobile: Show sign in if no user */}
{isMobile && !user && (
<li className="pt-3 border-t border-border">
<Link
href="/handler/sign-in"
className="block text-sm font-medium hover:underline underline-offset-4 transition-colors duration-200 py-2 hover:text-primary focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 rounded-sm"
>
Sign In
</Link>
</li>
)}
</ul>
);
}
19 changes: 0 additions & 19 deletions app/src/lib/auth/config.ts

This file was deleted.

25 changes: 0 additions & 25 deletions app/src/lib/client-user.ts

This file was deleted.

2 changes: 0 additions & 2 deletions app/src/lib/config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { authConfig } from "./auth/config";
import { cronConfig } from "./cron/config";
import { databaseConfig } from "./database/config";
import { instanceConfig } from "./instance/config";
Expand All @@ -10,7 +9,6 @@ export const mainConfig = {
instance: instanceConfig,
database: {
databaseUrl: databaseConfig.databaseUrl,
neonAuth: authConfig,
},
media: mediaConfig,
resend: {
Expand Down
1 change: 0 additions & 1 deletion app/src/lib/robots.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/** Private or operational paths that should never appear in search results. */
const disallowedPaths = [
"/handler",
"/sentry-example-page",
"/api/cron",
"/api/sentry-example-api",
Expand Down
7 changes: 0 additions & 7 deletions app/src/lib/stack.tsx

This file was deleted.

44 changes: 0 additions & 44 deletions app/src/lib/users.ts

This file was deleted.

2 changes: 1 addition & 1 deletion app/tests/robots.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ describe("robots.txt", () => {
const robots = generateRobotsTxt("https://allthingsweb.dev");

test("keeps private and operational paths out of search", () => {
for (const path of ["/handler", "/api/cron"]) {
for (const path of ["/api/cron"]) {
expect(robots).toContain(`Disallow: ${path}\n`);
}
});
Expand Down
6 changes: 5 additions & 1 deletion web/tests/support/legacy-urls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,11 @@ export const legacyUrls: ReadonlyArray<LegacyUrl> = [
...(
[
["/profile", "/profile", "404: the app dropped members' profiles"],
["/handler/[...stack]", "/handler/sign-in", "200, Stack Auth's sign-in"],
[
"/handler/[...stack]",
"/handler/sign-in",
"404: the app dropped sign-in",
],
["/admin, /admin/*", "/admin", "404: the app dropped the admin"],
[
"/api/v1/profile",
Expand Down
Loading