feat: regenerate tasks.md to align with corrected route structure
This commit is contained in:
19
AGENTS.md
Normal file
19
AGENTS.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# Repository Guidelines
|
||||
|
||||
## Project Structure & Module Organization
|
||||
This migration pairs an Astro frontend with a Payload CMS backend. Keep UI work in `frontend/src/components`, route files in `frontend/src/pages`, and shared helpers in `frontend/src/services` or `frontend/src/lib`. Backend collections, auth flows, and integrations belong in `backend/src`, with companion contract tests under `backend/tests`. Product specs, research, and data contracts stay versioned in `specs/001-users-pukpuk-dev/`; mirror that layout when adding new feature folders so planning artifacts remain traceable.
|
||||
|
||||
## Build, Test, and Development Commands
|
||||
Run `pnpm install` once per clone to sync dependencies. Use `pnpm dev` for the Astro dev server at http://localhost:4321 while Payload runs via the same workspace. Before pushing, execute `pnpm test:unit` (Vitest) and `pnpm test:e2e` (Playwright) to guard regressions; record failures with the scenario name. If a production bundle is required, run `pnpm build` and confirm the output passes Payload schema checks.
|
||||
|
||||
## Coding Style & Naming Conventions
|
||||
Author frontend code in TypeScript/TSX with strict typing enabled. Prefer `PascalCase` for Astro components, `camelCase` for variables and functions, and `kebab-case` for file names below `pages/`. Align UI tokens with the palette in `style-css.md` and keep CSS modules scoped. On the backend, name Payload collections with singular `PascalCase` and expose slugs in `kebab-case`. Lint with the workspace Prettier config once it lands, and guard formatted diffs in pull requests.
|
||||
|
||||
## Testing Guidelines
|
||||
Write Vitest suites beside the module under test (`*.spec.ts`) and focus on rendering logic or domain helpers. Playwright feature specs live in `frontend/tests/e2e/` and should mirror user flows from `specs/001-users-pukpuk-dev/spec.md`. Target meaningful coverage for auth, collection validation, and key marketing funnels. When introducing new endpoints, pair them with contract tests derived from `contracts/*.yaml`.
|
||||
|
||||
## Commit & Pull Request Guidelines
|
||||
Follow Conventional Commits as shown in `git log` (e.g., `feat: generate tasks.md for website migration`). Each PR should describe scope, link the corresponding spec or issue, and summarize manual or automated test results. Include screenshots or terminal captures for UX or CLI changes, note schema updates, and flag env variable additions.
|
||||
|
||||
## Security & Configuration Tips
|
||||
Store secrets in `.env` with `PAYLOAD_CMS_URL` and `PAYLOAD_CMS_API_KEY`; never commit the file. Rotate keys whenever staging or production data is refreshed and document rotations in the PR description. Validate that new integrations degrade gracefully when credentials are missing, and prefer typed accessors over reading directly from `process.env` within components.
|
||||
8
PRD.md
8
PRD.md
@@ -67,6 +67,7 @@ The application will feature a clear separation between public and protected rou
|
||||
* **Styling:** The project will use **Tailwind CSS**.
|
||||
* **Accessibility:** The site must adhere to WCAG 2.1 AA standards.
|
||||
* **Deployment:** The Astro frontend will be deployed on **Cloudflare Pages** in SSR (Server-Side Rendering) mode to support the authentication layer. The Payload CMS backend and serverless functions will run on **Cloudflare Workers**.
|
||||
* **Workspace Layout:** Monorepo managed with **pnpm** workspaces. Packages include `frontend/` (Astro), `backend/` (Payload CMS), and `packages/shared/` for cross-cutting TypeScript utilities.
|
||||
|
||||
**6. Technology Stack**
|
||||
|
||||
@@ -80,9 +81,10 @@ The application will feature a clear separation between public and protected rou
|
||||
**7. Migration Plan (High-Level)**
|
||||
|
||||
1. **Phase 1: Project Setup**
|
||||
* Initialize a new Astro project configured for SSR.
|
||||
* Set up Payload CMS for Cloudflare Workers.
|
||||
* Configure Tailwind CSS.
|
||||
* Initialize a pnpm workspace monorepo with `frontend/`, `backend/`, and `packages/shared/`.
|
||||
* Initialize a new Astro project configured for SSR inside `frontend/`.
|
||||
* Set up Payload CMS for Cloudflare Workers inside `backend/`.
|
||||
* Configure Tailwind CSS and shared TypeScript utilities in `packages/shared/`.
|
||||
2. **Phase 2: Authentication & CMS Setup**
|
||||
* Integrate `astro-auth` and configure the login flow.
|
||||
* Define the collections and user roles (`admin`, `editor`) within Payload.
|
||||
|
||||
3
backend/README.md
Normal file
3
backend/README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Backend (Payload CMS)
|
||||
|
||||
This package contains the Payload CMS instance, including collections, access control, and the admin UI configuration.
|
||||
@@ -1,114 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-TW">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>恩群數位網站地圖</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
||||
line-height: 1.6;
|
||||
max-width: 800px;
|
||||
margin: 0 auto;
|
||||
padding: 20px;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
.container {
|
||||
background: white;
|
||||
padding: 30px;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
|
||||
}
|
||||
h1 {
|
||||
color: #333;
|
||||
border-bottom: 3px solid #007bff;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
ul {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
li {
|
||||
margin: 8px 0;
|
||||
padding: 5px 0;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
a {
|
||||
color: #007bff;
|
||||
text-decoration: none;
|
||||
display: block;
|
||||
padding: 8px;
|
||||
border-radius: 4px;
|
||||
transition: background-color 0.2s;
|
||||
}
|
||||
a:hover {
|
||||
background-color: #f8f9fa;
|
||||
text-decoration: underline;
|
||||
}
|
||||
.url-text {
|
||||
font-family: monospace;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1>恩群數位網站地圖</h1>
|
||||
<ul>
|
||||
<li><a href="https://enchun.tw" target="_blank" class="url-text">https://enchun.tw</a></li>
|
||||
<li><a href="https://enchun.tw/about-enchun" target="_blank" class="url-text">https://enchun.tw/about-enchun</a></li>
|
||||
<li><a href="https://enchun.tw/contact-us" target="_blank" class="url-text">https://enchun.tw/contact-us</a></li>
|
||||
<li><a href="https://enchun.tw/marketing-solutions" target="_blank" class="url-text">https://enchun.tw/marketing-solutions</a></li>
|
||||
<li><a href="https://enchun.tw/news" target="_blank" class="url-text">https://enchun.tw/news</a></li>
|
||||
<li><a href="https://enchun.tw/teams" target="_blank" class="url-text">https://enchun.tw/teams</a></li>
|
||||
<li><a href="https://enchun.tw/checkout" target="_blank" class="url-text">https://enchun.tw/checkout</a></li>
|
||||
<li><a href="https://enchun.tw/paypal-checkout" target="_blank" class="url-text">https://enchun.tw/paypal-checkout</a></li>
|
||||
<li><a href="https://enchun.tw/order-confirmation" target="_blank" class="url-text">https://enchun.tw/order-confirmation</a></li>
|
||||
<li><a href="https://enchun.tw/marketingclass" target="_blank" class="url-text">https://enchun.tw/marketingclass</a></li>
|
||||
<li><a href="https://enchun.tw/website-portfolio" target="_blank" class="url-text">https://enchun.tw/website-portfolio</a></li>
|
||||
<li><a href="https://enchun.tw/rte" target="_blank" class="url-text">https://enchun.tw/rte</a></li>
|
||||
<li><a href="https://enchun.tw/xing-xiao-fang-da-jing/2-zhao-yao-kong-xiao-fei-zhe-de-xin" target="_blank" class="url-text">https://enchun.tw/xing-xiao-fang-da-jing/2-zhao-yao-kong-xiao-fei-zhe-de-xin</a></li>
|
||||
<li><a href="https://enchun.tw/xing-xiao-fang-da-jing/2022-jie-qing-xing-xiao-quan-gong-lue" target="_blank" class="url-text">https://enchun.tw/xing-xiao-fang-da-jing/2022-jie-qing-xing-xiao-quan-gong-lue</a></li>
|
||||
<li><a href="https://enchun.tw/xing-xiao-fang-da-jing/2022zuixin-google" target="_blank" class="url-text">https://enchun.tw/xing-xiao-fang-da-jing/2022zuixin-google</a></li>
|
||||
<li><a href="https://enchun.tw/xing-xiao-fang-da-jing/2024googleshang" target="_blank" class="url-text">https://enchun.tw/xing-xiao-fang-da-jing/2024googleshang</a></li>
|
||||
<li><a href="https://enchun.tw/xing-xiao-fang-da-jing/2025huan" target="_blank" class="url-text">https://enchun.tw/xing-xiao-fang-da-jing/2025huan</a></li>
|
||||
<li><a href="https://enchun.tw/xing-xiao-fang-da-jing/2025xingxiaozhishi" target="_blank" class="url-text">https://enchun.tw/xing-xiao-fang-da-jing/2025xingxiaozhishi</a></li>
|
||||
<li><a href="https://enchun.tw/xing-xiao-fang-da-jing/bu-cang-si-da-gong-kai" target="_blank" class="url-text">https://enchun.tw/xing-xiao-fang-da-jing/bu-cang-si-da-gong-kai</a></li>
|
||||
<li><a href="https://enchun.tw/xing-xiao-fang-da-jing/da-sheng-ji" target="_blank" class="url-text">https://enchun.tw/xing-xiao-fang-da-jing/da-sheng-ji</a></li>
|
||||
<li><a href="https://enchun.tw/xing-xiao-fang-da-jing/en-qun-shu-wei-x-google-xiao-xue-tang" target="_blank" class="url-text">https://enchun.tw/xing-xiao-fang-da-jing/en-qun-shu-wei-x-google-xiao-xue-tang</a></li>
|
||||
<li><a href="https://enchun.tw/xing-xiao-fang-da-jing/en-qun-shu-wei-x-google-xiao-xue-tang-5" target="_blank" class="url-text">https://enchun.tw/xing-xiao-fang-da-jing/en-qun-shu-wei-x-google-xiao-xue-tang-5</a></li>
|
||||
<li><a href="https://enchun.tw/xing-xiao-fang-da-jing/en-qun-shu-wei-x-lian-shu-xiao-xue-tang" target="_blank" class="url-text">https://enchun.tw/xing-xiao-fang-da-jing/en-qun-shu-wei-x-lian-shu-xiao-xue-tang</a></li>
|
||||
<li><a href="https://enchun.tw/xing-xiao-fang-da-jing/en-qun-shu-wei-x-metaverse" target="_blank" class="url-text">https://enchun.tw/xing-xiao-fang-da-jing/en-qun-shu-wei-x-metaverse</a></li>
|
||||
<li><a href="https://enchun.tw/xing-xiao-fang-da-jing/en-qun-shu-wei-x-metaverse-bai-hua-wen" target="_blank" class="url-text">https://enchun.tw/xing-xiao-fang-da-jing/en-qun-shu-wei-x-metaverse-bai-hua-wen</a></li>
|
||||
<li><a href="https://enchun.tw/xing-xiao-fang-da-jing/facebook-mjing-yin" target="_blank" class="url-text">https://enchun.tw/xing-xiao-fang-da-jing/facebook-mjing-yin</a></li>
|
||||
<li><a href="https://enchun.tw/xing-xiao-fang-da-jing/faceookshequz" target="_blank" class="url-text">https://enchun.tw/xing-xiao-fang-da-jing/faceookshequz</a></li>
|
||||
<li><a href="https://enchun.tw/xing-xiao-fang-da-jing/fu-ping-ye-shi-yi-zhong-shang-ji" target="_blank" class="url-text">https://enchun.tw/xing-xiao-fang-da-jing/fu-ping-ye-shi-yi-zhong-shang-ji</a></li>
|
||||
<li><a href="https://enchun.tw/xing-xiao-fang-da-jing/google-comment-delete" target="_blank" class="url-text">https://enchun.tw/xing-xiao-fang-da-jing/google-comment-delete</a></li>
|
||||
<li><a href="https://enchun.tw/xing-xiao-fang-da-jing/googlecomment" target="_blank" class="url-text">https://enchun.tw/xing-xiao-fang-da-jing/googlecomment</a></li>
|
||||
<li><a href="https://enchun.tw/xing-xiao-fang-da-jing/googlemybusiness-optimization" target="_blank" class="url-text">https://enchun.tw/xing-xiao-fang-da-jing/googlemybusiness-optimization</a></li>
|
||||
<li><a href="https://enchun.tw/xing-xiao-fang-da-jing/googleping" target="_blank" class="url-text">https://enchun.tw/xing-xiao-fang-da-jing/googleping</a></li>
|
||||
<li><a href="https://enchun.tw/xing-xiao-fang-da-jing/hu-nian-ji-xiang-hua-5" target="_blank" class="url-text">https://enchun.tw/xing-xiao-fang-da-jing/hu-nian-ji-xiang-hua-5</a></li>
|
||||
<li><a href="https://enchun.tw/xing-xiao-fang-da-jing/issue-with-gmb-verification" target="_blank" class="url-text">https://enchun.tw/xing-xiao-fang-da-jing/issue-with-gmb-verification</a></li>
|
||||
<li><a href="https://enchun.tw/xing-xiao-fang-da-jing/ni-de-huang-jin-di-duan-zu-chuan-mi-fang-jiu-bu-xu-yao-wang-lu-xing-xiao-liao-ma-a" target="_blank" class="url-text">https://enchun.tw/xing-xiao-fang-da-jing/ni-de-huang-jin-di-duan-zu-chuan-mi-fang-jiu-bu-xu-yao-wang-lu-xing-xiao-liao-ma-a</a></li>
|
||||
<li><a href="https://enchun.tw/xing-xiao-fang-da-jing/ni-xin-ma-ni-xian-zai-kan-de-zhe-pian-wen-jia-zhi-2500-wan-tai-bi-5" target="_blank" class="url-text">https://enchun.tw/xing-xiao-fang-da-jing/ni-xin-ma-ni-xian-zai-kan-de-zhe-pian-wen-jia-zhi-2500-wan-tai-bi-5</a></li>
|
||||
<li><a href="https://enchun.tw/xing-xiao-fang-da-jing/optimize-gmb-for-local-seo" target="_blank" class="url-text">https://enchun.tw/xing-xiao-fang-da-jing/optimize-gmb-for-local-seo</a></li>
|
||||
<li><a href="https://enchun.tw/xing-xiao-fang-da-jing/paiming" target="_blank" class="url-text">https://enchun.tw/xing-xiao-fang-da-jing/paiming</a></li>
|
||||
<li><a href="https://enchun.tw/xing-xiao-fang-da-jing/shang-jia-guan-jian-zi" target="_blank" class="url-text">https://enchun.tw/xing-xiao-fang-da-jing/shang-jia-guan-jian-zi</a></li>
|
||||
<li><a href="https://enchun.tw/xing-xiao-fang-da-jing/shang-jia-jing-ying-mi-ji" target="_blank" class="url-text">https://enchun.tw/xing-xiao-fang-da-jing/shang-jia-jing-ying-mi-ji</a></li>
|
||||
<li><a href="https://enchun.tw/xing-xiao-fang-da-jing/shitidianjia" target="_blank" class="url-text">https://enchun.tw/xing-xiao-fang-da-jing/shitidianjia</a></li>
|
||||
<li><a href="https://enchun.tw/xing-xiao-fang-da-jing/storytelling" target="_blank" class="url-text">https://enchun.tw/xing-xiao-fang-da-jing/storytelling</a></li>
|
||||
<li><a href="https://enchun.tw/xing-xiao-fang-da-jing/xi-jing-biao-ti-de-5-ge-jue-qiao-7" target="_blank" class="url-text">https://enchun.tw/xing-xiao-fang-da-jing/xi-jing-biao-ti-de-5-ge-jue-qiao-7</a></li>
|
||||
<li><a href="https://enchun.tw/xing-xiao-fang-da-jing/xiugai-google" target="_blank" class="url-text">https://enchun.tw/xing-xiao-fang-da-jing/xiugai-google</a></li>
|
||||
<li><a href="https://enchun.tw/xing-xiao-fang-da-jing/zheng-que-de-hashtag-dai-ni-shang-tian-tang" target="_blank" class="url-text">https://enchun.tw/xing-xiao-fang-da-jing/zheng-que-de-hashtag-dai-ni-shang-tian-tang</a></li>
|
||||
<li><a href="https://enchun.tw/wen-zhang-fen-lei/en-qun-shu-wei-zui-xin-gong-gao" target="_blank" class="url-text">https://enchun.tw/wen-zhang-fen-lei/en-qun-shu-wei-zui-xin-gong-gao</a></li>
|
||||
<li><a href="https://enchun.tw/wen-zhang-fen-lei/google-xiao-xue-tang" target="_blank" class="url-text">https://enchun.tw/wen-zhang-fen-lei/google-xiao-xue-tang</a></li>
|
||||
<li><a href="https://enchun.tw/wen-zhang-fen-lei/meta-xiao-xue-tang" target="_blank" class="url-text">https://enchun.tw/wen-zhang-fen-lei/meta-xiao-xue-tang</a></li>
|
||||
<li><a href="https://enchun.tw/wen-zhang-fen-lei/xing-xiao-shi-shi-zui-qian-xian" target="_blank" class="url-text">https://enchun.tw/wen-zhang-fen-lei/xing-xiao-shi-shi-zui-qian-xian</a></li>
|
||||
<li><a href="https://enchun.tw/webdesign-profolio/web-design-project-2" target="_blank" class="url-text">https://enchun.tw/webdesign-profolio/web-design-project-2</a></li>
|
||||
<li><a href="https://enchun.tw/webdesign-profolio/web-design-project-3" target="_blank" class="url-text">https://enchun.tw/webdesign-profolio/web-design-project-3</a></li>
|
||||
<li><a href="https://enchun.tw/webdesign-profolio/web-design-project-4" target="_blank" class="url-text">https://enchun.tw/webdesign-profolio/web-design-project-4</a></li>
|
||||
<li><a href="https://enchun.tw/webdesign-profolio/web-design-project-5" target="_blank" class="url-text">https://enchun.tw/webdesign-profolio/web-design-project-5</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,53 +0,0 @@
|
||||
https://enchun.tw
|
||||
https://enchun.tw/about-enchun
|
||||
https://enchun.tw/contact-us
|
||||
https://enchun.tw/marketing-solutions
|
||||
https://enchun.tw/news
|
||||
https://enchun.tw/teams
|
||||
https://enchun.tw/checkout
|
||||
https://enchun.tw/paypal-checkout
|
||||
https://enchun.tw/order-confirmation
|
||||
https://enchun.tw/marketingclass
|
||||
https://enchun.tw/website-portfolio
|
||||
https://enchun.tw/rte
|
||||
https://enchun.tw/xing-xiao-fang-da-jing/2-zhao-yao-kong-xiao-fei-zhe-de-xin
|
||||
https://enchun.tw/xing-xiao-fang-da-jing/2022-jie-qing-xing-xiao-quan-gong-lue
|
||||
https://enchun.tw/xing-xiao-fang-da-jing/2022zuixin-google
|
||||
https://enchun.tw/xing-xiao-fang-da-jing/2024googleshang
|
||||
https://enchun.tw/xing-xiao-fang-da-jing/2025huan
|
||||
https://enchun.tw/xing-xiao-fang-da-jing/2025xingxiaozhishi
|
||||
https://enchun.tw/xing-xiao-fang-da-jing/bu-cang-si-da-gong-kai
|
||||
https://enchun.tw/xing-xiao-fang-da-jing/da-sheng-ji
|
||||
https://enchun.tw/xing-xiao-fang-da-jing/en-qun-shu-wei-x-google-xiao-xue-tang
|
||||
https://enchun.tw/xing-xiao-fang-da-jing/en-qun-shu-wei-x-google-xiao-xue-tang-5
|
||||
https://enchun.tw/xing-xiao-fang-da-jing/en-qun-shu-wei-x-lian-shu-xiao-xue-tang
|
||||
https://enchun.tw/xing-xiao-fang-da-jing/en-qun-shu-wei-x-metaverse
|
||||
https://enchun.tw/xing-xiao-fang-da-jing/en-qun-shu-wei-x-metaverse-bai-hua-wen
|
||||
https://enchun.tw/xing-xiao-fang-da-jing/facebook-mjing-yin
|
||||
https://enchun.tw/xing-xiao-fang-da-jing/faceookshequz
|
||||
https://enchun.tw/xing-xiao-fang-da-jing/fu-ping-ye-shi-yi-zhong-shang-ji
|
||||
https://enchun.tw/xing-xiao-fang-da-jing/google-comment-delete
|
||||
https://enchun.tw/xing-xiao-fang-da-jing/googlecomment
|
||||
https://enchun.tw/xing-xiao-fang-da-jing/googlemybusiness-optimization
|
||||
https://enchun.tw/xing-xiao-fang-da-jing/googleping
|
||||
https://enchun.tw/xing-xiao-fang-da-jing/hu-nian-ji-xiang-hua-5
|
||||
https://enchun.tw/xing-xiao-fang-da-jing/issue-with-gmb-verification
|
||||
https://enchun.tw/xing-xiao-fang-da-jing/ni-de-huang-jin-di-duan-zu-chuan-mi-fang-jiu-bu-xu-yao-wang-lu-xing-xiao-liao-ma-a
|
||||
https://enchun.tw/xing-xiao-fang-da-jing/ni-xin-ma-ni-xian-zai-kan-de-zhe-pian-wen-jia-zhi-2500-wan-tai-bi-5
|
||||
https://enchun.tw/xing-xiao-fang-da-jing/optimize-gmb-for-local-seo
|
||||
https://enchun.tw/xing-xiao-fang-da-jing/paiming
|
||||
https://enchun.tw/xing-xiao-fang-da-jing/shang-jia-guan-jian-zi
|
||||
https://enchun.tw/xing-xiao-fang-da-jing/shang-jia-jing-ying-mi-ji
|
||||
https://enchun.tw/xing-xiao-fang-da-jing/shitidianjia
|
||||
https://enchun.tw/xing-xiao-fang-da-jing/storytelling
|
||||
https://enchun.tw/xing-xiao-fang-da-jing/xi-jing-biao-ti-de-5-ge-jue-qiao-7
|
||||
https://enchun.tw/xing-xiao-fang-da-jing/xiugai-google
|
||||
https://enchun.tw/xing-xiao-fang-da-jing/zheng-que-de-hashtag-dai-ni-shang-tian-tang
|
||||
https://enchun.tw/wen-zhang-fen-lei/en-qun-shu-wei-zui-xin-gong-gao
|
||||
https://enchun.tw/wen-zhang-fen-lei/google-xiao-xue-tang
|
||||
https://enchun.tw/wen-zhang-fen-lei/meta-xiao-xue-tang
|
||||
https://enchun.tw/wen-zhang-fen-lei/xing-xiao-shi-shi-zui-qian-xian
|
||||
https://enchun.tw/webdesign-profolio/web-design-project-2
|
||||
https://enchun.tw/webdesign-profolio/web-design-project-3
|
||||
https://enchun.tw/webdesign-profolio/web-design-project-4
|
||||
https://enchun.tw/webdesign-profolio/web-design-project-5
|
||||
3
frontend/README.md
Normal file
3
frontend/README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Frontend (Astro)
|
||||
|
||||
This package hosts the Astro application for enchun.tw. Use `pnpm dev` to run the site locally once dependencies are installed at the workspace root.
|
||||
7
notepad.md
Normal file
7
notepad.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# Notepad
|
||||
|
||||
This is a scratchpad for our development notes, progress tracking, and any temporary code snippets.
|
||||
|
||||
## Next Steps
|
||||
|
||||
- Begin executing the tasks outlined in `specs/001-users-pukpuk-dev/tasks.md`.
|
||||
BIN
packages/.DS_Store
vendored
Normal file
BIN
packages/.DS_Store
vendored
Normal file
Binary file not shown.
3
packages/shared/README.md
Normal file
3
packages/shared/README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Shared Modules
|
||||
|
||||
Common TypeScript utilities, schema definitions, and design tokens shared between the Astro frontend and Payload backend live here.
|
||||
4
pnpm-workspace.yaml
Normal file
4
pnpm-workspace.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
packages:
|
||||
- frontend
|
||||
- backend
|
||||
- packages/*
|
||||
57
route-structure.md
Normal file
57
route-structure.md
Normal file
@@ -0,0 +1,57 @@
|
||||
# Target File Structure (Revised)
|
||||
|
||||
```
|
||||
/
|
||||
├── backend/ # Payload CMS (Structure remains the same)
|
||||
│ ├── src/
|
||||
│ │ ├── collections/
|
||||
│ │ │ ├── BlogPosts.ts # Corresponds to /xing-xiao-fang-da-jing
|
||||
│ │ │ ├── Categories.ts # Corresponds to /wen-zhang-fen-lei
|
||||
│ │ │ ├── PortfolioItems.ts # Corresponds to /webdesign-profolio
|
||||
│ │ │ └── Users.ts
|
||||
│ │ ├── payload.config.ts
|
||||
│ │ └── server.ts
|
||||
│ └── package.json
|
||||
│
|
||||
└── frontend/ # Astro
|
||||
├── public/
|
||||
│ ├── favicon.svg
|
||||
│ └── sitemap.xml
|
||||
├── src/
|
||||
│ ├── components/
|
||||
│ │ # (Components for each page will be created as needed)
|
||||
│ │ ├── Header.astro
|
||||
│ │ └── Footer.astro
|
||||
│ ├── layouts/
|
||||
│ │ ├── Layout.astro
|
||||
│ │ └── AdminLayout.astro
|
||||
│ ├── pages/
|
||||
│ │ ├── about-enchun.astro # Route: /about-enchun
|
||||
│ │ ├── contact-us.astro # Route: /contact-us
|
||||
│ │ ├── marketing-solutions.astro # Route: /marketing-solutions
|
||||
│ │ ├── news.astro # Route: /news (Blog Listing)
|
||||
│ │ ├── teams.astro # Route: /teams
|
||||
│ │ ├── marketingclass.astro # Route: /marketingclass
|
||||
│ │ ├── website-portfolio.astro # Route: /website-portfolio (Portfolio Listing)
|
||||
│ │ │
|
||||
│ │ ├── xing-xiao-fang-da-jing/
|
||||
│ │ │ └── [slug].astro # Dynamic Route: /xing-xiao-fang-da-jing/...
|
||||
│ │ │
|
||||
│ │ ├── wen-zhang-fen-lei/
|
||||
│ │ │ └── [slug].astro # Dynamic Route: /wen-zhang-fen-lei/...
|
||||
│ │ │
|
||||
│ │ ├── webdesign-profolio/
|
||||
│ │ │ └── [slug].astro # Dynamic Route: /webdesign-profolio/...
|
||||
│ │ │
|
||||
│ │ ├── admin/
|
||||
│ │ │ ├── login.astro # Route: /admin/login
|
||||
│ │ │ └── cms.astro # Secure Route: /admin/cms
|
||||
│ │ │
|
||||
│ │ │
|
||||
│ │ └── index.astro # Route: /
|
||||
│ │
|
||||
│ ├── services/
|
||||
│ │ └── payload.ts
|
||||
│ └── middleware.ts
|
||||
└── package.json
|
||||
```
|
||||
BIN
specs/.DS_Store
vendored
BIN
specs/.DS_Store
vendored
Binary file not shown.
@@ -1,9 +1,9 @@
|
||||
# Tasks for Website Migration
|
||||
# Tasks for Website Migration (Revised)
|
||||
|
||||
**Feature**: Website Migration to Astro with Payload CMS
|
||||
**Branch**: `001-users-pukpuk-dev`
|
||||
|
||||
This document outlines the tasks required to complete the feature.
|
||||
This document has been updated to reflect the corrected route structure from the sitemap.
|
||||
|
||||
---
|
||||
|
||||
@@ -17,37 +17,50 @@ This document outlines the tasks required to complete the feature.
|
||||
## Phase 2: Backend Development (Payload CMS)
|
||||
|
||||
- **T005**: **[P]** Create the `Users` collection in Payload CMS, as defined in `data-model.md`.
|
||||
- **T006**: **[P]** Create the `Blog Posts` collection in Payload CMS, as defined in `data-model.md`.
|
||||
- **T007**: **[P]** Create the `Portfolio Items` collection in Payload CMS, as defined in `data-model.md`.
|
||||
- **T008**: **[P]** Create the `Categories` collection in Payload CMS, as defined in `data-model.md`.
|
||||
- **T009**: Configure role-based access control for `admin` and `editor` roles.
|
||||
- **T010**: Implement the authentication logic using `better-auth`.
|
||||
- **T006**: **[P]** Create the `BlogPosts` collection in Payload CMS, corresponding to `/xing-xiao-fang-da-jing`.
|
||||
- **T007**: **[P]** Create the `PortfolioItems` collection in Payload CMS, corresponding to `/webdesign-profolio`.
|
||||
- **T008**: **[P]** Create the `Categories` collection in Payload CMS, corresponding to `/wen-zhang-fen-lei`.
|
||||
- **T009**: Configure role-based access control for `admin` and `editor` roles in Payload.
|
||||
- **T010**: Implement the authentication logic and API endpoint using `better-auth`.
|
||||
|
||||
## Phase 3: Frontend Development (Astro)
|
||||
|
||||
- **T011**: **[P]** Create the main layout for the website, including the header and footer.
|
||||
- **T012**: **[P]** Create the blog listing page, fetching data from the Payload CMS.
|
||||
- **T013**: **[P]** Create the individual blog post page.
|
||||
- **T014**: **[P]** Create the portfolio listing page.
|
||||
- **T015**: **[P]** Create the individual portfolio item page.
|
||||
- **T016**: **[P]** Create the contact page with a functional contact form.
|
||||
- **T017**: Implement the login page.
|
||||
- **T018**: Implement protected routes for the `/admin` section.
|
||||
- **T011**: **[P]** Create the main site layout (`Layout.astro`) with `<Header>` and `<Footer>` components.
|
||||
- **T012**: **[P]** Create the secure admin layout (`AdminLayout.astro`).
|
||||
- **T013**: **[P]** Create the static page `frontend/src/pages/about-enchun.astro`.
|
||||
- **T014**: **[P]** Create the static page `frontend/src/pages/marketing-solutions.astro`.
|
||||
- **T015**: **[P]** Create the static page `frontend/src/pages/teams.astro`.
|
||||
- **T016**: **[P]** Create the static page `frontend/src/pages/marketingclass.astro`.
|
||||
- **T017**: **[P]** Create the contact page at `frontend/src/pages/contact-us.astro` with a functional form.
|
||||
- **T018**: Create the blog listing page at `frontend/src/pages/news.astro`, fetching data from Payload.
|
||||
- **T019**: Create the dynamic blog post page at `frontend/src/pages/xing-xiao-fang-da-jing/[slug].astro`.
|
||||
- **T020**: Create the portfolio listing page at `frontend/src/pages/website-portfolio.astro`.
|
||||
- **T021**: Create the dynamic portfolio item page at `frontend/src/pages/webdesign-profolio/[slug].astro`.
|
||||
- **T022**: Create the dynamic category page at `frontend/src/pages/wen-zhang-fen-lei/[slug].astro`.
|
||||
- **T023**: Implement the login page at `frontend/src/pages/admin/login.astro`.
|
||||
- **T024**: Implement the protected CMS view at `frontend/src/pages/admin/cms.astro`.
|
||||
- **T025**: Implement the authentication check in `frontend/src/middleware.ts`.
|
||||
|
||||
## Phase 4: Testing
|
||||
## Phase 4: E-Commerce (NEW SCOPE)
|
||||
|
||||
- **T019**: **[P]** Write contract tests for the `/admin/login` endpoint.
|
||||
- **T020**: **[P]** Write contract tests for the `/contact` endpoint.
|
||||
- **T021**: **[P]** Write integration tests for the user login flow.
|
||||
- **T022**: **[P]** Write integration tests for the contact form submission.
|
||||
- **T023**: **[P]** Write unit tests for the main Astro components.
|
||||
- **T026**: **(NEW SCOPE)** Create the page `frontend/src/pages/checkout.astro`.
|
||||
- **T027**: **(NEW SCOPE)** Create the page `frontend/src/pages/paypal-checkout.astro`.
|
||||
- **T028**: **(NEW SCOPE)** Create the page `frontend/src/pages/order-confirmation.astro`.
|
||||
|
||||
## Phase 5: Content Migration and Deployment
|
||||
## Phase 5: Testing
|
||||
|
||||
- **T024**: Write scripts to migrate content from the old site to the new Payload CMS.
|
||||
- **T025**: Implement 301 redirects for all old URLs.
|
||||
- **T026**: Configure the deployment pipeline to Cloudflare Pages.
|
||||
- **T027**: Perform a final performance and accessibility audit using Google Lighthouse.
|
||||
- **T029**: **[P]** Write contract tests for the `/admin/login` endpoint.
|
||||
- **T030**: **[P]** Write contract tests for the `/contact-us` endpoint.
|
||||
- **T031**: **[P]** Write integration tests for the user login and admin area access.
|
||||
- **T032**: **[P]** Write integration tests for the contact form submission.
|
||||
- **T033**: **[P]** Write unit tests for major Astro components.
|
||||
|
||||
## Phase 6: Content Migration and Deployment
|
||||
|
||||
- **T034**: Write scripts to migrate content from the old site to the new Payload CMS.
|
||||
- **T035**: Implement 301 redirects for all old URLs to their new equivalents.
|
||||
- **T036**: Configure the deployment pipeline to Cloudflare Pages.
|
||||
- **T037**: Perform a final performance and accessibility audit using Google Lighthouse.
|
||||
|
||||
---
|
||||
|
||||
@@ -64,20 +77,10 @@ gemini execute --task T008 &
|
||||
```
|
||||
|
||||
```bash
|
||||
# Frontend pages
|
||||
gemini execute --task T011 &
|
||||
gemini execute --task T012 &
|
||||
# Static frontend pages
|
||||
gemini execute --task T013 &
|
||||
gemini execute --task T014 &
|
||||
gemini execute --task T015 &
|
||||
gemini execute --task T016 &
|
||||
```
|
||||
|
||||
```bash
|
||||
# Tests
|
||||
gemini execute --task T019 &
|
||||
gemini execute --task T020 &
|
||||
gemini execute --task T021 &
|
||||
gemini execute --task T022 &
|
||||
gemini execute --task T023 &
|
||||
```
|
||||
gemini execute --task T017 &
|
||||
```
|
||||
Reference in New Issue
Block a user