🟠

Pollaphat Marketing

เอเจนซี่การตลาดดิจิทัล

การตลาด

Access URLs

💬Discord#web-pollaphat

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

Directory

apps/pollaphat

Schema

app_pollaphat

Dev Port

3201

Type

การตลาด

Agent Rules (CLAUDE.md)

Pollaphat Marketing — 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: Pollaphat Marketing (เว็บ Pollaphat)
  • Directory: apps/pollaphat/
  • Database Schema: app_pollaphat
  • CMS Admin: /cms
  • Dev Port: 3201

Allowed Scope

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

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

Forbidden Actions

NEVER do any of the following:

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

    • apps/bhwc/, 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 Pollaphat only:

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

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

Branch & Commit Convention

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

Before Submitting a PR

  1. Run pnpm --filter pollaphat-website build — must pass
  2. Verify no files outside apps/pollaphat/ 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/pollaphat/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