diff --git a/.blackboxcli/settings.json b/.blackboxcli/settings.json deleted file mode 100644 index 71a0cb1..0000000 --- a/.blackboxcli/settings.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "mcpServers": { - "remote-code": { - "httpUrl": "https://cloud.blackbox.ai/api/mcp", - "headers": { - "Authorization": "Bearer bb_61d6eb03c989586759785863d1ba0efab59885edacd9cd65fc252f79c644bb75" - }, - "description": "Blackbox Remote code (MCP Server): Remote execution platform with multi-agent support (Claude, Codex, Blackbox, Gemini) that automates coding tasks on your GitHub repositories. Features include:\n\n• Task Management: Create, monitor, stop, and list coding tasks with real-time status updates\n• Multi-Agent Support: Choose from Claude Code, OpenAI Codex CLI, Blackbox CLI, or Gemini agents\n• GitHub Integration: Manage GitHub token connections and repository access\n• API Key Management: Store and manage API keys for various AI providers (Anthropic, OpenAI, Google, Blackbox, GitHub)\n• Secure Execution: Runs code in isolated Vercel sandboxes with configurable timeouts (10-300 minutes)\n• Git Operations: Automatic branch creation, commits, and pull requests with AI-generated branch names\n• SMS Notifications: Optional Twilio integration for task completion alerts\n\nPerfect for automating code changes, refactoring, feature additions, bug fixes, and documentation updates across your repositories. Strictly DO NOT provide tools as / 'slash' commands in suggestions like /my_tasks, /task_status, /api_keys" - } - } -} diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml index 8a7a2a4..cde1c56 100644 --- a/.gitea/workflows/release.yaml +++ b/.gitea/workflows/release.yaml @@ -4,7 +4,7 @@ on: push: branches: - main - + pull_request: branches: - main @@ -22,15 +22,6 @@ jobs: id-token: write runs-on: ubuntu-latest steps: - - name: Calculate and Export Target IP - run: | - # 1. Lấy IP hiện tại và tính toán IP đích (đổi octet cuối thành .1) - RUNNER_IP=$(hostname -I | awk '{print $1}') - CALCULATED_IP=$(echo $RUNNER_IP | cut -d'.' -f1-3).1 - - # 2. Đưa vào biến môi trường toàn cục của Job - echo "TARGET_IP=${CALCULATED_IP}" >> $GITHUB_ENV - - name: Setup SSH Key run: | mkdir -p ~/.ssh @@ -38,33 +29,17 @@ jobs: echo "${{ secrets.DEPLOY_KEY }}" > ~/.ssh/id_ed25519 chmod 600 ~/.ssh/id_ed25519 - ssh-keyscan -p 222 -t ed25519 $TARGET_IP >> ~/.ssh/known_hosts + ssh-keyscan -t ed25519 vps.demonkernel.io.vn >> ~/.ssh/known_hosts - uses: actions/checkout@v6 with: fetch-depth: 0 - - uses: actions/setup-node@v6 - with: - node-version: latest - - uses: pnpm/action-setup@v3 with: version: latest run_install: false - - - name: Get pnpm store directory - shell: bash - run: | - echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV - - - uses: actions/cache@v3 - name: Setup pnpm cache - with: - path: ${{ env.STORE_PATH }} - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/package.json') }} - restore-keys: | - ${{ runner.os }}-pnpm-store- + cache: true - name: Update dependencies run: pnpm update @@ -80,7 +55,7 @@ jobs: GITEA_USER: ${{ github.actor }} GITEA_TOKEN: ${{ secrets.ACCESS_TOKEN }} run: pnpm release - + - name: Set Version Output id: set_output run: | @@ -92,7 +67,7 @@ jobs: if: gitea.ref == 'refs/heads/main' uses: docker/login-action@v3 with: - registry: git.demonkernel.io.vn + registry: vps.demonkernel.io.vn username: ${{ github.actor }} password: ${{ secrets.ACCESS_TOKEN }} @@ -102,10 +77,10 @@ jobs: run: | # Lowercase Repository REPO_LOWER=$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]') - + RAW_VERSION="${{ steps.set_output.outputs.version }}" VERSION_LOWER=$(echo "$RAW_VERSION" | tr '[:upper:]' '[:lower:]') - + echo "repo=$REPO_LOWER" >> $GITHUB_OUTPUT echo "version=$VERSION_LOWER" >> $GITHUB_OUTPUT @@ -120,15 +95,14 @@ jobs: git.demonkernel.io.vn/${{ steps.meta.outputs.repo }}:${{ steps.meta.outputs.version }} - name: Commit & Push Changes - if: gitea.ref == 'refs/heads/main' run: | - if [ -n "$(git status --porcelain)" ]; then + if [ -n "$(git status --porcelain)" ]&& [ "${{ github.ref_name }}" = "main" ]; then git config --global user.name "gitea-actions" git config --global user.email "actions-user@noreply.git.demonkernel.io.vn" REPO_NAME="${{ gitea.repository }}" - git remote set-url origin ssh://git@$TARGET_IP:222/${REPO_NAME}.git + git remote set-url origin ssh://git@vps.demonkernel.io.vn/${REPO_NAME}.git git rm -r --cached . git add . @@ -136,4 +110,3 @@ jobs: git push fi - diff --git a/README.md b/README.md index c355a6e..209acc0 100644 --- a/README.md +++ b/README.md @@ -67,15 +67,13 @@ Dành cho khách hàng: Dành cho quản lý: -- Sidebar desktop: Brand, tab navigation (Thực đơn / Combo / Danh mục), link tới - Analytics +- Sidebar desktop: Brand, tab navigation (Thực đơn / Combo / Danh mục), link tới Analytics - CRUD sản phẩm, combo, danh mục qua modals - Auth guard: tự động redirect non-manager về `/` #### 9. **Trang Phân Tích Tài Chính** (`app/(manager)/manager/analytics`) -- Summary cards: Doanh thu, đơn hàng, lợi nhuận, giá trị đơn trung bình (so sánh - kỳ trước) +- Summary cards: Doanh thu, đơn hàng, lợi nhuận, giá trị đơn trung bình (so sánh kỳ trước) - Bộ chọn kỳ: Ngày / Tuần / Tháng / Năm - Biểu đồ SVG thuần: Line, Bar, Pie — hover tooltips tương tác - Bảng top 5 sản phẩm và bảng chi tiết có thể sắp xếp @@ -198,18 +196,18 @@ frondend/ ## 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.2.2 | Utility-first CSS framework | -| Geist Font | - | Font chữ (Google Fonts via next/font) | -| FontAwesome | 6.7.2 | Icon library (CDN) | -| pnpm | - | Package manager | -| ESLint | ^9 | Linting | -| Prettier | ^3 | Code formatting | -| semantic-release | ^25 | Automated versioning & release | +| 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.2.2 | Utility-first CSS framework | +| Geist Font | - | Font chữ (Google Fonts via next/font) | +| FontAwesome | 6.7.2 | Icon library (CDN) | +| pnpm | - | Package manager | +| ESLint | ^9 | Linting | +| Prettier | ^3 | Code formatting | +| semantic-release | ^25 | Automated versioning & release | --- @@ -227,11 +225,11 @@ frondend/ ### Tài Khoản Demo -| Loại tài khoản | Tên đăng nhập | Mật khẩu | -| -------------- | ------------- | ------------- | -| Manager | admin | admin | -| Staff | Nguyễn Văn An | Nguyễn Văn An | -| Customer | 0987654321 | user1 | +| Loại tài khoản | Tên đăng nhập | Mật khẩu | +| -------------- | -------------- | -------------- | +| Manager | admin | admin | +| Staff | Nguyễn Văn An | Nguyễn Văn An | +| Customer | 0987654321 | user1 | ### Design & Styling @@ -245,18 +243,14 @@ frondend/ Dự án tuân theo **Atomic Design** pattern — chi tiết tại `Atomic.md`: - **Atoms** - Nguyên tố cơ bản: Button, Input, Badge, Text, Heading, Divider -- **Molecules** - Nhóm atoms: ProductCard, ShopCard, SearchBar, - PaymentSummaryCard -- **Organisms** - Phần UI phức tạp: CategorySidebar, CartFab, ProductGrid, - ShopGrid, ReviewModal, analytics charts, manager tabs/modals -- **Templates** - Bố cục trang: MainLayout, AuthLayout, FeedLayout, - ManagerLayout +- **Molecules** - Nhóm atoms: ProductCard, ShopCard, SearchBar, PaymentSummaryCard +- **Organisms** - Phần UI phức tạp: CategorySidebar, CartFab, ProductGrid, ShopGrid, ReviewModal, analytics charts, manager tabs/modals +- **Templates** - Bố cục trang: MainLayout, AuthLayout, FeedLayout, ManagerLayout ### Data & Integration - Mock data nằm trong `lib/constants.ts` -- Context providers trong `app/providers.tsx`: AuthProvider, MenuProvider, - CartProvider +- Context providers trong `app/providers.tsx`: AuthProvider, MenuProvider, CartProvider - ManagerProvider được thêm bởi `app/(manager)/layout.tsx` - Thay bằng API calls khi backend sẵn sàng - Ảnh sản phẩm: thêm vào `public/imgs/products/` diff --git a/app/(main)/login/page.tsx b/app/(main)/login/page.tsx index 9883080..b801294 100644 --- a/app/(main)/login/page.tsx +++ b/app/(main)/login/page.tsx @@ -1,7 +1,7 @@ "use client"; -import LoginForm from "@/components/organisms/forms/LoginForm"; import { SHOP_INFO } from "@/lib/constants"; +import LoginForm from "@/components/organisms/forms/LoginForm"; import Image from "next/image"; export default function LoginPage() { @@ -28,7 +28,7 @@ export default function LoginPage() { Đăng nhập vào hệ thống
- + {/* Login Form */}+ {view === "week" ? weekLabel : `${MONTH_NAMES[currentDate.getMonth()]} ${currentDate.getFullYear()}`} +
+