Implement BS-008 privacy draft and public prerendering

This commit is contained in:
rob
2026-11-12 09:19:30 +00:00
parent 855913ccf6
commit ebfb10d91e
19 changed files with 216 additions and 46 deletions
+1
View File
@@ -12,6 +12,7 @@ venv/
node_modules/ node_modules/
dist/ dist/
.ssr-temp/
coverage/ coverage/
playwright-report/ playwright-report/
test-results/ test-results/
+1 -1
View File
@@ -4,6 +4,6 @@ ROBORTO_TASK_ID_PATTERN='^[0-9]{3}$'
ROBORTO_WORKTREE="${ROBORTO_PROJECT_ROOT}/.test-worktrees/task-${ROBORTO_TASK_ID}" ROBORTO_WORKTREE="${ROBORTO_PROJECT_ROOT}/.test-worktrees/task-${ROBORTO_TASK_ID}"
ROBORTO_HOOK="${ROBORTO_PROJECT_ROOT}/.roborto/testtask-hook" ROBORTO_HOOK="${ROBORTO_PROJECT_ROOT}/.roborto/testtask-hook"
# Loopback-only manual testing; fixed ports prevent concurrent conflicting sessions. # 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_PORTS=(15001 18081)
ROBORTO_READY_LABELS=(API Web) ROBORTO_READY_LABELS=(API Web)
+2
View File
@@ -1,5 +1,7 @@
# BortStack current state # 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. 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 ## BS-006 candidate
+18
View File
@@ -20,6 +20,24 @@
## Open / confirm before publishing or connecting production ## 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. - 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 actual domain and DNS changes, correct API Admin public link / hostname.
- Confirm business email inbox, Resend domain verification, desired legal disclosures and privacy retention. - Confirm business email inbox, Resend domain verification, desired legal disclosures and privacy retention.
+14
View File
@@ -1,5 +1,19 @@
# BS-006 Projects handoff # 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. 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. 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.
+11 -1
View File
@@ -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-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-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-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-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 | | BS-010 | Final visual reconciliation and launch prep | Authentic brand/media, verified contact/domain and final review |
## Lifecycle and constraints ## 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. 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. 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.
+7 -1
View File
@@ -35,8 +35,14 @@ http {
expires 0; expires 0;
} }
error_page 404 /404.html;
location = / {
try_files /index.html =404;
}
location / { location / {
try_files $uri $uri/ /index.html; try_files $uri/index.html $uri $uri/ =404;
} }
location /assets/ { location /assets/ {
+7
View File
@@ -28,6 +28,13 @@ test('public shell has accessible landmarks and first keyboard skip link', async
expect((await new AxeBuilder({ page }).analyze()).violations).toEqual([]) 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 }) => { test('navigation works and closes on mobile selection', async ({ page, isMobile }) => {
await page.goto('/') await page.goto('/')
const navigation = page.getByRole('navigation', { name: 'Main navigation' }) const navigation = page.getByRole('navigation', { name: 'Main navigation' })
+1 -1
View File
@@ -5,7 +5,7 @@
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
"build": "vite build", "build": "vite build && vite build --ssr src/App.jsx --outDir .ssr-temp --emptyOutDir && node scripts/prerender.mjs",
"lint": "eslint .", "lint": "eslint .",
"test": "vitest run", "test": "vitest run",
"test:coverage": "vitest run --coverage", "test:coverage": "vitest run --coverage",
+60
View File
@@ -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 = /<h1\b/.test(staticHtml);
const context = await browser.newContext({ viewport: { width, height: 900 } });
if (pathname === '/privacy' && width === 390) await context.addInitScript(() => 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; });
+37
View File
@@ -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('&', '&amp;').replaceAll('"', '&quot;').replaceAll('<', '&lt;').replaceAll('>', '&gt;');
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('<html lang="en">', `<html lang="en" data-prerender-path="${escapeHtml(route.path)}">`)
.replace('<div id="root"></div>', `<div id="root">${body}</div>`)
.replace(/<title>[^<]*<\/title>/, `<title>${escapeHtml(pageTitle(route.title))}</title>`)
.replace(/(<meta name="description" content=")[^"]*("\s*\/?>)/, `$1${escapeHtml(route.description)}$2`)
.replace(/(<meta name="robots" content=")[^"]*("\s*\/?>)/, `$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('<html lang="en">', '<html lang="en" data-prerender-path="/404">')
.replace('<div id="root"></div>', `<div id="root">${missing}</div>`)
.replace(/<title>[^<]*<\/title>/, '<title>Page not found | BortStack</title>')
.replace(/(<meta name="robots" content=")[^"]*("\s*\/?>)/, '$1noindex, nofollow$2');
await writeFile(join(dist, '404.html'), missingHtml);
console.log(`Prerendered ${routes.length} public routes.`);
+14 -18
View File
@@ -9,31 +9,26 @@ import Services from "./views/Services/Services";
import About from "./views/About/About"; import About from "./views/About/About";
import Contact from "./views/Contact/Contact"; import Contact from "./views/Contact/Contact";
import Projects, { ProjectCaseStudy } from "./views/Projects/Projects"; 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 = [ export default function App({ Router = BrowserRouter, routerProps = {} }) {
["privacy", "Privacy policy", "Privacy information is awaiting review against the actual website data flows before publication."],
];
export default function App() {
return ( return (
<div className="app"> <div className="app">
<BrowserRouter> {createElement(Router, routerProps, <>
<a className="skipLink" href="#main-content">Skip to main content</a> <a className="skipLink" href="#main-content">Skip to main content</a>
<Header /> <Header />
<main id="main-content" className="pageContent" tabIndex="-1"> <main id="main-content" className="pageContent" tabIndex="-1">
<Routes> <Routes>
<Route index element={<><PageMeta /><Homepage /></>} /> <Route index element={<><PageMeta {...publicPageMeta["/"]} /><Homepage /></>} />
<Route path="services" element={<><PageMeta title="Services" description="Website development, custom software, API integration and managed hosting from BortStack." /><Services /></>} /> <Route path="services" element={<><PageMeta {...publicPageMeta["/services"]} /><Services /></>} />
<Route path="about" element={<><PageMeta title="About" description="BortStack’s approach to practical software development, clear communication and ongoing support." /><About /></>} /> <Route path="about" element={<><PageMeta {...publicPageMeta["/about"]} /><About /></>} />
<Route path="contact" element={<><PageMeta title="Contact" description="Discuss your software project with BortStack." /><Contact /></>} /> <Route path="contact" element={<><PageMeta {...publicPageMeta["/contact"]} /><Contact /></>} />
<Route path="projects" element={<><PageMeta title="Projects" description="Explore BortStack software projects: RouletteBuddy, PitchInvader and API Admin." /><Projects /></>} /> <Route path="projects" element={<><PageMeta {...publicPageMeta["/projects"]} /><Projects /></>} />
<Route path="projects/:slug" element={<ProjectCaseStudy />} /> <Route path="projects/:slug" element={<ProjectCaseStudy />} />
{pages.map(([path, title, description]) => ( <Route path="privacy" element={<><PageMeta {...publicPageMeta["/privacy"]} /><Privacy /></>} />
<Route key={path} path={path} element={<>
<PageMeta title={title} description={description} noIndex />
<RoutePlaceholder title={title} description={description} />
</>} />
))}
<Route path="*" element={<> <Route path="*" element={<>
<PageMeta title="Page not found" noIndex /> <PageMeta title="Page not found" noIndex />
<RoutePlaceholder title="Page not found" description="This page is not available. Use the navigation to explore BortStack." /> <RoutePlaceholder title="Page not found" description="This page is not available. Use the navigation to explore BortStack." />
@@ -41,7 +36,8 @@ export default function App() {
</Routes> </Routes>
</main> </main>
<Footer /> <Footer />
</BrowserRouter> </>)}
</div> </div>
); );
} }
App.propTypes = { Router: PropTypes.elementType, routerProps: PropTypes.object };
@@ -1,8 +1,9 @@
import { useState } from "react"; import { useEffect, useState } from "react";
import { FiMoon, FiSun } from "react-icons/fi"; import { FiMoon, FiSun } from "react-icons/fi";
export default function ThemeToggle() { 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() { function toggle() {
const next = theme === "dark" ? "light" : "dark"; const next = theme === "dark" ? "light" : "dark";
document.documentElement.dataset.bsTheme = next; document.documentElement.dataset.bsTheme = next;
+9
View File
@@ -8,3 +8,12 @@ export const site = Object.freeze({
export function pageTitle(title) { export function pageTitle(title) {
return title ? site.titleTemplate.replace("%s", title) : site.defaultTitle; 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 },
});
+5 -6
View File
@@ -1,9 +1,8 @@
import { StrictMode } from 'react' import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client' import { createRoot, hydrateRoot } from 'react-dom/client'
import App from './App.jsx' import App from './App.jsx'
createRoot(document.getElementById('root')).render( const root = document.getElementById('root')
<StrictMode> const app = <StrictMode><App /></StrictMode>
<App /> if (root.hasChildNodes() && document.documentElement.dataset.prerenderPath === window.location.pathname) hydrateRoot(root, app)
</StrictMode>, else createRoot(root).render(app)
)
+1
View File
@@ -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 { padding-block: clamp(4rem, 10vw, 8rem); max-width: 850px; }
.routePlaceholder h1 { font-size: clamp(2rem, 5vw, 3.5rem); } .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 > p:not(.eyebrow) { color: var(--site-muted); max-width: 60ch; margin-block: 1.5rem; }
.routePlaceholder code { color: var(--site-link); }
.themeToggle { .themeToggle {
position: relative; display: inline-flex; flex-shrink: 0; align-items: center; position: relative; display: inline-flex; flex-shrink: 0; align-items: center;
width: 70px; height: 30px; padding: 1px; border-radius: 18px; width: 70px; height: 30px; padding: 1px; border-radius: 18px;
+17 -11
View File
@@ -1,14 +1,20 @@
import { Container } from "react-bootstrap";
import { Link } from "react-router-dom";
export default function Privacy() { export default function Privacy() {
return ( return <Container as="article" className="routePlaceholder">
<main> <p className="eyebrow">BortStack · Privacy</p>
<article>
<h1>Privacy policy</h1> <h1>Privacy policy</h1>
<p role="note"> <p>This page describes the current website’s technical handling of project enquiries and theme preferences. The full privacy notice is pending review before publication.</p>
This is a template placeholder. Replace it with a policy <h2>Project enquiries</h2>
reviewed for the generated application, its data handling, <p>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.</p>
providers, jurisdiction, and users before production. <p>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.</p>
</p> <h2>Who handles enquiries</h2>
</article> <p>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.</p>
</main> <h2>Theme preference</h2>
); <p>If you switch between dark and light themes, the browser stores your choice locally under <code>bortstack-theme</code>. The site remains usable if that storage is unavailable.</p>
<h2>Further details</h2>
<p>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 <a href="mailto:support@bortstack.com">support@bortstack.com</a>. 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.</p>
<p><Link to="/contact">Contact BortStack</Link></p>
</Container>;
} }
+1
View File
@@ -20,6 +20,7 @@ describe("public marketing routes", () => {
await waitFor(() => expect(screen.getByText(/Enquiries are temporarily unavailable/)).toBeInTheDocument()); await waitFor(() => expect(screen.getByText(/Enquiries are temporarily unavailable/)).toBeInTheDocument());
} }
else expect(fetchMock).not.toHaveBeenCalled(); 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(); expect(screen.queryByRole("link", { name: /login|register|dashboard/i })).not.toBeInTheDocument();
}); });
it("exposes the four marketing links and closes navigation on selection", async () => { it("exposes the four marketing links and closes navigation on selection", async () => {
+6 -4
View File
@@ -14,10 +14,12 @@ describe("generic public pages", () => {
expect(screen.getByRole("heading", { name: /software solutions/i })).toBeInTheDocument(); expect(screen.getByRole("heading", { name: /software solutions/i })).toBeInTheDocument();
}); });
it("marks legal pages as placeholders", () => { it("describes verified privacy flows while leaving terms unpublished", () => {
const { rerender } = render(<Privacy />); const { unmount } = render(<MemoryRouter><Privacy /></MemoryRouter>);
expect(screen.getByText(/template placeholder/i)).toBeInTheDocument(); expect(screen.getByText(/The contact form asks for your name/i)).toBeInTheDocument();
rerender(<Terms />); expect(screen.getByText(/full privacy notice is pending review/i)).toBeInTheDocument();
unmount();
render(<Terms />);
expect(screen.getByText(/template placeholder/i)).toBeInTheDocument(); expect(screen.getByText(/template placeholder/i)).toBeInTheDocument();
}); });