Commit Graph

23 Commits

Author SHA1 Message Date
c0f7ad7458 fix(frontend): remove isomorphic-dompurify for Cloudflare Workers compatibility 2026-03-11 21:52:22 +08:00
cbe44ffd36 fix(frontend): add fallback for DOMPurify in Cloudflare Workers 2026-03-11 21:47:16 +08:00
acc23b13b6 fix(frontend): add ASSETS binding for worker assets 2026-03-11 21:42:52 +08:00
1d84107147 fix(frontend): add KV namespace to production env 2026-03-11 21:38:32 +08:00
f17523fd91 fix(frontend): add SESSION KV namespace binding
Required by @astrojs/cloudflare adapter for session persistence.
2026-03-11 21:37:35 +08:00
e7344fa7fe fix(frontend): disable Cloudflare KV session persistence
Session KV binding was causing deployment error. Since the project
doesn't use sessions, disable persistence to avoid the binding requirement.
2026-03-11 21:35:51 +08:00
b5a8e9a1e6 chore: 新增 .assetsignore 檔案以忽略 _worker.js 2026-03-11 21:31:53 +08:00
03760b23a5 chore(frontend): consolidate wrangler config to jsonc
- Remove redundant wrangler.toml (old Pages config)
- Rename worker from enchun-frontend to website-enchun-mgr
- Keep wrangler.jsonc as single source of truth
2026-03-11 18:48:13 +08:00
2e32d52133 Refactor frontend sections to use Tailwind CSS
Convert custom CSS styling to Tailwind utility classes across marketing
and about pages. Improve responsive layouts in feature grids, service
lists, and sliders. Consolidate section headers using the shared
SectionHeader component to maintain visual consistency.
2026-03-11 17:42:34 +08:00
df1efb4881 feat(contact): implement Turnstile protection via API proxy
- Add `pages/api/contact.ts` to proxy n8n webhook and verify Turnstile tokens.
- Update `contact-us.astro` form to include Turnstile widget and validation logic.
- Replace hardcoded sitekey with `PUBLIC_TURNSTILE_SITE_KEY` from environment variables.
- Update `dev.vars` to include Cloudflare Turnstile keys.
2026-03-01 14:06:44 +08:00
84b5a498e6 feat: Redesign the contact page by adding a contact image and updating the form layout and styling. 2026-03-01 12:51:36 +08:00
173905ecd3 Extract generic UI components
Reduces duplication across marketing pages by converting sections into
reusable components like CtaSection and HeaderBg. Consolidates styling
patterns to improve maintainability and consistency of the user interface.
2026-02-28 04:55:25 +08:00
b199f89998 Integrate CMS with Marketing Solutions page
Links the marketing solutions frontend page to the Payload CMS Pages
collection via the new API library. Removes legacy static portfolio
routes and components to consolidate marketing content. Enhances the
Header and Footer Astro components with improved responsive styling.
2026-02-27 20:05:43 +08:00
9c2181f743 feat(frontend): update pages, components and branding
Refresh Astro frontend implementation including new pages (Portfolio, Teams, Services), components, and styling updates.
2026-02-11 11:50:42 +08:00
7fd73e0e3d Implement Sprint 1 stories: collections, RBAC, audit logging, load testing
Complete 6 Sprint 1 stories for Epic 1 web migration infrastructure.

Portfolio Collection:
- Add 7 fields: title, slug, url, image, description, websiteType, tags
- Configure R2 storage and authenticated access control

Categories Collection:
- Add nameEn, order, textColor, backgroundColor fields
- Add color picker UI configuration

Posts Collection:
- Add excerpt with 200 char limit and ogImage for social sharing
- Add showInFooter checkbox and status select (draft/review/published)

Role-Based Access Control:
- Add role field to Users collection (admin/editor)
- Create adminOnly and authenticated access functions
- Apply access rules to Portfolio, Categories, Posts, Users collections

Audit Logging System (NFR9):
- Create Audit collection with timestamps for 90-day retention
- Add auditLogger utility for login/logout/content change tracking
- Add auditChange and auditGlobalChange hooks to all collections and globals
- Add cleanupAuditLogs job with 90-day retention policy

Load Testing Framework (NFR4):
- Add k6 load testing with 3 scripts: public-browsing, admin-operations, api-performance
- Configure targets: p95 < 500ms, error rate < 1%, 100 concurrent users
- Add verification script and comprehensive documentation

Other Changes:
- Remove unused Form blocks
- Add Header/Footer audit hooks
- Regenerate Payload TypeScript types
2026-01-31 17:20:35 +08:00
0846318d6e Complete Story 1-1 and fix TypeScript issues
Add TypeScript strict mode and typecheck tasks to monorepo infrastructure.
Fix E2E test @payload-config alias and frontend TypeScript errors.

- Add tsconfig.json to backend with strict mode and path aliases
- Add typecheck task to Turborepo and all packages
- Fix @payload-config alias for E2E tests and dev server
- Add setToken method to AuthService for middleware use
- Fix implicit any types in Footer.astro and Header.astro
- Remove invalid typescript config from astro.config.mjs
2026-01-31 17:12:47 +08:00
fdde6d8020 update pnpm-lock 2025-10-13 17:20:37 +08:00
4678e47a8b update r2 config for enchunCMS email adapter 2025-10-13 15:10:02 +08:00
65c27e3386 add cloudflare R2 config 2025-10-13 11:37:20 +08:00
pukpuk
8e8ff0bfc7 chore: fix gitignore pattern to exclude build artifacts
Update .gitignore to properly ignore dist directories at any level by
changing /dist to **/dist pattern. Also remove previously tracked
.astro/types.d.ts file which should not be in version control.

- Fix: Change /dist to **/dist to match nested dist directories
- Remove: apps/frontend/.astro/types.d.ts from tracking
- Ensures build artifacts are properly excluded across the project

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-07 16:18:37 +08:00
c2d4c8d0a0 chore(workflow): add AI-assisted workflow commands and configurations
Add comprehensive workflow commands for AI-assisted development:
- Claude commands: analyze, clarify, plan
- Kilocode workflows: full feature development lifecycle
- Opencode commands: specification and implementation workflows
- Roo MCP configuration for tool integration

Update .gitignore to exclude .astro build cache directories.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-07 01:06:10 +08:00
pukpuk
cf0f779ad4 feat: introduce spec-workflow and upgrade frontend dependencies
This commit introduces the spec-workflow, a set of templates for creating design, product, requirements, and other specification documents. These templates are added to both the root directory and the `apps/frontend` workspace.

Additionally, this commit upgrades the frontend development dependencies for the Astro application. The key changes include:
- Migration from `@astrojs/tailwind` to `@tailwindcss/vite` for Tailwind CSS integration.
- Deletion of the `postcss.config.cjs` file, as it is no longer needed with the new setup.
- Updates to `astro.config.mjs` to use the new Vite plugin for Tailwind CSS.
- General upgrade of Astro and other related dependencies in `apps/frontend/package.json` and the corresponding `pnpm-lock.yaml` file.
2025-10-06 12:35:06 +08:00
74677acf77 refactor: migrate to pnpm monorepo with Payload CMS backend and Astro frontend to support scalable website development and AI-assisted workflows 2025-09-25 03:36:26 +08:00