diff --git a/README.md b/README.md index e215bc4..af7c72d 100644 --- a/README.md +++ b/README.md @@ -1,36 +1,107 @@ -This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app). +# Hệ Thống Bán Đồ Ăn - Frontend -## Getting Started +Dự án Frontend cho một Hệ thống bán đồ ăn (Food Ordering System), được xây dựng bằng Next.js và React, với giao diện hiện đại sử dụng Tailwind CSS. -First, run the development server: +--- + +## Mô Tả Dự Án + +Đây là giao diện người dùng (frontend) cho hệ thống đặt và bán đồ ăn trực tuyến. Hệ thống gồm 2 trang chính: + +### Trang Người Dùng (User Page) +Dành cho khách hàng với các chức năng: +- Chọn món ăn: Duyệt và thêm món vào giỏ hàng +- Xem hóa đơn: Xem chi tiết các món đã chọn và tổng tiền +- Thanh toán: Thực hiện thanh toán đơn hàng +- Đánh giá: Đánh giá chất lượng món ăn và dịch vụ + +### Trang Quản Lý (Manager Page) +Dành cho chủ quán / nhân viên quản lý với các chức năng: +- Quản lý thực đơn (thêm, sửa, xóa món ăn) +- Theo dõi và xử lý đơn hàng +- Quản lý thông tin quán + +--- + +## Cách Chạy Dự Án + +### Yêu cầu hệ thống +- Node.js >= 18 +- pnpm (khuyến nghị) hoặc npm / yarn / bun + +### Cài đặt dependencies ```bash -npm run dev -# or -yarn dev -# or -pnpm dev -# or -bun dev +pnpm install +# hoặc +npm install ``` -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. +### Chạy môi trường phát triển -You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. +```bash +pnpm dev +# hoặc +npm run dev +``` -This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel. +Mở trình duyệt tại http://localhost:3000 để xem kết quả. -## Learn More +### Build production -To learn more about Next.js, take a look at the following resources: +```bash +pnpm build +pnpm start +``` -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. +--- -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome! +## Cấu Trúc Thư Mục -## Deploy on Vercel +Dự án sử dụng cấu trúc mặc định của Next.js App Router: -The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. +``` +frondend/ +├── app/ # App Router (Next.js) +│ ├── layout.tsx # Root layout (font, metadata, global styles) +│ ├── page.tsx # Trang chủ (User Page) +│ ├── globals.css # CSS toàn cục (Tailwind import) +│ ├── favicon.ico # Icon trang web +│ └── components/ # Components dùng riêng trong app/ +├── components/ # Shared components dùng chung toàn dự án +│ └── CartProduct.tsx # Component card sản phẩm trong giỏ hàng +├── public/ # Static assets (ảnh, svg, ...) +├── next.config.ts # Cấu hình Next.js +├── tsconfig.json # Cấu hình TypeScript +├── postcss.config.mjs # Cấu hình PostCSS (Tailwind) +├── eslint.config.mjs # Cấu hình ESLint +├── package.json # Dependencies và scripts +└── pnpm-workspace.yaml # Cấu hình pnpm workspace +``` -Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details. +--- + +## Công Nghệ Sử Dụng + +| Công nghệ | Phiên bản | Mục đích | +|-----------|-----------|----------| +| Next.js | 16.1.7 | React Framework (App Router) | +| React | 19.2.3 | Thư viện UI | +| TypeScript | ^5 | Kiểu dữ liệu tĩnh | +| Tailwind CSS | ^4 | Utility-first CSS framework | +| SCSS | - | CSS preprocessor | +| Geist Font | - | Font chữ mặc định (Google Fonts) | +| pnpm | - | Package manager | +| ESLint | ^9 | Linting code | + + +--- + +## Ghi Chú Phát Triển + +- Trang chủ () là điểm vào chính của **User Page** +- Chỉnh sửa để thay đổi giao diện trang chủ; trang tự động cập nhật khi lưu file +- Styles toàn cục được định nghĩa trong +- Tailwind CSS v4 được import trực tiếp qua trong CSS +- Hỗ trợ **Dark Mode** tự động theo cài đặt hệ thống () +- Font chữ sử dụng **Geist Sans** và **Geist Mono** từ Google Fonts thông qua diff --git a/TODO.md b/TODO.md new file mode 100644 index 0000000..9159d78 --- /dev/null +++ b/TODO.md @@ -0,0 +1 @@ +# Food Ordering Page - Implementation TODO diff --git a/app/favicon.ico b/app/favicon.ico deleted file mode 100644 index 718d6fe..0000000 Binary files a/app/favicon.ico and /dev/null differ diff --git a/app/globals.css b/app/globals.css index a2dc41e..69234e3 100644 --- a/app/globals.css +++ b/app/globals.css @@ -1,26 +1,113 @@ @import "tailwindcss"; +/* ============================================================ + LIGHT THEME — Coffee Brown & Beige Palette + All color/spacing/radius tokens live here so switching to + dark theme later only requires overriding these variables + in the [data-theme="dark"] block below. + ============================================================ */ :root { - --background: #ffffff; - --foreground: #171717; + /* --- Brand Colors --- */ + --color-primary: #6F4E37; /* coffee brown */ + --color-primary-light: #A0785A; /* lighter brown */ + --color-primary-dark: #4A3728; /* dark espresso */ + --color-accent: #C8973A; /* golden caramel */ + --color-accent-light: #F0D9A8; /* pale caramel */ + + /* --- Background Colors --- */ + --color-bg-main: #FDF6EC; /* warm beige */ + --color-bg-card: #FFFFFF; + --color-bg-sidebar: #FFFFFF; + --color-bg-header: #FFFFFF; + --color-bg-footer: #3D2B1F; /* dark espresso */ + + /* --- Text Colors --- */ + --color-text-primary: #2C1A0E; /* very dark brown */ + --color-text-secondary: #6F4E37; /* coffee brown */ + --color-text-muted: #A08060; /* warm grey-brown */ + --color-text-on-dark: #FDF6EC; /* beige on dark bg */ + --color-text-on-primary: #FFFFFF; /* white on primary */ + + /* --- Border & Divider --- */ + --color-border: #E2C9A8; /* warm tan */ + --color-border-light: #F0E4D0; /* very light tan */ + + /* --- Shadow --- */ + --color-shadow-sm: rgba(111, 78, 55, 0.08); + --color-shadow-md: rgba(111, 78, 55, 0.18); + + /* --- Layout Dimensions --- */ + --spacing-header-height: 72px; + --spacing-sidebar-width: 240px; /* expanded */ + --spacing-sidebar-collapsed: 64px; /* icon-only */ + --spacing-content-max: 1536px; + + /* --- Border Radius --- */ + --radius-sm: 6px; + --radius-md: 12px; + --radius-lg: 20px; + --radius-full: 9999px; + + /* --- Transitions --- */ + --transition-fast: 150ms ease; + --transition-normal: 250ms ease; + --transition-slow: 400ms ease; } +/* ============================================================ + DARK THEME PLACEHOLDER + Uncomment & fill values when dark mode is needed. + ============================================================ */ +/* +[data-theme="dark"] { + --color-primary: #A0785A; + --color-primary-light: #C8956C; + --color-primary-dark: #6F4E37; + --color-accent: #D4A96A; + --color-accent-light: #7A5C30; + + --color-bg-main: #1A0F08; + --color-bg-card: #2D1B0E; + --color-bg-sidebar: #231408; + --color-bg-header: #1A0F08; + --color-bg-footer: #0D0704; + + --color-text-primary: #FDF6EC; + --color-text-secondary: #C8956C; + --color-text-muted: #8B7060; + --color-text-on-dark: #FDF6EC; + + --color-border: #4A2E1A; + --color-border-light: #3D2314; +} +*/ + +/* ============================================================ + TAILWIND THEME BRIDGE + ============================================================ */ @theme inline { - --color-background: var(--background); - --color-foreground: var(--foreground); + --color-background: var(--color-bg-main); + --color-foreground: var(--color-text-primary); --font-sans: var(--font-geist-sans); --font-mono: var(--font-geist-mono); } -@media (prefers-color-scheme: dark) { - :root { - --background: #0a0a0a; - --foreground: #ededed; - } -} - +/* ============================================================ + BASE STYLES + ============================================================ */ body { - background: var(--background); - color: var(--foreground); + background-color: var(--color-bg-main); + color: var(--color-text-primary); font-family: Arial, Helvetica, sans-serif; } + +/* ============================================================ + CUSTOM SCROLLBAR + ============================================================ */ +::-webkit-scrollbar { width: 6px; height: 6px; } +::-webkit-scrollbar-track { background: var(--color-bg-main); } +::-webkit-scrollbar-thumb { + background: var(--color-primary-light); + border-radius: var(--radius-full); +} +::-webkit-scrollbar-thumb:hover { background: var(--color-primary); } diff --git a/app/layout.tsx b/app/layout.tsx index f7fa87e..94a2dd3 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -1,6 +1,8 @@ import type { Metadata } from "next"; import { Geist, Geist_Mono } from "next/font/google"; import "./globals.css"; +import Header from "@/layouts/header"; +import Footer from "@/layouts/footer"; const geistSans = Geist({ variable: "--font-geist-sans", @@ -13,8 +15,13 @@ const geistMono = Geist_Mono({ }); export const metadata: Metadata = { - title: "Create Next App", - description: "Generated by create next app", + title: "Coffee Shop — Hệ thống đặt món", + description: "Đặt món cà phê, trà, nước ép và nhiều hơn nữa tại Coffee Shop.", + icons: { + icon: "/favicon/favicon.ico", + shortcut: "/favicon/favicon.ico", + apple: "/favicon/apple-touch-icon.png", + }, }; export default function RootLayout({ @@ -23,11 +30,29 @@ export default function RootLayout({ children: React.ReactNode; }>) { return ( - + + + {/* FontAwesome 6 — icons used throughout the app */} + + - {children} + {/* Sticky top header */} +
+ + {/* Page content (grows to fill remaining height) */} +
+ {children} +
+ + {/* Footer always at bottom */} +