Next.js app — chat interface, auth, settings, PWA manifest

This commit is contained in:
2026-04-26 02:05:09 -04:00
parent 241acf2b52
commit 996c4e19a7
12 changed files with 1161 additions and 122 deletions
+29
View File
@@ -0,0 +1,29 @@
import { NextResponse } from 'next/server';
import type { NextRequest } from 'next/server';
export function proxy(request: NextRequest) {
const { pathname } = request.nextUrl;
// Allow login page and public assets
if (
pathname.startsWith('/login') ||
pathname.startsWith('/_next') ||
pathname.startsWith('/manifest.json') ||
pathname.startsWith('/icon') ||
pathname.startsWith('/favicon')
) {
return NextResponse.next();
}
// Check for session cookie
const session = request.cookies.get('aaronai_session');
if (!session?.value) {
return NextResponse.redirect(new URL('/login', request.url));
}
return NextResponse.next();
}
export const config = {
matcher: ['/((?!_next/static|_next/image|favicon.ico).*)'],
};