Technology
PollSignal is built as a static-first website on Cloudflare, with a path to a small dynamic application when constituency lookup and alerts move beyond placeholders.
Current website
The public site is generated with Hugo and the Hextra theme. Hugo gives us fast static pages, Markdown source content, clean generated URLs, a sitemap, RSS-style outputs where needed, and machine-readable Markdown versions of pages.
Hextra provides the documentation-style features we want to keep: search, dark and light theme support, Markdown output for LLMs, navigation, responsive page layouts, and a simple docs/reference section.
Hosting and delivery
The site is deployed to Cloudflare Workers
using Workers Static Assets. Static files are generated into public/ and then
served from Cloudflare’s edge network.
The production domain is pollsignal.uk. The apex domain serves the site
directly. www.pollsignal.uk is handled by a small Worker redirect so visitors
end up on the canonical apex domain.
Deployment uses NixOS tools.
Dynamic application direction
The first public version is mostly static, but the architecture is chosen so the site can grow into a dynamic Cloudflare Worker application without changing platforms.
Planned application pieces:
| Technology | Role |
|---|---|
| Cloudflare Workers | Edge runtime for future dynamic pages, redirects, lookup requests, and alerts. |
| Hono | Small HTTP framework for Worker routes and middleware. |
hono/jsx | Server-rendered HTML components for forms, tables, and response fragments. |
| htmx | Progressive enhancement for form submissions and targeted page updates without a SPA. |
| Cloudflare D1 | Relational storage for constituency data, recommendations, sessions, and audit records. |
| Cloudflare R2 | Object storage for larger exports, archives, and generated files. |
| Forward Email | Contact form delivery and inbound receipt webhooks for operator mail workflows. |
Internal content access
PollSignal uses Decap CMS as an internal CMS for website content. It is not part of the public website.
Current access is split by responsibility:
| Mechanism | Current role |
|---|---|
| Cloudflare Access | Protects the internal Decap admin site at admin.pollsignal.uk. |
| Google / approved identity providers | Authenticates approved editors through the Cloudflare Access login flow. |
| GitHub OAuth | Lets Decap write to the private content repository after an editor is allowed into the admin site. |
The public website reads content from the separate content repository during build. The public site does not expose Decap or GitHub write access.
Design principles
- Keep the public information pages static where static is enough.
- Use server-rendered HTML before client-side application code.
- HTMX mostly, to shift the load from the client to the server, limit client-side attack surface and the number of endpoints to debug.
- Keep data and secrets inside Cloudflare-native bindings and encrypted project configuration.
- Prefer plain, inspectable Markdown and ADRs for content and technical decisions.
- Keep deployment reproducible through Hugo, Wrangler, and explicit Cloudflare configuration.
Operational notes
The website content reference is available at /docs/.