From 567b81d74e78e6ed3dae5d80ef8c9621d580fdf3 Mon Sep 17 00:00:00 2001 From: ngqile Date: Wed, 2 Dec 2026 15:24:37 +0800 Subject: [PATCH] docs(pages): OpenSpec change add-landing-pages Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01EFUzfiCVCgCVJZq4NDEqZs --- .../changes/add-landing-pages/.openspec.yaml | 2 + openspec/changes/add-landing-pages/design.md | 31 +++ .../changes/add-landing-pages/proposal.md | 52 +++++ .../specs/admin-visual-design/spec.md | 31 +++ .../specs/event-attendance/spec.md | 38 ++++ .../specs/landing-pages/spec.md | 185 ++++++++++++++++++ openspec/changes/add-landing-pages/tasks.md | 110 +++++++++++ 7 files changed, 449 insertions(+) create mode 100644 openspec/changes/add-landing-pages/.openspec.yaml create mode 100644 openspec/changes/add-landing-pages/design.md create mode 100644 openspec/changes/add-landing-pages/proposal.md create mode 100644 openspec/changes/add-landing-pages/specs/admin-visual-design/spec.md create mode 100644 openspec/changes/add-landing-pages/specs/event-attendance/spec.md create mode 100644 openspec/changes/add-landing-pages/specs/landing-pages/spec.md create mode 100644 openspec/changes/add-landing-pages/tasks.md diff --git a/openspec/changes/add-landing-pages/.openspec.yaml b/openspec/changes/add-landing-pages/.openspec.yaml new file mode 100644 index 0000000..eb2b21e --- /dev/null +++ b/openspec/changes/add-landing-pages/.openspec.yaml @@ -0,0 +1,2 @@ +schema: spec-driven +created: 2026-12-02 diff --git a/openspec/changes/add-landing-pages/design.md b/openspec/changes/add-landing-pages/design.md new file mode 100644 index 0000000..718c9b3 --- /dev/null +++ b/openspec/changes/add-landing-pages/design.md @@ -0,0 +1,31 @@ +# Design: add-landing-pages + +The approved design is `docs/superpowers/specs/2026-12-02-landing-pages-design.md`, approved by the owner on 2026-12-02. This file records only the decisions that design leaves to the builder, and the places where this change refines it. + +## Decisions + +1. **Leads from a form always belong to an event** (owner, 2026-12-02). General enquiries go to a standing "enquiries" event per company. Leads without an event can follow after go-live. +2. **Company logo and accent colour** (owner, 2026-12-02). The QR, invitation and check-in pages keep their neutral look. +3. **Images live in MySQL** (`page_image`). They are PNG, JPEG or WebP, at most 2 MB each, and the type is checked by the file's magic bytes. `ponytail:` the ceiling is a few hundred images; past that, move them to object storage. +4. **The capture keeps the page address as text** (`page_path`, for example `/p/INS/hotel-technology`), not a page id. This refines the design, which said `page_id`. The address survives the page being deleted or its slug renamed, and needs no foreign key across services. +5. **UTM values show on the event lead detail only.** This narrows the design, which said "and the lead export". The export rule is "the columns on screen", and adding three UTM columns to the listing would crowd the phone layout. If marketing needs campaign columns in the export, a later change can add them. +6. **The tables live in services-counter, beside events and event leads.** The FORM block's company check and the registration both need event data there. Branding lives on `company` in services-system. +7. **Gateway rules:** + - The public reads open without a user token: a published page by company code and slug, an image by id, and company branding by code. + - Page writes and image uploads need the user token that mobile-api forwards. + - The web-form submit reuses the open `POST /counter/registration/register` and adds `source=WEB`. The open path does not change. + - Security code: read the whole diff. +8. **Sanitising has two layers:** + - A save refuses `script`, `on*` attributes and `javascript:` URLs, which gives authors clear errors. + - The public page sanitises with `sanitize-html` against an allow-list. This allow-list is the real guard. +9. **Sidebar:** Pages goes in the Events section, after Event leads. Event sign-ups are the main use. The `admin-visual-design` delta is written against the sidebar text in `add-zh-cn-messages`, so archive this change after that one. +10. **Draft preview:** `/pages/{id}/preview` in the admin shell, behind `BO_PAGES`, reuses the public renderer and shows a "Preview" banner. The public route never shows drafts. +11. **Super admin:** + - Creating a page needs a company. A super admin working in "All companies" picks one in the editor, as other create screens do. + - The list shows a Company column when the scope covers more than one company. + +## Risks + +- **Rich text is the main attack surface.** The allow-list sanitiser runs on the server render, and tests cover the known payloads. +- **Standing enquiry events appear in event lists and dashboards.** The deployment doc tells companies to name them clearly. +- **The two new portal dependencies add bundle size.** Tiptap loads only on the editor route. diff --git a/openspec/changes/add-landing-pages/proposal.md b/openspec/changes/add-landing-pages/proposal.md new file mode 100644 index 0000000..938c23c --- /dev/null +++ b/openspec/changes/add-landing-pages/proposal.md @@ -0,0 +1,52 @@ +## Why + +Marketing wants public pages, per company, that feed the lead pipeline: event sign-up pages and general enquiry pages. Today each such page would need a developer. The owner decided on 2026-12-02 to port babyboo's CMS page builder before go-live (2027-01-15). Design approved 2026-12-02: `docs/superpowers/specs/2026-12-02-landing-pages-design.md`. + +## What Changes + +- **Pages (`/pages`, new module `BO_PAGES`, granted to no role).** + - Staff build a page for their company from blocks: hero, rich text, image with text, FAQ and form. + - Each page is saved as a draft or published, previewed while it is a draft, and can be deleted. + - The page builder is ported from babyboo, without the product blocks and the custom form builder. +- **Public pages** at `/p//`: + - rendered on the server, with title and meta tags; + - the company logo and accent colour; + - HTML sanitised so it cannot run scripts. +- **Form block.** + - It registers the visitor for an event of the page's company, under the QR sign-up rules: consent, matching, interests and abuse limits. + - The source is "Web page", and the capture keeps the page address and the UTM tags. + - General enquiries use a standing "enquiries" event that the company creates. +- **A web sign-up is never an attendance.** Standing enquiry events are always running, so marking web sign-ups attended would count every enquiry as an attendance. +- **Page images** are uploaded by staff, stored in the database (PNG, JPEG or WebP, at most 2 MB each) and served publicly by id. +- **Company branding:** a logo and an accent colour per company, set on the Companies screen. +- **New portal dependencies:** Tiptap (rich-text editor, the same versions as babyboo) and `sanitize-html`. + +## Capabilities + +### New Capabilities + +- `landing-pages`: the page model and its validation, page images, company branding, the Pages screens, the public page and its form block. + +### Modified Capabilities + +- `event-attendance`: a web page sign-up does not set attendance, and the source shown includes "Web page". +- `admin-visual-design`: the Events section of the sidebar lists Pages. This delta is written against the sidebar text from `add-zh-cn-messages`, so this change archives after that one. + +## Impact + +- **services-counter:** + - `cms_page` and `page_image` tables with their services and endpoints; + - the event lead gets `page_path`, `utm_source`, `utm_medium` and `utm_campaign` columns, and the source value `WEB`; + - `RegistrationService` gets the WEB attendance and notes rules. +- **services-system:** `company.logo_image_id` and `company.accent_color`. +- **mobile-api:** + - `/api/admin/pages/**` and `/api/admin/page-images`; + - `/api/public/pages/**` (read, image, submit); + - the company endpoints carry the branding fields. +- **Gateway:** routes and token rules for the new counter paths. Security code: the whole diff is read. +- **Portal:** + - the Pages list and editor, and the public `/p/[company]/[slug]` page; + - the branding fields on Companies, and the event lead detail fields; + - `isPublicPath` covers `/p`. +- **SQL** (in this change's `sql/`, mirrored into `local/seed/`): the tables, columns and module. +- **Deployment doc:** the public hostname, the standing enquiry event, and the image ceiling. diff --git a/openspec/changes/add-landing-pages/specs/admin-visual-design/spec.md b/openspec/changes/add-landing-pages/specs/admin-visual-design/spec.md new file mode 100644 index 0000000..4ea1376 --- /dev/null +++ b/openspec/changes/add-landing-pages/specs/admin-visual-design/spec.md @@ -0,0 +1,31 @@ +## MODIFIED Requirements + +### Requirement: Sidebar Sections + +The sidebar SHALL show Dashboard first, then the labelled sections Events, Leads, Access and System, each with a fixed set and order of pages. A page not in any section SHALL appear in a final section without a label. A section SHALL be marked by a divider and a small muted label, with only the divider in the collapsed rail, and SHALL NOT show when it has no page the user may open. Every page SHALL have a distinct icon. + +#### Scenario: WhatsApp inbox in the Leads section + +- **WHEN** a user with `BO_WHATSAPP` and two unread conversations opens the portal +- **THEN** the Leads section lists Leads, WhatsApp and Interests, with a badge showing 2 + +#### Scenario: Super admin sidebar + +- **WHEN** a super admin opens the portal +- **THEN** the sidebar shows Dashboard, then "Events" with Events, Event leads and Pages, "Leads" with Leads, WhatsApp and Interests, "Access" with Users, Roles and Login security, and "System" with Companies, Emails, Audit log, Translations and Languages + +#### Scenario: Staff without admin pages + +- **WHEN** a staff user who can open only Events and Event leads opens the portal +- **THEN** the sidebar shows only the "Events" section +- **AND** no "Leads", "Access" or "System" label + +#### Scenario: Unknown page + +- **WHEN** the server menu has a page that is not in the category map +- **THEN** it is listed after the System section, without a label + +#### Scenario: Collapsed rail + +- **WHEN** an admin collapses the sidebar to the icon rail +- **THEN** the sections are separated by dividers and no section label shows diff --git a/openspec/changes/add-landing-pages/specs/event-attendance/spec.md b/openspec/changes/add-landing-pages/specs/event-attendance/spec.md new file mode 100644 index 0000000..0c943f6 --- /dev/null +++ b/openspec/changes/add-landing-pages/specs/event-attendance/spec.md @@ -0,0 +1,38 @@ +## MODIFIED Requirements + +### Requirement: Attendance at capture + +Each event lead SHALL have an attended time. A staff capture, a walk-in code registration or a check-in-page capture made during the event days SHALL set it. A registration made before the event days SHALL NOT set it. A web page sign-up SHALL NOT set it, whenever it is made. Event leads that exist before this change SHALL count as not attended. + +#### Scenario: Walk-in on the day + +- **GIVEN** today is the first day of `KL Expo` +- **WHEN** staff capture a visitor at the booth +- **THEN** the event lead is attended + +#### Scenario: Early QR registration + +- **GIVEN** `KL Expo` starts next week +- **WHEN** a visitor registers through the event's walk-in code +- **THEN** the event lead is registered but not attended + +#### Scenario: Web enquiry during a standing event + +- **GIVEN** the running event `INS website enquiries` +- **WHEN** a visitor submits the form on a landing page that points at it +- **THEN** the event lead is registered but not attended + +### Requirement: Attendance in staff screens + +Users who can edit event leads SHALL tick or untick Attended. The event leads listing SHALL show an Attended column and filter, and each event lead's source (Staff, QR, Invite, Web page). + +#### Scenario: Staff untick + +- **WHEN** staff untick Attended on an event lead linked to a guest +- **THEN** the guest list shows that guest as Registered + +#### Scenario: Web page source + +- **GIVEN** an event lead created by a landing-page form +- **WHEN** staff open the event leads listing +- **THEN** its source shows "Web page" diff --git a/openspec/changes/add-landing-pages/specs/landing-pages/spec.md b/openspec/changes/add-landing-pages/specs/landing-pages/spec.md new file mode 100644 index 0000000..e2e5f9b --- /dev/null +++ b/openspec/changes/add-landing-pages/specs/landing-pages/spec.md @@ -0,0 +1,185 @@ +## ADDED Requirements + +### Requirement: A Page Is An Ordered List Of Typed Blocks + +A page SHALL belong to one company and have a slug, a title, an optional meta description, a status (Draft or Published) and an ordered list of zero to 30 blocks. The block types SHALL be HERO, RICH_TEXT, IMAGE_TEXT, FAQ and FORM. Blocks SHALL be returned in the order they were saved, and a valid save SHALL replace all of a page's blocks. + +#### Scenario: Blocks read back in order + +- **WHEN** staff save page `hotel-technology` with blocks HERO, RICH_TEXT, FORM +- **THEN** reading the page returns those three blocks in that order with their fields + +#### Scenario: A save replaces the blocks + +- **GIVEN** a page whose blocks are HERO and FAQ +- **WHEN** it is saved with only a RICH_TEXT block +- **THEN** the page has only that RICH_TEXT block + +### Requirement: Page Fields Are Validated Server-Side + +A page save SHALL be refused with the offending field path, writing nothing, when the slug does not match `^[a-z0-9]+(-[a-z0-9]+)*$`, is longer than 80 characters or is used by another page of the same company, ignoring case; or when the title is blank or longer than 120 characters; or when the meta description is longer than 160 characters. + +#### Scenario: Duplicate slug in one company + +- **GIVEN** INS has a page `hotel-technology` +- **WHEN** INS staff save another page with slug `hotel-technology` +- **THEN** the save is refused on field `slug` + +#### Scenario: Same slug in two companies + +- **GIVEN** INS has a page `about` +- **WHEN** CV staff save a page with slug `about` +- **THEN** the save succeeds + +### Requirement: Block Fields Are Validated Server-Side + +A page save SHALL be refused with the offending field path, writing nothing, when a block has an unknown type, a required field is blank, or a text exceeds its limit: heading 120, text and FAQ question 300, button label 40, FAQ answer 2000, HTML 100000 characters. A FAQ SHALL have 1 to 30 items. `imagePosition` SHALL be LEFT or RIGHT. + +#### Scenario: Too many blocks + +- **WHEN** a page is saved with 31 blocks +- **THEN** the save is refused and nothing is written + +### Requirement: Block References Stay Inside The Company + +A block's image SHALL be an image of the page's company, and a FORM block's event SHALL be an event of the page's company. Otherwise the save SHALL be refused on that field. + +#### Scenario: Another company's event + +- **GIVEN** event `CV Roadshow` belongs to CV +- **WHEN** INS staff save a FORM block pointing at `CV Roadshow` +- **THEN** the save is refused on that block's event field + +### Requirement: Page Content Cannot Run Scripts + +A button SHALL have both a label and a link or neither. The link SHALL be a same-site path starting with a single `/`, an `https://` URL, a `mailto:` link or a `tel:` link. A save SHALL be refused when any HTML holds a `script` element, an `on*` attribute or a `javascript:` URL. The public page SHALL also sanitise all HTML against an allow-list before rendering it. + +#### Scenario: Script link on a button + +- **WHEN** a page is saved with a HERO button link `javascript:alert(1)` +- **THEN** the save is refused on field `blocks[0].buttonUrl` + +#### Scenario: Script in rich text + +- **WHEN** a page is saved with rich text holding `` +- **THEN** the save is refused on that block's HTML field + +### Requirement: Page Images + +Staff with `BO_PAGES` SHALL upload images for their company in PNG, JPEG or WebP, each at most 2 MB, checked by the file's content and not by its name. Anyone SHALL be able to read an image by its id, so that public pages can show it. + +#### Scenario: Wrong file type + +- **WHEN** staff upload a PDF renamed to `banner.png` +- **THEN** the upload is refused and nothing is stored + +#### Scenario: Too large + +- **WHEN** staff upload a 3 MB JPEG +- **THEN** the upload is refused and nothing is stored + +### Requirement: Company Branding + +Each company SHALL have an optional logo, an image of that company, and an optional accent colour in `#RRGGBB` form. These SHALL be edited on the Companies screen. Its public pages SHALL show the logo in the header and use the accent colour on buttons, with black or white button text, whichever contrasts more. Without these, the pages SHALL use the neutral Co-Lite look. + +#### Scenario: Accent colour + +- **GIVEN** INS has accent colour `#0B5FFF` +- **WHEN** a visitor opens an INS page +- **THEN** its buttons are `#0B5FFF` with white text + +#### Scenario: Invalid colour + +- **WHEN** a super admin saves the accent colour `blue` +- **THEN** the save is refused on that field + +### Requirement: Public Page Address + +A published page SHALL be public at `/p//`, matching the company code and the slug ignoring case. It SHALL be rendered on the server with the page title, the meta description and Open Graph tags. An unknown company, an unknown slug or a draft SHALL show the same not-found page to a visitor. + +#### Scenario: Draft hidden from visitors + +- **GIVEN** INS page `launch` is a draft +- **WHEN** a signed-out visitor opens `/p/INS/launch` +- **THEN** they see the not-found page + +#### Scenario: Staff preview a draft + +- **GIVEN** INS page `launch` is a draft +- **WHEN** INS staff with `BO_PAGES` open its preview from the editor +- **THEN** they see the page as it would be published, marked as a preview + +### Requirement: The Form Block Registers For An Event + +A FORM block SHALL show Co-Lite's sign-up form for its event, with that event's interests and the company's privacy notice. A submit SHALL follow the QR registration rules for matching, the existing-lead notes, consent and abuse limits. It SHALL create the event lead with source Web page and no salesperson, and SHALL record the page address and the `utm_source`, `utm_medium` and `utm_campaign` values from the page URL, each cut to 100 characters. + +#### Scenario: New enquiry + +- **GIVEN** page `/p/INS/hotel-technology` has a FORM block for `INS website enquiries` +- **WHEN** a new visitor submits it from a URL with `utm_source=facebook` +- **THEN** a new lead and an event lead with source Web page, no salesperson and UTM source `facebook` are created + +#### Scenario: Known visitor + +- **GIVEN** a lead with the same mobile exists in INS +- **WHEN** they submit the form with a different email +- **THEN** the lead is not edited, and the new email is written into the event lead's notes + +### Requirement: The Form Block Closes With Its Event + +A FORM block SHALL accept a submit only while its event is enabled, the event's end date in Malaysia time has not passed and the company has a privacy notice. Otherwise the page SHALL still show its other blocks, and the form area SHALL say that sign-up is closed. + +#### Scenario: Ended event + +- **GIVEN** the FORM block's event ended yesterday +- **WHEN** a visitor opens the page +- **THEN** the other blocks show and the form area says sign-up is closed + +### Requirement: Web Sign-Up Details For Staff + +The event lead detail SHALL show the page address and the UTM values of a Web page sign-up. + +#### Scenario: Campaign shown + +- **GIVEN** an event lead from a page opened with `utm_campaign=jan-launch` +- **WHEN** staff open the event lead +- **THEN** its detail shows the page address and campaign `jan-launch` + +### Requirement: Pages Are Company-Scoped + +Pages and page images SHALL follow the company scoping rules: staff see, edit and delete only their own company's pages, and a super admin sees every company's pages with their company. The Pages screens SHALL need `BO_PAGES`, which no role has at first. Page saves and deletes SHALL be audited. + +#### Scenario: Another company's page + +- **GIVEN** page 12 belongs to CV +- **WHEN** INS staff ask for page 12 +- **THEN** they get not found + +### Requirement: The Pages List + +`/pages` SHALL list the pages in scope with their title, public address, status and last update, with a search by title or slug and an Add page action. Each row SHALL open its editor. Pages SHALL appear in the sidebar for users with `BO_PAGES`. + +#### Scenario: Draft in the list + +- **GIVEN** INS page `launch` is a draft +- **WHEN** INS staff open `/pages` +- **THEN** its row shows status Draft and address `/p/INS/launch` + +### Requirement: The Page Editor + +The editor SHALL offer the title, a slug filled from the title until edited, a meta description with a 160-character counter, the status and the block list. Blocks SHALL be added, moved up or down and removed. A chosen image SHALL be uploaded only when the page is saved. A FORM block SHALL pick from the company's enabled events that have not ended. + +#### Scenario: Slug follows the title until edited + +- **GIVEN** a new page +- **WHEN** staff type the title "Hotel Technology" +- **THEN** the slug becomes `hotel-technology` + +### Requirement: Saving And Deleting In The Editor + +Server field errors SHALL show next to their fields, keeping all entered values. After a save the editor SHALL offer a link to view the page. Deleting a page SHALL ask first, and unsaved edits SHALL be guarded. + +#### Scenario: Server error at its field + +- **WHEN** staff save a HERO button link `javascript:alert(1)` +- **THEN** the error shows next to that button link and every entered value stays diff --git a/openspec/changes/add-landing-pages/tasks.md b/openspec/changes/add-landing-pages/tasks.md new file mode 100644 index 0000000..3d977c3 --- /dev/null +++ b/openspec/changes/add-landing-pages/tasks.md @@ -0,0 +1,110 @@ +# Tasks: add-landing-pages + +Design: `design.md` and `docs/superpowers/specs/2026-12-02-landing-pages-design.md`. + +- Every task is TDD. Ported tasks first list the babyboo rules they port (`openspec/specs/cms-pages`, `admin-portal-cms-pages-ui` and the `CmsBlocks` tests in `~/Projects/babyboo`), turn them into failing tests, then build. +- The owner said no workers, so everything runs serially in the main session with a self-review per task. + +Verify commands: + +- **Backend:** `mvn -T 1C -B -q -pl -am verify`. +- **Portal:** `cd solvway-admin-portal && npx vitest run; echo VITEST=$? && npx tsc --noEmit && npm run lint` (check the vitest exit code). + +## 1. Data + +- [ ] 1.1 SQL in `sql/`: + - `01-pages.sql`: `cms_page` and `page_image` in the counter schema, with `company_id`, and a unique key on the company and the lower-cased slug; + - `02-event-lead-web.sql`: `page_path`, `utm_source`, `utm_medium` and `utm_campaign` on the event lead; + - `03-company-branding.sql`: `logo_image_id` and `accent_color` on `company`; + - `04-module.sql`: `BO_PAGES`, under the Events menu, granted to no role; + - `99-rollback.sql`. + - Mirror 01 to 04 into `local/seed/`. + - Verify: load the seed into a throwaway local MySQL volume and list the tables, columns and module. + +## 2. services-counter + +- [ ] 2.1 Page model, validation and endpoints: + - save, which replaces the blocks; + - find by id within a company, list within a company with search, delete; + - find a published page by company and slug, ignoring case. + - Port babyboo's field, block, link and limit rules, plus the script checks and the company checks on images and FORM events. +- [ ] 2.2 Page images: + - upload (magic-byte check, 2 MB limit, company); + - read by id, returning the bytes and the content type. +- [ ] 2.3 Registration: + - source `WEB` with `pagePath` and the UTM values, each cut to 100 characters; + - a WEB registration never sets the attended time; + - its notes say "Registered by web page with: …". + - Verify (2.1 to 2.3): `mvn -T 1C -B -q -pl solvway-services-counter -am verify` + +## 3. services-system + +- [ ] 3.1 Company `logoImageId` and `accentColor`: + - `#RRGGBB` validation; + - a read of the branding by company code, with no user data. + - Verify: `mvn -T 1C -B -q -pl solvway-services-system -am verify` + +## 4. Gateway + +- [ ] 4.1 Open paths for the published page read, the image read and the branding read. Tests show that page writes and image uploads still need a token. + - Security code: read the whole diff. + - Verify: `mvn -T 1C -B -q -pl solvway-api-gateway -am verify` + +## 5. mobile-api + +- [ ] 5.1 `/api/admin/pages/**` and `/api/admin/page-images` (`BO_PAGES`): + - company scoping as on the other admin screens, with a super admin choosing a company on create; + - saves and deletes audited; + - field errors relayed with their path. +- [ ] 5.2 Public endpoints `/api/public/pages/{company}/{slug}` (published page and branding), `/api/public/page-images/{id}` and `POST /api/public/pages/{company}/{slug}/form/{block}`: + - the submit finds the FORM block's event; + - it applies the QR flow's conditions, normalisation and abuse limits; + - it registers with source WEB. +- [ ] 5.3 The company endpoints carry `logoImageId` and `accentColor`. The event lead detail carries `source`, `pagePath` and the UTM values. + - Verify (5.1 to 5.3): `mvn -T 1C -B -q -pl solvway-mobile-api -am verify` + +## 6. Portal + +- [ ] 6.1 Route handlers for `app/api/pages/**` and `app/api/page-images/**`, the public page and image proxies, `routeModules`, and the sidebar entry with its icon. + - The upstreamQuery, upstreamPath and hardcodedCopy sweeps stay green. +- [ ] 6.2 The Pages list at `/pages`: title, address, status, updated time and search, with a Company column for a multi-company scope. +- [ ] 6.3 The page editor ported from babyboo's `PageEditor` and `BlockFields`: + - Tiptap (new dependency, babyboo's versions); + - image upload on save; + - the FORM event picker; + - field errors at their fields; + - the view link, the delete confirmation and the unsaved-edits guard; + - the draft preview at `/pages/{id}/preview`. +- [ ] 6.4 The public page `/p/[company]/[slug]`: + - a server component with metadata; + - blocks ported from babyboo's `CmsBlocks`; + - `sanitize-html` (new dependency) with an allow-list; + - the branding header and the accent button with contrast text; + - the form block using `RegistrationForm`, with the UTM tags and the closed state; + - `isPublicPath` covers `/p`, and the not-found page is the same for every miss. +- [ ] 6.5 Branding fields on Companies: logo upload and accent colour. Event lead detail: the page address and UTM values. The source label is Web page. +- [ ] 6.6 Labels in `defaultMessages.ts` with Chinese in `zh_CN.seed.json`, then `npm run i18n:sql`. This change's `sql/05-page-labels.sql` holds only the new labels. + - Verify (6.1 to 6.6): portal verify. + +## 7. Release + +- [ ] 7.1 `docs/deployment.md`: + - the SQL order and the module; + - the public hostname and its route; + - creating each company's standing "enquiries" event; + - the image ceiling; + - the two new dependencies. +- [ ] 7.2 Live Playwright check on the local stack, at 1280 and 360 px: + - build the INS page from the proof of concept's content in the editor; + - publish it, then open it signed out; + - submit the form with UTM tags, then see the event lead with source Web page, not attended, with page and campaign; + - draft not found for visitors, preview for staff; + - a script link refused at its field; + - another company's event not offered; + - branding colour and logo; + - the closed form after the event ends. +- [ ] 7.3 Whole-branch self-review (security: the gateway, sanitising and the public submit), then the PR to main and the merge. + +## Workflow Follow-Up + +- Archive after `add-zh-cn-messages`, because of the sidebar delta.