🏥

BHWC Clinic

คลินิกเวชกรรม BHWC

คลินิก

Access URLs

💻Local Devhttp://localhost:3202
🌐Productionhttps://bhwc.co.th
⚙️CMS Adminhttps://bhwc.co.th/cms
💬Discord#web-bhwc

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

Directory

apps/bhwc

Schema

app_bhwc

Dev Port

3202

Type

คลินิก

Agent Rules (CLAUDE.md)

BHWC Clinic — 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: BHWC Clinic (คลินิก BHWC)
  • Directory: apps/bhwc/
  • Database Schema: app_bhwc
  • CMS Admin: /cms
  • Dev Port: 3202

Allowed Scope

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

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

Forbidden Actions

NEVER do any of the following:

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

    • apps/pollaphat/, apps/symmonyskin/, apps/horhomeplus/
    • 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. Install/remove packages at root level — never run:

    • pnpm add at workspace root
    • pnpm remove at workspace root
    • Any command that modifies root pnpm-lock.yaml
  4. Push directly to main or develop — always use feature branches

  5. Delete data — never run destructive database operations:

    • DROP TABLE, DROP SCHEMA, DELETE FROM
    • Payload's deleteMany or deleteByID in scripts
  6. Modify shared package types — never change:

    • packages/cms-ecommerce/src/types.ts
    • packages/cms-core/src/index.ts

Safe Package Installation

If you need a new package for BHWC only:

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

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

Branch & Commit Convention

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

Before Submitting a PR

  1. Run pnpm --filter bhwc-website build — must pass
  2. Verify no files outside apps/bhwc/ were modified (git diff --name-only)
  3. Provide tunnel URL for team review
  4. List all changed files in PR description

CMS Data Management

  • Content changes (text, images) → do through CMS Admin at /cms, not code
  • Schema changes (new fields, collections) → modify files in apps/bhwc/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