# COP + CMS Integration Plan

## Current Baseline

This repository (`cop-com-cms`) started empty.

On 2026-06-17 the initial project baseline was seeded from:

- `git@bitbucket.org:matheusyoshihara/ywd-cms.git`
- branch: `main`

The public frontend reference that still needs to be merged comes from:

- `git@bitbucket.org:matheusyoshihara/cop.git`
- branch: `paperclip`

## Findings

1. The destination repository was empty, so there was no existing implementation to preserve.
2. The `cop` repository `main` branch is only the default Bitbucket scaffold.
3. The usable COP landing-page implementation lives on `origin/paperclip` and is a React/Vite frontend.
4. The imported CMS baseline is a PHP/MySQL application with server-rendered frontend templates.
5. The imported CMS `README.md` references `scripts/pre-push-acceptance.sh`, but that script is not present on the imported `main` branch.

## Working Assumption

The shortest path is:

1. Keep `ywd-cms` as the application baseline in this repository.
2. Port the visual system and landing-page content from `cop` `paperclip` into the CMS frontend templates and public assets.
3. Preserve CMS admin/API behavior while replacing or extending the public-facing presentation layer.

## Recommended Workstreams

### 1. Baseline hardening

- Fix or remove stale validation references from the imported CMS docs.
- Run the smallest reproducible smoke validation for the PHP app.
- Confirm environment/bootstrap instructions against the actual tree.

### 2. Frontend extraction

- Extract design tokens, assets, content structure, and section behavior from `cop` `paperclip`.
- Decide what should become CMS-managed content versus static theme markup.

### 3. Theme integration

- Rebuild the CMS home page using the COP visual language.
- Migrate CSS/JS/assets into `public/assets/`.
- Wire forms and calls to action to the CMS or explicit placeholders.

## Immediate Risks

- There is no committed history yet in this destination repository.
- The frontend reference is React-based while the imported CMS frontend is PHP-rendered, so a direct copy is not the right merge strategy.
- Validation guidance in the imported docs is currently inconsistent with the actual tree.
