## 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.