feat: regenerate tasks.md to align with corrected route structure

This commit is contained in:
2025-09-22 16:49:16 +08:00
parent b297dedf2c
commit e7747c1c3e
14 changed files with 143 additions and 209 deletions

View File

@@ -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 &
```