# HASAKI - Website bán mỹ phẩm
Đồ án tốt nghiệp **"Thiết kế Website bán mỹ phẩm Hasaki"**
Source code được xây dựng lại bám sát theo báo cáo đồ án:
- **Frontend**: HTML5 + SCSS (biên dịch ra CSS) + Vanilla JavaScript
- **Backend**: PHP thuần (PHP 8+) theo mô hình **3-Layer (DataAccess → Business → Controller/View)**
- **Database**: MySQL 8
---
## 📁 Cấu trúc thư mục
```
hasaki/
├── config/ # Config + DB connection (Database::getConnection())
│ ├── config.php
│ └── database.php
├── database/
│ └── schema.sql # Schema + seed data (11 bảng)
├── src/
│ ├── DataAccess/ # Tầng truy xuất dữ liệu (PDO)
│ │ ├── BaseDAL.php
│ │ ├── ProductDAL.php, CategoryDAL.php
│ │ ├── CustomerDAL.php, EmployeeDAL.php
│ │ ├── AccountDAL.php, InvoiceDAL.php
│ │ ├── ImportInvoiceDAL.php, WarehouseDAL.php
│ ├── Business/ # Tầng xử lý nghiệp vụ
│ │ ├── AuthBLL.php, CartBLL.php
│ │ ├── ProductBLL.php, CategoryBLL.php
│ │ ├── CustomerBLL.php, EmployeeBLL.php
│ │ ├── AccountBLL.php, InvoiceBLL.php
│ └── helpers/
│ └── functions.php # Hàm tiện ích chung
├── public/ # Document root (Controller / View)
│ ├── index.php # Trang chủ
│ ├── products.php # Danh sách sản phẩm
│ ├── product-detail.php # Chi tiết sản phẩm
│ ├── cart.php # Giỏ hàng
│ ├── cart-action.php # Add/update/remove cart
│ ├── checkout.php # Thanh toán
│ ├── order-success.php
│ ├── login.php / register.php / logout.php
│ ├── account.php # Trang tài khoản KH
│ ├── about.php
│ ├── admin/ # Phân hệ quản trị
│ │ ├── login.php
│ │ ├── index.php # Dashboard tổng quan
│ │ ├── products.php, categories.php
│ │ ├── customers.php, employees.php, accounts.php
│ │ ├── invoices.php, import-invoices.php
│ │ ├── warehouse.php, stats.php
│ │ └── includes/layout-top.php, layout-bottom.php
│ ├── includes/header.php, footer.php, product-card.php
│ └── assets/
│ ├── scss/ # SCSS sources
│ │ ├── style.scss (entry)
│ │ ├── _variables.scss, _mixins.scss, _base.scss
│ │ ├── _header.scss, _footer.scss
│ │ ├── _home.scss, _product.scss, _cart.scss, _auth.scss
│ │ └── admin/admin.scss, _admin-base.scss
│ ├── css/ # CSS đã biên dịch (style.css, admin.css)
│ ├── js/main.js
│ └── images/ # Ảnh sản phẩm
├── index.php / .htaccess # Forward đến /public
├── package.json # Script biên dịch SCSS
└── README.md