








ComplyDQ — Marketing Site
Kansas, United StatesOntario, Canada
Marketing site for a compliance platform, with interactive tools for audit readiness, ROI calculation and regulatory compliance. It includes a CMS-managed blog and automated deployments with validation, zero-downtime updates and rollback on failure.
IncludesInteractive toolsCMS blogZero-downtime deploys





Overview
The challenge
Links
Private — client project
System architecture
A content-driven marketing site built almost entirely from React Server Components, where the central decision is that nearly every page is statically rendered with no runtime data dependency, and the only dynamic surface — the blog — is isolated behind a fail-soft ISR client. Interactivity is pushed to narrow, explicitly-bounded client leaves, so page shells, metadata and structured data stay server-rendered while calculators and toggles hydrate independently.
Application Architecture
- Next.js 16 App Router across 15 routes, all but the blog fully static at build time.
- 14 client components scoped to interactive leaves; everything else is a Server Component.
- Blog index, post detail and sitemap share a 60-second ISR revalidation window.
- Content and domain data live in typed modules rather than inline in JSX.
- Standalone output so the runtime image ships only the dependencies it actually resolves.
- Single-source constants: pricing, penalty figures and navigation are defined once and imported by every consumer.
Platform Features
- DOT Audit Readiness Assessment with weighted scoring, exclusive multi-select handling, tiered results and gap surfacing at a defined threshold.
- ROI Calculator computing annual admin hours and cost, FTE equivalent, net ROI and payback in months — deliberately excluding fines to keep the output conservative.
- DQ File Checklist covering 49 CFR Part 391 items grouped by driver type with retention notes.
- Live pricing calculator sharing the platform’s real billing constants.
- Searchable 26-question FAQ library, all answers server-rendered.
- CMS-backed blog with featured posts, categories, authors and per-post noindex control.
Data Model
- No database and no persistence in this repository; no auth, no API routes, no server actions.
- One external read-only source: Strapi 5 REST, queried without a token.
- Raw CMS shapes normalized to a view model so the UI never touches the API shape.
- Every query tenant-filtered by project slug — on detail as well as list, to prevent cross-tenant reads by URL guessing.
- Assessment, ROI and checklist state is ephemeral React state; nothing is submitted or stored.
SEO & Structured Data
- JSON-LD @graph
- Organization
- SoftwareApplication
- BlogPosting
- FAQPage
- BreadcrumbList
- Canonical
- OpenGraph
- Dynamic robots.txt
- ISR sitemap
- 410 de-indexing
Infrastructure & deployment
Self-hosted on a shared VPS running roughly twenty sites, which drives most of the configuration: every resource that could collide between environments or neighbours — ports, compose project names, container names, nginx upstream blocks, server-block filenames — is namespaced explicitly, with the failure mode each collision produces documented at the point of the decision.
Deploy Pipeline
- Bitbucket Pipelines: pull requests and main run install, build, type-check and lint.
- Production deploys are tag-triggered and gated on manual approval, so pushing a tag alone cannot ship.
- The verify step re-runs on the tag rather than trusting the branch’s earlier run, since a tag can point at any commit.
- Rollback is re-running the previous tag’s pipeline; each tag pins an exact commit.
Containers & Runtime
- Multi-stage Docker build on node:22-alpine, running as a non-root user.
- Public environment variables passed as build args, since Next inlines them at build rather than reading them at runtime.
- Compose healthcheck via native fetch, with a start period excluded from retry counting.
- Slot and port injected by environment so both versions coexist during the swap.
nginx & Edge
- Per-environment upstream fragments rewritten each deploy, with the circuit breaker disabled on a single-backend upstream and keepalive connections pooled.
- Apex to www redirect; HSTS, a per-origin CSP allowlist, frame and sniffing protections, and a Permissions-Policy denying 18 features.
- Security headers re-declared inside nested location blocks, because one header declaration in a block drops the parent’s.
- Legacy surface handled at the edge: 410 for the spam slug map and legacy WordPress paths, 301 for the nine legitimate pages.
- Post-deploy warming of up to 40 hashed assets, since cache keys are full-URL.
Configuration & Guardrails
- Environment identity comes from the public site URL, not the build mode — both environments build in production mode.
- Deploy asserts indexability in both directions and warns loudly rather than aborting, since the fix lives in nginx rather than the build.
- Deploy re-verifies that chunk cache headers are not immutable, because that block lives in server config outside the repository.
Built with
Application Surfaces
- 15 routes: Home, Features, a Resources hub with three tool pages, Blog index and detail, Partners, About, Contact, FAQs, Privacy Policy, Terms of Service and a 404.
- Three interactive domain tools — assessment, ROI calculator and checklist — plus a live pricing calculator.
- Design system of roughly 45 components with token-based CSS Modules, light and dark theming, responsive layout, skip-link and reduced-motion support.
Integrations & SEO
- Tenant-scoped Strapi client with server-side sanitization and graceful degradation.
- Full SEO and structured-data layer: per-page JSON-LD, dynamic robots, ISR sitemap, canonicals and social cards.
Infrastructure & Documentation
- Migration assets: a sitemap-to-nginx generator for the de-indexing map, the redirect mapping table, and a written rationale for the approach.
- Infrastructure as code: Dockerfile, Compose, two nginx server blocks, two upstream fragments, the blue-green deploy script and the CI pipeline.
- A roughly 420-line operational README covering both environments, bring-up and teardown runbooks, one-time server prep, and incident post-mortems with reproduction commands.