feat: núcleo de tickets com Convex (CRUD, play, comentários com anexos) + auth placeholder; docs em AGENTS.md; toasts e updates otimistas; mapeadores Zod; refinos PT-BR e layout do painel de detalhes

This commit is contained in:
esdrasrenan 2025-10-04 00:31:44 -03:00
parent 2230590e57
commit 27b103cb46
97 changed files with 15117 additions and 15715 deletions

18
web/middleware.ts Normal file
View file

@ -0,0 +1,18 @@
import { NextRequest, NextResponse } from "next/server";
export function middleware(req: NextRequest) {
const url = req.nextUrl.clone();
const isPublic = url.pathname.startsWith("/login") || url.pathname.startsWith("/_next") || url.pathname.startsWith("/api") || url.pathname.startsWith("/favicon");
if (isPublic) return NextResponse.next();
const cookie = req.cookies.get("demoUser")?.value;
if (!cookie) {
const redirect = NextResponse.redirect(new URL("/login", req.url));
return redirect;
}
return NextResponse.next();
}
export const config = {
matcher: ["/:path*"],
};