Add Next.js web app

Feed with live updates and pinning, profiles with follow/pin, featured song
picker, settings for all music services, and account deletion.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MzFywujuH9TiuXbr9vjoX8
This commit is contained in:
2026-10-03 09:59:02 -04:00
co-authored by Claude Opus 5.5
parent 6791b62d87
commit 5004beb10d
22 changed files with 1127 additions and 0 deletions
+41
View File
@@ -0,0 +1,41 @@
'use client';
import Link from 'next/link';
import { useRouter } from 'next/navigation';
import { api, useMe } from '@/lib/api';
export function Nav() {
const { me, mutate } = useMe();
const router = useRouter();
const logout = async () => {
await api('/auth/logout', { method: 'POST', body: {} });
await mutate(undefined, { revalidate: true });
router.push('/');
};
return (
<nav className="nav">
<Link href="/" className="brand">
musicshare
</Link>
<div className="nav-links">
{me ? (
<>
<Link href="/">Feed</Link>
<Link href={`/u/${me.username}`}>Profile</Link>
<Link href="/settings">Settings</Link>
<button className="link-button" onClick={logout}>
Log out
</button>
</>
) : (
<>
<Link href="/login">Log in</Link>
<Link href="/register" className="btn btn-primary">
Sign up
</Link>
</>
)}
</div>
</nav>
);
}