winofy-front/src/app/layout.tsx
Afra ‌ 6a44887111 feat: auth flow (Gooyal OTP/OAuth2) + customer home page against live staging API
- Session stored as an encrypted (JWE) httpOnly cookie; access/refresh tokens
  never reach the client, client_secret never leaves the server.
- winofyFetch: server-side API client matching FRONTEND_GUIDE.md's plain-success
  / wrapped-error (§4.1-4.2) convention, with auto token refresh.
- Login page (phone -> OTP) wired to Gooyal accounts staging; request_otp
  verified working end-to-end. Token exchange returns invalid_client with the
  client_id/secret currently on hand — needs a fix from whoever issued them.
- proxy.ts (Next 16's renamed middleware) gates seller/cart/checkout/orders
  routes, verified redirecting unauthenticated requests to /login.
- Customer home page renders real store/category data fetched live from
  winofy-staging.winsoo.ir.
2026-08-15 14:56:52 +03:30

24 lines
732 B
TypeScript

import type { Metadata } from "next";
import { Vazirmatn } from "next/font/google";
import "./globals.css";
import { QueryProvider } from "@/lib/query-provider";
const vazirmatn = Vazirmatn({
variable: "--font-vazirmatn",
subsets: ["arabic"],
});
export const metadata: Metadata = {
title: "وینوفی",
description: "خرید آنلاین از فروشگاه‌های محله شما",
};
export default function RootLayout({ children }: LayoutProps<"/">) {
return (
<html lang="fa" dir="rtl" className={`${vazirmatn.variable} h-full antialiased`}>
<body className="min-h-full flex flex-col bg-background text-foreground">
<QueryProvider>{children}</QueryProvider>
</body>
</html>
);
}