Phoenix STS: Health & Safety Platform
A WordPress-to-Next.js migration for Ireland's leading fire safety and health & safety training provider, featuring a customer portal, Zoho CRM integration, and Stripe payments.
A full-stack platform built for Phoenix Safety & Training Solutions, Ireland's first CPD-certified fire safety training provider for the nursing home sector. The project replaced an aging WordPress site with a modern Next.js application serving both a public website and a self-service customer portal.
Project Overview
Phoenix STS delivers accredited training courses, consultancy services, and safety equipment to organisations across healthcare, construction, hospitality, and the public sector. Their previous site ran on WordPress with 12 plugins, 42 external scripts, and no caching strategy — page loads were slow and the admin experience was painful for non-technical staff.
The rebuild had two goals: a fast, SEO-optimised public site that editors could manage independently, and a customer portal where clients could manage their accounts, view billing, raise support tickets, and access shared documents.
Core Requirements
- Replace WordPress with a modern, maintainable stack
- Block-based page builder so editors don't need a developer for content changes
- Customer portal with account management, billing, support tickets, and file storage
- Form submissions forwarded to Zoho CRM for sales pipeline tracking
- Stripe integration for online payments
- Enterprise email via Microsoft 365
- CDN caching to match or beat the old site's load times
Technical Architecture
| Layer | Technology |
|---|---|
| Frontend | Next.js 15 (App Router), React 19, TypeScript |
| CMS | Payload CMS 3, Lexical Rich Text Editor |
| Database | PostgreSQL with connection pooling & migrations |
| Styling | TailwindCSS, shadcn/ui, Radix UI primitives |
| Media Storage | DigitalOcean Spaces (S3-compatible) |
| Payments | Stripe (payment intents) |
| CRM | Zoho Forms integration for lead capture |
| Microsoft Graph API with Azure OAuth2 | |
| CDN | Cloudflare with edge caching |
| Testing | Vitest (integration), Playwright (E2E) |
The application uses Next.js route groups to separate three concerns: the public website (frontend), the admin panel (payload), and the customer portal (portal). Server components handle data fetching and rendering, with client components only where interactivity is needed.
Key Features
1. Block-Based Layout Builder
Editors build pages from a library of 15 content blocks without touching code:
| Block | What it does |
|---|---|
| Hero | Page header with rich text, links, and optional media or YouTube video. Five variants from full-bleed to minimal. |
| Card Groups | Grid of icon cards for linking to services, courses, or pages. |
| Process Steps | Numbered or icon-based steps for explaining a workflow or service journey. |
| Stats | Key figures like "10,000+ Trained" or "500+ Organisations" in a row or grid. |
| Logo Grid | Client or partner logos displayed as a card grid, compact strip, or auto-scrolling carousel. |
| Testimonials | Customer quotes with optional photo, role, and star rating. |
| Image with Text | Side-by-side image and copy, image positionable left or right. |
| Video with Text | Same layout but with a YouTube, Vimeo, or custom video embed. |
| Content | Multi-column rich text — full width, halves, or thirds. |
| Call to Action | Heading, paragraph, and action buttons. Used for mid-page and end-of-page conversion points. |
| Banner | Alert-style bar for announcements or notices (info, warning, error, success). |
| Archive | Pulls a filtered grid of posts or pages from a collection query. |
| Form | Embeds a form built in the admin panel's form builder. |
| Member Cards | Team or council member cards with photo, name, role, and email. |
| Code | Syntax-highlighted code snippets. |
Each block is a folder with two files — a Payload field config and a React component. Adding a new block to the builder means adding one folder.
2. Customer Portal
A self-service portal that pulls data natively from Zoho — accounts, billing, contacts, tickets, documents, and forms — so customers can manage everything without leaving the site. It runs on the same Next.js instance as the public site but under its own route group with separate layout and access control.
Authentication uses a bridge-login flow. When a CMS user visits /portal, the client checks for an existing portal token. If there isn't one, it hits a bridge endpoint that validates the user's CMS session cookie and issues a short-lived JWT scoped to the portal. That token is stored as a cookie and attached to every subsequent request to the Zoho-proxied API routes. The user never logs in twice — the bridge silently converts the CMS session into portal access.
3. Zoho CRM Integration
Form submissions are automatically forwarded to Zoho CRM with per-form field mapping. Each form maps its fields to the corresponding Zoho form so submissions land directly in the sales pipeline without manual data entry.
4. Stripe Payments
Payments use a two-phase flow. The form submission creates a Stripe payment intent server-side, returning a client secret. The frontend then confirms the payment through Stripe Elements before the form actually submits. The payment and form data are coupled but the secret handling stays server-side.
All form submissions are verified with Cloudflare Turnstile before being accepted — the token is validated server-side before any data is processed or forwarded.
5. Content Publishing
Full editorial workflow with Lexical rich text editing, draft and published states, live preview across three breakpoints (mobile, tablet, desktop), scheduled publishing via cron jobs, hierarchical categories, and author attribution.
6. Cache Invalidation
Cache revalidation is direction-aware. When content is published, the new path and sitemap are invalidated. When content is unpublished, the old path is invalidated to clear it from the CDN — not just a blanket "invalidate on save".
7. WordPress Migration
The migration preserved SEO through 50+ redirect mappings — both pattern-based rewrites (/online-courses/:slug → /:slug) and specific URL redirects for old blog posts. Sitemaps are auto-generated with exclusions for sensitive pages like login and payment forms.
8. Search
Posts are indexed through a search plugin with a custom sync hook. Categories are resolved and stored at sync time rather than at query time, so search results don't need to make additional database lookups to display category labels.
9. Enterprise Email
All transactional email — password resets, form confirmations, notifications — routes through Microsoft 365 via a custom Graph API adapter with Azure OAuth2 authentication. This keeps communications under the organisation's domain rather than relying on a third-party SMTP service.
Performance: Old vs New
After the migration and caching configuration, we benchmarked the old WordPress site against the new build. The numbers below are server-side measurements averaged over multiple requests, both served through Cloudflare.
Server Response
| Metric | Old (WordPress) | New (Next.js) | Change |
|---|---|---|---|
| TTFB (avg) | 57ms | 47ms | 18% faster |
| Total response (avg) | 74ms | 74ms | Equal |
| HTML (gzipped) | 40KB | 47KB | +17% |
| CDN cache status | HIT | HIT | Both cached |
Summary
This project replaced a plugin-heavy WordPress site with a single Next.js application that handles public content, admin management, and customer self-service. The block-based editor gives the Phoenix STS team full control over their site without developer involvement, the portal gives their customers direct access to accounts and support, and the Zoho and Stripe integrations keep the operational workflow tight. Performance-wise, it matches the old site on raw speed while shipping significantly less JavaScript, better image loading, and proper security headers.