From ebfb10d91e22fb7fb25767d2754242a93b6529b4 Mon Sep 17 00:00:00 2001 From: rob Date: Thu, 12 Nov 2026 09:19:30 +0000 Subject: [PATCH] Implement BS-008 privacy draft and public prerendering --- .gitignore | 1 + .roborto/testtask.conf | 2 +- docs/CURRENT_STATE.md | 2 + docs/DECISIONS.md | 18 ++++++ docs/HANDOFF.md | 14 +++++ docs/TASKS.md | 12 +++- nginx/nginx.conf | 8 ++- react/e2e/public-shell.spec.js | 7 +++ react/package.json | 2 +- react/scripts/check-privacy-build.cjs | 60 +++++++++++++++++++ react/scripts/prerender.mjs | 37 ++++++++++++ react/src/App.jsx | 32 +++++----- .../components/ThemeToggle/ThemeToggle.jsx | 5 +- react/src/config/site.js | 9 +++ react/src/main.jsx | 11 ++-- react/src/styles/app.scss | 1 + react/src/views/Legal/Privacy.jsx | 30 ++++++---- react/src/views/MarketingRoutes.test.jsx | 1 + react/src/views/PublicPages.test.jsx | 10 ++-- 19 files changed, 216 insertions(+), 46 deletions(-) create mode 100644 react/scripts/check-privacy-build.cjs create mode 100644 react/scripts/prerender.mjs diff --git a/.gitignore b/.gitignore index 8db7379..d7e92c0 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ venv/ node_modules/ dist/ +.ssr-temp/ coverage/ playwright-report/ test-results/ diff --git a/.roborto/testtask.conf b/.roborto/testtask.conf index ba66682..d4d21bc 100644 --- a/.roborto/testtask.conf +++ b/.roborto/testtask.conf @@ -4,6 +4,6 @@ ROBORTO_TASK_ID_PATTERN='^[0-9]{3}$' ROBORTO_WORKTREE="${ROBORTO_PROJECT_ROOT}/.test-worktrees/task-${ROBORTO_TASK_ID}" ROBORTO_HOOK="${ROBORTO_PROJECT_ROOT}/.roborto/testtask-hook" # Loopback-only manual testing; fixed ports prevent concurrent conflicting sessions. -ROBORTO_BROWSER_URL="http://127.0.0.1:18081/projects" +ROBORTO_BROWSER_URL="http://127.0.0.1:18081/privacy" ROBORTO_READY_PORTS=(15001 18081) ROBORTO_READY_LABELS=(API Web) diff --git a/docs/CURRENT_STATE.md b/docs/CURRENT_STATE.md index d3ab9c6..e521391 100644 --- a/docs/CURRENT_STATE.md +++ b/docs/CURRENT_STATE.md @@ -1,5 +1,7 @@ # BortStack current state +BS-008 candidate was accepted by Captain on 2026-11-12 but awaits explicit commit/merge authorization. It remains uncommitted in `.task-worktrees/bs-008` on `bs-008` from `codex/855913c`. Its privacy route describes confirmed Contact and theme flows and names Robert O'Reilly/support@bortstack.com for enquiry-data requests. The incomplete notice stays noindex pending lawful-basis, mail-backup, actual Resend account/DPA and legal review. The candidate prerenders nine public routes with static metadata and a noindex 404; matching pages hydrate. All 38 unit tests, lint, build and 27 offline browser/axe cases passed before acceptance. Full server-backed nginx result was not supplied to Engineering. Canonical origin is unconfirmed, with no sitemap/canonical URLs approved. This paragraph describes the task candidate, not integrated production behavior. + Updated 2026-11-11 for BS-006. Integration codex at2660577 contains Captain-accepted public routing/themes, homepage composition, Services, About, Contact and responsive showcase footer (BS-001/002/003/004/007/011/012/013/014). All old task worktrees were removed after authorized cleanup; task branches/history remain. BS-006 is now engaged in .task-worktrees/bs-006 on bs-006 from2660577. No commit/merge/push/deployment authorized. ## BS-006 candidate diff --git a/docs/DECISIONS.md b/docs/DECISIONS.md index d38a800..720d715 100644 --- a/docs/DECISIONS.md +++ b/docs/DECISIONS.md @@ -20,6 +20,24 @@ ## Open / confirm before publishing or connecting production +BS-008 privacy decisions (2026-11-11): Captain intends to use BortStack as the business name but has not registered it and is not yet operating; sole-trader activity is planned from January 2027. Do not describe it as a currently trading or registered company. Do not publish the Captain's private address. Use `support@bortstack.com` for privacy requests. Review enquiries that do not become client work after 12 months and delete them if no continuing business reason remains; client-project correspondence follows a separate policy. Confirm the operational deletion and backup schedules before publication. Legal identity and full notice review remain open. + +Captain confirmed project enquiry details are used only to respond and discuss potential project work, not for later marketing messages. The lawful basis remains for legal review. + +Captain confirmed no additional CRM, helpdesk or forwarded mailbox receives project enquiries beyond Resend and the Captain's own mail server. The mail server's hosting location and provider terms remain to be verified. + +Captain's mail is hosted with Hetzner in Helsinki, Finland. The server model and hostname are not privacy-notice content. Resend's processing and transfer arrangements remain to be verified. + +Captain confirmed `support@bortstack.com` as the channel for access, correction and deletion requests concerning enquiries. Requests require case-by-case assessment; the draft must not promise automatic deletion in every circumstance. + +Captain may publish the BortStack website before sole-trader activity begins in January 2027 and accept project enquiries to plan work from January. Public copy and the privacy notice must not imply the business is already trading. Actual Contact delivery still depends on verified email configuration and launch authorization. + +Captain authorized publishing the name Robert O'Reilly as the individual responsible for BortStack enquiry data in the privacy notice. The private address remains undisclosed. + +Captain confirmed enquiry details may be used to prepare a proposal or quote at the visitor's request. This is within the project-enquiry purpose; the lawful basis still needs review. + +Captain confirmed prospective client enquiries are not shared with subcontractors before agreement with the client. This does not change the technical processing by Resend and the mail host. + - Obtain approved original logo art (`bortstack_enterprise_logo_concept_board.png`) and approved light mode board (`bortstack_light_mode_brand_board.png`), or exported authentic versions. - Confirm actual domain and DNS changes, correct API Admin public link / hostname. - Confirm business email inbox, Resend domain verification, desired legal disclosures and privacy retention. diff --git a/docs/HANDOFF.md b/docs/HANDOFF.md index eb9d455..dd5d6bb 100644 --- a/docs/HANDOFF.md +++ b/docs/HANDOFF.md @@ -1,5 +1,19 @@ # BS-006 Projects handoff +## Current mission — BS-008 (2026-11-11) + +Captain said “task complete” on 2026-11-12, accepting the candidate. No explicit commit/merge/push/deployment order accompanied it. Leave the worktree/branch and test resources intact pending integration authority. The actual Captain testtask/nginx observations were not supplied; do not claim they passed. The incomplete privacy notice remains noindex and publication-gated. Previous technical validation below predates this acceptance-only context update; application source was not changed. + +Captain engaged BS-008. Isolated worktree `.task-worktrees/bs-008`, branch `bs-008`, base `codex/855913c`; integration checkout was clean. Scope: approved marketing site and independent Contact service, excluding inherited account scaffolding. Captain does not want a private address exposed. Canonical public origin remains unconfirmed. Privacy route presents Contact/theme flows and stays noindex; incomplete notice explicitly pending. Robert O'Reilly and support@bortstack.com confirmed for enquiry data rights. Enquiries are for project discussion/quotes, no later marketing, no CRM/subcontractor forwarding; 12-month review for non-client enquiries. Hetzner mail in Helsinki confirmed. Resend publishes US storage/SCC safeguards; actual account plan/DPA, lawful basis and mail-backup retention remain publication gates. Site may precede January 2027 sole-trader activity and accept enquiries to plan future work. + +Validation: offline lockfile install succeeded after sandbox EPERM retry with authorized execution. All 38 unit tests, lint and production build passed after final changes. Offline Chromium production-artifact matrix at 1440/390/320 across seven public routes and two unavailable paths (27 combinations): static heading/robots/status, hydrated title/landmark/theme, no overflow, page errors, hydration console errors or axe violations. Expected 404 document resource console message is filtered for 404 paths only. Contact config was mocked unavailable; static files were intercepted locally. Initial browser sandbox launch failed; authorized retry passed. Full server-backed Playwright/nginx and Captain manual testing remain pending. No dev server/testtask/Docker runtime started. `scripts/check-privacy-build.cjs` is the repeatable offline check. + +SEO implementation: production build now uses Vite client + SSR bundles to write static HTML for six primary routes and three project cases, with shared route metadata, plus a noindex `404.html`. Matching paths hydrate; unknown paths client-render after a static 404 response. nginx config resolves route HTML and emits 404 for unknown URLs. No new dependencies. Canonical origin unconfirmed, so canonical URLs/sitemap deferred. Actual nginx runtime remains untested; Captain controls startup. Manual-test browser URL changed to `/privacy`. No commit/merge/push/deployment authorization. Earlier BS-006 details below are history. + +An initial Vite dev-server SSR loader failed on the inherited React Router CommonJS export boundary and was reverted. The subsequent Vite production SSR bundle succeeds without that loader. A light-theme Bootstrap `code` contrast issue was fixed with the approved theme link token. Final validation passed after shared metadata consolidation. + +Manual-test snapshot was refreshed from this candidate with `python3 scripts/create-test-snapshot.py 008` (342 files verified). Run `./scripts/testtask.sh TASK-008` from the integration root when Captain elects to test; the task browser opens `/privacy`. Source edits after this line require another snapshot refresh. No task runtime was started by Engineering. + Updated 2026-11-11. Captain engaged BS-006 with Frontend UI Design → Webapp Feature → Frontend Visual QA → Code Review and Roborto Project Context throughout. Candidate: /home/rob/projects/bortstack/.task-worktrees/bs-006, branch bs-006, base codex/2660577. Integration root has pre-existing uncommitted cleanup edits in CURRENT_STATE/HANDOFF; preserved. No commit/push/merge/deployment authorized. Captain approved RouletteBuddy featured, substantial PitchInvader coverage despite unfinished polish, and modest API Admin presentation. Source repositories in ~/projects inspected read-only; summaries grounded in source/docs. No private data/code copied. No genuine project screenshots supplied: explicitly pending placeholders remain. Project concepts are design references only. Homepage/shared shell/backend unchanged. BS-006-DESIGN.md contains composition, scope, acceptance, evidence and remaining gates. diff --git a/docs/TASKS.md b/docs/TASKS.md index eb424fb..4135624 100644 --- a/docs/TASKS.md +++ b/docs/TASKS.md @@ -44,12 +44,22 @@ Deviation/asset gate: reference photograph replaced by restrained decorative CSS | BS-005 | Services and About | Services Complete under BS-012; About Complete under BS-013 | | BS-006 | Projects gallery and case studies — engaged 2026-11-11; see detailed task below | Captain review; genuine imagery pending | | BS-007 | Contact UI and Flask service — engaged; see detailed task below | Captain manual review; verified mail configuration before real delivery | -| BS-008 | Privacy/legal, SEO and accessibility | Reviewed actual data flows/legal details; static/prerendered technique and metadata; wider accessibility | +| BS-008 | Privacy/legal, SEO and accessibility — Captain accepted candidate 2026-11-12; see mission note below | Authorized integration still pending; publication gates remain | | BS-009 | Docker/SWAG plan and regression tests | Adapt production database-free topology/readiness; no live cutover. Existing manual-test runtime already operational | | BS-010 | Final visual reconciliation and launch prep | Authentic brand/media, verified contact/domain and final review | ## Lifecycle and constraints +## BS-008 mission — privacy, SEO and accessibility + +Status: Captain accepted the BS-008 candidate with “task complete” on 2026-11-12; commit/merge authorization has not been given, so the repository lifecycle is awaiting integration rather than Complete. Candidate is on `bs-008` at `.task-worktrees/bs-008`, based on `codex/855913c`. Captain engaged the task on 2026-11-11. Scope confirmed as the approved public marketing site and independent Contact service, excluding inherited account scaffolding. Captain will not publish a private address. Canonical origin remains unconfirmed. Resend's published GDPR information says message content and delivery records are stored in the US under its DPA/SCCs; verify the actual account plan and DPA before publication: https://resend.com/security/gdpr/ . + +Objective: provide accurate public privacy information, deliberate route indexing and accessibility verification. Scope: existing `/privacy` route, metadata and public-route checks; assess static/prerender technique. Non-goals: publishing unverified legal claims, private address, account product, production runtime, dependency upgrades, deployment. Acceptance: no template privacy copy; verified data flows represented accurately; incomplete notice excluded from indexing; public routes maintain accessible navigation and responsive layout; lint/unit/build/browser evidence and Captain legal/manual review recorded. Risks: legal basis, mail-backup retention, actual Resend plan/DPA, production hosting and canonical origin require confirmation. Full privacy publication and canonical sitemap are gated on those facts. + +Current implementation: Vite client and server builds produce prerendered HTML for the six primary public routes, three project case studies and a noindex 404 document, with route-specific title, description and robots tags. nginx serves known route files and a 404 status for unknown URLs. React hydrates matching static routes and client-renders unknown paths. No framework/dependency added. The production origin remains unconfirmed, so canonical URLs and a sitemap are deferred; `robots.txt` permits crawling. Runtime nginx behavior still requires Captain-controlled testtask verification. + +Captain acceptance does not approve publication of the incomplete privacy notice or production. No explicit commit/merge order accompanied acceptance. Actual testtask/nginx runtime result was not supplied to Engineering; do not infer that diagnostic passed. + Proposed → Accepted/scoped → In progress → Implementation-ready → Captain/manual acceptance and authorized integration → Complete. Green checks/local commits do not authorize merge or deployment. Captain accepted the homepage composition and engaged Services as BS-012; no other-page continuation without further approval. Missing brand masters/portfolio permissions and unverified legal/domain/email/hosting remain launch gates. Inherited npm lockfile reports 10 audit alerts (5 moderate, 3 high, 2 critical). No dependencies added or lockfile changed; follow-up requires separate scope. No claim of full WCAG compliance or production readiness. diff --git a/nginx/nginx.conf b/nginx/nginx.conf index ba2cafb..4ea75b6 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -35,8 +35,14 @@ http { expires 0; } + error_page 404 /404.html; + + location = / { + try_files /index.html =404; + } + location / { - try_files $uri $uri/ /index.html; + try_files $uri/index.html $uri $uri/ =404; } location /assets/ { diff --git a/react/e2e/public-shell.spec.js b/react/e2e/public-shell.spec.js index 0e8d3e4..f602994 100644 --- a/react/e2e/public-shell.spec.js +++ b/react/e2e/public-shell.spec.js @@ -28,6 +28,13 @@ test('public shell has accessible landmarks and first keyboard skip link', async expect((await new AxeBuilder({ page }).analyze()).violations).toEqual([]) }) +test('privacy draft is accessible and excluded from indexing', async ({ page }) => { + await page.goto('/privacy') + await expect(page.locator('meta[name="robots"]')).toHaveAttribute('content', 'noindex, nofollow') + await expect(page.getByRole('heading', { name: 'Project enquiries' })).toBeVisible() + expect((await new AxeBuilder({ page }).analyze()).violations).toEqual([]) +}) + test('navigation works and closes on mobile selection', async ({ page, isMobile }) => { await page.goto('/') const navigation = page.getByRole('navigation', { name: 'Main navigation' }) diff --git a/react/package.json b/react/package.json index d1516c4..5889e40 100644 --- a/react/package.json +++ b/react/package.json @@ -5,7 +5,7 @@ "type": "module", "scripts": { "dev": "vite", - "build": "vite build", + "build": "vite build && vite build --ssr src/App.jsx --outDir .ssr-temp --emptyOutDir && node scripts/prerender.mjs", "lint": "eslint .", "test": "vitest run", "test:coverage": "vitest run --coverage", diff --git a/react/scripts/check-privacy-build.cjs b/react/scripts/check-privacy-build.cjs new file mode 100644 index 0000000..eb85c08 --- /dev/null +++ b/react/scripts/check-privacy-build.cjs @@ -0,0 +1,60 @@ +const { chromium } = require('playwright'); +const fs = require('fs'); +const path = require('path'); +const AxeBuilder = require('@axe-core/playwright').default; + +const root = path.resolve(__dirname, '../dist'); + +(async () => { + const browser = await chromium.launch({ headless: true }); + try { + const widths = process.env.BS008_FOCUS ? [390] : [1440, 390, 320]; + const paths = process.env.BS008_FOCUS ? ['/privacy'] : ['/', '/services', '/projects', '/projects/roulettebuddy', '/about', '/contact', '/privacy', '/login', '/projects/example']; + for (const width of widths) for (const pathname of paths) { + const candidate = pathname === '/' ? path.join(root, 'index.html') : path.join(root, pathname.slice(1), 'index.html'); + const staticFile = fs.existsSync(candidate) ? candidate : path.join(root, '404.html'); + const staticHtml = fs.readFileSync(staticFile, 'utf8'); + const staticHeading = / localStorage.setItem('bortstack-theme', 'light')); + const page = await context.newPage(); + const errors = []; + page.on('pageerror', error => errors.push(error.message)); + page.on('console', message => { if (message.type() === 'error') errors.push(message.text()); }); + await page.route('**/*', route => { + const url = new URL(route.request().url()); + if (url.pathname === '/api/contact/config') return route.fulfill({ json: { email: null, available: false } }); + const requested = url.pathname === '/' || url.pathname === pathname ? staticFile : path.join(root, url.pathname); + if (!requested.startsWith(root)) return route.abort(); + const file = fs.existsSync(requested) ? requested : path.join(root, 'index.html'); + const contentType = file.endsWith('.js') ? 'application/javascript' : file.endsWith('.css') ? 'text/css' : file.endsWith('.html') ? 'text/html' : 'application/octet-stream'; + return route.fulfill({ status: file === staticFile && staticFile.endsWith('404.html') ? 404 : 200, body: fs.readFileSync(file), contentType }); + }); + const response = await page.goto(`http://local.test${pathname}`); + await page.getByRole('main').getByRole('heading', { level: 1 }).first().waitFor(); + const result = { + width, + pathname, + staticHeading, + status: response.status(), + theme: await page.locator('html').getAttribute('data-bs-theme'), + title: await page.title(), + robots: await page.locator('meta[name="robots"]').getAttribute('content'), + main: await page.getByRole('main').count(), + overflow: await page.evaluate(() => document.documentElement.scrollWidth > document.documentElement.clientWidth), + axeViolations: (await new AxeBuilder({ page }).analyze()).violations.map(violation => ({ id: violation.id, nodes: violation.nodes.map(node => ({ target: node.target, summary: node.failureSummary })) })), + errors, + }; + console.log(JSON.stringify(result)); + const expectedRobots = pathname === '/privacy' || staticFile.endsWith('404.html') ? 'noindex, nofollow' : 'index, follow'; + const isMissing = staticFile.endsWith('404.html'); + const unexpectedErrors = errors.filter(error => !(isMissing && error === 'Failed to load resource: the server responded with a status of 404 (Not Found)')); + const expectedTheme = pathname === '/privacy' && width === 390 ? 'light' : 'dark'; + if (!staticHeading || !staticHtml.includes(`content="${expectedRobots}"`) || result.status !== (isMissing ? 404 : 200) || result.theme !== expectedTheme || result.robots !== expectedRobots || result.main !== 1 || result.overflow || result.axeViolations.length || unexpectedErrors.length) process.exitCode = 1; + await page.close(); + await context.close(); + } + } finally { + await browser.close(); + } +})().catch(error => { console.error(error); process.exitCode = 1; }); diff --git a/react/scripts/prerender.mjs b/react/scripts/prerender.mjs new file mode 100644 index 0000000..a1fb532 --- /dev/null +++ b/react/scripts/prerender.mjs @@ -0,0 +1,37 @@ +import { renderToString } from 'react-dom/server'; +import { createElement } from 'react'; +import { StaticRouter } from 'react-router-dom'; +import { readFile, mkdir, writeFile } from 'node:fs/promises'; +import { resolve, join } from 'node:path'; +import App from '../.ssr-temp/App.js'; +import { projects } from '../src/views/Projects/projects.js'; +import { publicPageMeta, pageTitle } from '../src/config/site.js'; + +const dist = resolve(import.meta.dirname, '../dist'); +const escapeHtml = value => value.replaceAll('&', '&').replaceAll('"', '"').replaceAll('<', '<').replaceAll('>', '>'); +const routes = [ + ...Object.entries(publicPageMeta).map(([path, meta]) => ({ path, ...meta })), + ...projects.map(project => ({ path: `/projects/${project.slug}`, title: project.name, description: project.summary })), +]; + +const template = await readFile(join(dist, 'index.html'), 'utf8'); +for (const route of routes) { + const body = renderToString(createElement(App, { Router: StaticRouter, routerProps: { location: route.path } })); + const html = template + .replace('', ``) + .replace('
', `
${body}
`) + .replace(/[^<]*<\/title>/, `<title>${escapeHtml(pageTitle(route.title))}`) + .replace(/()/, `$1${escapeHtml(route.description)}$2`) + .replace(/()/, `$1${route.noIndex ? 'noindex, nofollow' : 'index, follow'}$2`); + const target = route.path === '/' ? join(dist, 'index.html') : join(dist, route.path.slice(1), 'index.html'); + await mkdir(resolve(target, '..'), { recursive: true }); + await writeFile(target, html); +} +const missing = renderToString(createElement(App, { Router: StaticRouter, routerProps: { location: '/404' } })); +const missingHtml = template + .replace('', '') + .replace('
', `
${missing}
`) + .replace(/[^<]*<\/title>/, '<title>Page not found | BortStack') + .replace(/()/, '$1noindex, nofollow$2'); +await writeFile(join(dist, '404.html'), missingHtml); +console.log(`Prerendered ${routes.length} public routes.`); diff --git a/react/src/App.jsx b/react/src/App.jsx index 4bd2b61..cee0c6d 100644 --- a/react/src/App.jsx +++ b/react/src/App.jsx @@ -9,31 +9,26 @@ import Services from "./views/Services/Services"; import About from "./views/About/About"; import Contact from "./views/Contact/Contact"; import Projects, { ProjectCaseStudy } from "./views/Projects/Projects"; +import Privacy from "./views/Legal/Privacy"; +import PropTypes from "prop-types"; +import { createElement } from "react"; +import { publicPageMeta } from "./config/site"; -const pages = [ - ["privacy", "Privacy policy", "Privacy information is awaiting review against the actual website data flows before publication."], -]; - -export default function App() { +export default function App({ Router = BrowserRouter, routerProps = {} }) { return (
- + {createElement(Router, routerProps, <> Skip to main content
- } /> - } /> - } /> - } /> - } /> + } /> + } /> + } /> + } /> + } /> } /> - {pages.map(([path, title, description]) => ( - - - - } /> - ))} + } /> @@ -41,7 +36,8 @@ export default function App() {
- + )}
); } +App.propTypes = { Router: PropTypes.elementType, routerProps: PropTypes.object }; diff --git a/react/src/components/ThemeToggle/ThemeToggle.jsx b/react/src/components/ThemeToggle/ThemeToggle.jsx index 7a66055..53c16d6 100644 --- a/react/src/components/ThemeToggle/ThemeToggle.jsx +++ b/react/src/components/ThemeToggle/ThemeToggle.jsx @@ -1,8 +1,9 @@ -import { useState } from "react"; +import { useEffect, useState } from "react"; import { FiMoon, FiSun } from "react-icons/fi"; export default function ThemeToggle() { - const [theme, setTheme] = useState(() => document.documentElement.dataset.bsTheme === "light" ? "light" : "dark"); + const [theme, setTheme] = useState("dark"); + useEffect(() => { setTheme(document.documentElement.dataset.bsTheme === "light" ? "light" : "dark"); }, []); function toggle() { const next = theme === "dark" ? "light" : "dark"; document.documentElement.dataset.bsTheme = next; diff --git a/react/src/config/site.js b/react/src/config/site.js index 3c91d28..8d4fe02 100644 --- a/react/src/config/site.js +++ b/react/src/config/site.js @@ -8,3 +8,12 @@ export const site = Object.freeze({ export function pageTitle(title) { return title ? site.titleTemplate.replace("%s", title) : site.defaultTitle; } + +export const publicPageMeta = Object.freeze({ + "/": { title: "", description: site.description }, + "/services": { title: "Services", description: "Website development, custom software, API integration and managed hosting from BortStack." }, + "/about": { title: "About", description: "BortStack’s approach to practical software development, clear communication and ongoing support." }, + "/contact": { title: "Contact", description: "Discuss your software project with BortStack." }, + "/projects": { title: "Projects", description: "Explore BortStack software projects: RouletteBuddy, PitchInvader and API Admin." }, + "/privacy": { title: "Privacy policy", description: "How the BortStack website handles theme preferences and project enquiries.", noIndex: true }, +}); diff --git a/react/src/main.jsx b/react/src/main.jsx index 3d9da8a..f9cf7ef 100644 --- a/react/src/main.jsx +++ b/react/src/main.jsx @@ -1,9 +1,8 @@ import { StrictMode } from 'react' -import { createRoot } from 'react-dom/client' +import { createRoot, hydrateRoot } from 'react-dom/client' import App from './App.jsx' -createRoot(document.getElementById('root')).render( - - - , -) +const root = document.getElementById('root') +const app = +if (root.hasChildNodes() && document.documentElement.dataset.prerenderPath === window.location.pathname) hydrateRoot(root, app) +else createRoot(root).render(app) diff --git a/react/src/styles/app.scss b/react/src/styles/app.scss index 7d492ae..54341d4 100644 --- a/react/src/styles/app.scss +++ b/react/src/styles/app.scss @@ -52,6 +52,7 @@ h1, h2, h3 { color: var(--site-text); font-weight: 650; line-height: 1.15; lette .routePlaceholder { padding-block: clamp(4rem, 10vw, 8rem); max-width: 850px; } .routePlaceholder h1 { font-size: clamp(2rem, 5vw, 3.5rem); } .routePlaceholder > p:not(.eyebrow) { color: var(--site-muted); max-width: 60ch; margin-block: 1.5rem; } +.routePlaceholder code { color: var(--site-link); } .themeToggle { position: relative; display: inline-flex; flex-shrink: 0; align-items: center; width: 70px; height: 30px; padding: 1px; border-radius: 18px; diff --git a/react/src/views/Legal/Privacy.jsx b/react/src/views/Legal/Privacy.jsx index c0c7f67..631b45d 100644 --- a/react/src/views/Legal/Privacy.jsx +++ b/react/src/views/Legal/Privacy.jsx @@ -1,14 +1,20 @@ +import { Container } from "react-bootstrap"; +import { Link } from "react-router-dom"; + export default function Privacy() { - return ( -
-
-

Privacy policy

-

- This is a template placeholder. Replace it with a policy - reviewed for the generated application, its data handling, - providers, jurisdiction, and users before production. -

-
-
- ); + return +

BortStack · Privacy

+

Privacy policy

+

This page describes the current website’s technical handling of project enquiries and theme preferences. The full privacy notice is pending review before publication.

+

Project enquiries

+

The contact form asks for your name, email address and project description. You may also choose a service. The independent contact service validates these details and, when email delivery is enabled, sends the enquiry to BortStack through Resend. Your address is used as the reply-to address. Enquiry details are used to respond, discuss potential project work and prepare a proposal or quote when requested. They are not used for later marketing messages. The website does not save an enquiry in its own database or in browser storage.

+

Enquiries that do not become client work are reviewed after 12 months and deleted when there is no continuing business reason to keep them. Relevant correspondence for a client project is handled under a separate client-record policy. Mail backup retention remains to be confirmed.

+

Who handles enquiries

+

Resend processes outbound enquiry emails and stores message content and delivery records in the United States. Its published data processing agreement describes safeguards for transfers from the European Economic Area. Received mail is hosted with Hetzner in Helsinki, Finland. Prospective enquiries are not passed to a CRM, helpdesk or subcontractor. Resend’s own storage period depends on the account plan and must be checked against the configured account before publication.

+

Theme preference

+

If you switch between dark and light themes, the browser stores your choice locally under bortstack-theme. The site remains usable if that storage is unavailable.

+

Further details

+

Robert O’Reilly is responsible for how BortStack project enquiries are handled. To ask about your enquiry information or request access, correction or deletion, email support@bortstack.com. Requests are assessed under applicable data protection rules; deletion is not automatic where information still needs to be kept. The legal basis, backup retention and full data-rights wording are still being confirmed. This page must be reviewed and completed before the website is published.

+

Contact BortStack

+
; } diff --git a/react/src/views/MarketingRoutes.test.jsx b/react/src/views/MarketingRoutes.test.jsx index 7244dea..937914e 100644 --- a/react/src/views/MarketingRoutes.test.jsx +++ b/react/src/views/MarketingRoutes.test.jsx @@ -20,6 +20,7 @@ describe("public marketing routes", () => { await waitFor(() => expect(screen.getByText(/Enquiries are temporarily unavailable/)).toBeInTheDocument()); } else expect(fetchMock).not.toHaveBeenCalled(); + if (path === "/privacy") await waitFor(() => expect(document.querySelector('meta[name="robots"]')).toHaveAttribute("content", "noindex, nofollow")); expect(screen.queryByRole("link", { name: /login|register|dashboard/i })).not.toBeInTheDocument(); }); it("exposes the four marketing links and closes navigation on selection", async () => { diff --git a/react/src/views/PublicPages.test.jsx b/react/src/views/PublicPages.test.jsx index 1ed7219..56e3afd 100644 --- a/react/src/views/PublicPages.test.jsx +++ b/react/src/views/PublicPages.test.jsx @@ -14,10 +14,12 @@ describe("generic public pages", () => { expect(screen.getByRole("heading", { name: /software solutions/i })).toBeInTheDocument(); }); - it("marks legal pages as placeholders", () => { - const { rerender } = render(); - expect(screen.getByText(/template placeholder/i)).toBeInTheDocument(); - rerender(); + it("describes verified privacy flows while leaving terms unpublished", () => { + const { unmount } = render(); + expect(screen.getByText(/The contact form asks for your name/i)).toBeInTheDocument(); + expect(screen.getByText(/full privacy notice is pending review/i)).toBeInTheDocument(); + unmount(); + render(); expect(screen.getByText(/template placeholder/i)).toBeInTheDocument(); });