🏠

Hor Home Plus

ร้านค้าออนไลน์ของตกแต่งบ้าน

E-commerce

Access URLs

💬Discord#web-horhomeplus

ข้อมูลทางเทคนิค

Directory

apps/horhomeplus

Schema

app_horhomeplus

Dev Port

3205

Type

E-commerce

Agent Rules (CLAUDE.md)

Hor Home Plus — AI Agent Scope Rules

This file defines the strict boundaries for any AI agent working on this app. Violations of these rules may break other websites in the monorepo.

Identity

  • App: Hor Home Plus (ร้านค้าออนไลน์ Hor Home Plus)
  • Directory: apps/horhomeplus/
  • Database Schema: app_horhomeplus
  • CMS Admin: /cms
  • Dev Port: 3205
  • Type: E-commerce (ใช้ @platform/cms-ecommerce)

Allowed Scope

You may ONLY modify files inside apps/horhomeplus/. Specifically:

apps/horhomeplus/src/app/          — Pages, layouts, routes
apps/horhomeplus/src/components/   — UI components
apps/horhomeplus/src/lib/          — Utilities, queries, types
apps/horhomeplus/src/payload/      — CMS collections and globals
apps/horhomeplus/public/           — Static assets (images, icons)
apps/horhomeplus/src/styles/       — CSS/Tailwind styles

Forbidden Actions

NEVER do any of the following:

  1. Modify files outside apps/horhomeplus/ — especially:

    • apps/bhwc/, apps/pollaphat/, apps/symmonyskin/
    • packages/cms-core/, packages/cms-theme/, packages/cms-ecommerce/
    • Root config files (pnpm-lock.yaml, turbo.json, tsconfig.json)
  2. Modify database configuration — never change:

    • schemaName in payload.config.ts
    • DATABASE_URI in .env.local
    • Any migration files that affect other schemas
  3. Modify payment processing logic — never change:

    • Payment gateway credentials or config
    • Order calculation logic (pricing, tax, shipping)
    • Payment callback/webhook handlers
    • ถ้าต้องแก้ pricing → แก้ผ่าน CMS Admin เท่านั้น
  4. Install/remove packages at root level — never run:

    • pnpm add at workspace root
    • pnpm remove at workspace root
  5. Push directly to main or develop — always use feature branches

  6. Delete data — never run destructive database operations

  7. Modify shared package types — never change anything in packages/

E-commerce Specific Rules

  • Product prices → change via CMS Admin (/cms), never in code
  • Order status → change via CMS Admin, never via scripts
  • Inventory → manage via CMS Admin
  • Payment settings → only admin can change, never via agent
  • Coupon/discount logic → comes from shared package, do not override

Safe Package Installation

# Correct — scoped to horhomeplus
pnpm --filter horhomeplus add <package-name>

# WRONG — affects entire monorepo
pnpm add <package-name>

Branch & Commit Convention

  • Branch: feat/horhomeplus-<topic> or fix/horhomeplus-<topic>
  • Commit: feat(horhomeplus): <summary> or fix(horhomeplus): <summary>
  • PR title: [horhomeplus] <summary>

Before Submitting a PR

  1. Run pnpm --filter horhomeplus build — must pass
  2. Verify no files outside apps/horhomeplus/ were modified
  3. Extra for e-commerce: Test checkout flow end-to-end if UI was changed
  4. Provide tunnel URL for team review
  5. List all changed files in PR description

CMS Data Management

  • Content/product changes → do through CMS Admin at /cms, not code
  • Schema changes → modify files in apps/horhomeplus/src/payload/
  • After schema changes → restart dev server to apply migrations

Cross-Site Change Request

If a task legitimately requires changes to shared packages:

  1. STOP — do not proceed
  2. Report to the team: "This task requires changes to shared code that affects all websites"
  3. Wait for explicit approval with cross-site-change: approved
  4. Only then proceed, with extra caution and testing of ALL affected apps