Initial monorepo setup with mcp-server and web packages

This commit is contained in:
Mohamed Boudra
2025-10-13 14:03:54 +02:00
commit fee0f4fd28
45 changed files with 8826 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
import { NextResponse } from 'next/server';
export async function POST(request: Request) {
try {
const { password } = await request.json();
const correctPassword = process.env.AUTH_PASSWORD;
if (!correctPassword) {
return NextResponse.json(
{ authenticated: false, error: 'Authentication not configured' },
{ status: 500 }
);
}
if (password === correctPassword) {
return NextResponse.json({ authenticated: true });
}
return NextResponse.json(
{ authenticated: false, error: 'Invalid password' },
{ status: 401 }
);
} catch (error) {
return NextResponse.json(
{ authenticated: false, error: 'Invalid request' },
{ status: 400 }
);
}
}