Scaffold web frontend: mock-backed chat + PDF split-view, Tailwind/shadcn

This commit is contained in:
2026-07-31 12:16:47 +07:00
parent b72d4bf9d9
commit 967b917001
43 changed files with 5192 additions and 7 deletions
+35
View File
@@ -0,0 +1,35 @@
import { readFile } from "fs/promises";
import path from "path";
import { NextResponse } from "next/server";
export const runtime = "nodejs";
const PDF_PATH = path.join(
process.cwd(),
"..",
"..",
"ingestion",
"data",
"raw",
"duoc-thu-quoc-gia-viet-nam-2018.pdf"
);
export async function GET() {
try {
const file = await readFile(PDF_PATH);
return new NextResponse(file, {
headers: {
"Content-Type": "application/pdf",
"Content-Disposition": "inline",
},
});
} catch {
return NextResponse.json(
{
error:
"Không tìm thấy file PDF nguồn tại ingestion/data/raw/duoc-thu-quoc-gia-viet-nam-2018.pdf.",
},
{ status: 404 }
);
}
}