Platform CLI Use cases
Learn
Developer docs User guide Quickstart CLI and AI agents Blog
Company
Services About Contact Links Get started
Political campaigns

Halvorsen for Wrenfield: a self-hosted CMS for political campaigns — an open-source .NET campaign website

A political campaign website for a fictional candidate in a nonpartisan county race: a plan laid out like a sample ballot with the cost of each item, a precinct map with polling places from content, a countdown to Election Day and a road of key dates worked out on the server, events split into today and coming up, every questionnaire answered in public, and members-only desks for volunteers and staff. Built on Raytha, a self-hosted, open-source .NET CMS for political campaigns and the consultants, agencies and freelancers who build their sites.

Build time
Under an hour
Built with
Raytha 2.0.1
Industry
Political campaigns
Rebuild
One script, from GitHub
Halvorsen for Wrenfield: a self-hosted CMS for political campaigns — an open-source .NET campaign website
Walkthrough

See it in action

A short, silent tour of the finished site, recorded from the real pages.

Silent walkthrough, 1080pOpen the MP4
The site

Take the tour

10 screens from the finished site, on desktop and on a phone. Use the arrow keys, swipe, or open any screen full size.

01 / 10Home: the yard sign, a countdown to Election Day worked out on the server, and the road to April 6
The write-up

For each Raytha use case we take a realistic brief, build the site on a fresh Raytha instance, and publish what comes out: the site, the files behind it, and a kit you can use to rebuild it yourself. This one is a political campaign website for a candidate in a nonpartisan county race: the plan a voter reads before a forum, the precinct map that answers "where do I vote", the countdown to Election Day, and a volunteer desk where canvassers find their next shift. It is written for campaigns that want to run their own site, and for the consultants, agencies and freelancers who build candidate sites every cycle.

If you are looking for a self-hosted CMS for political campaigns, or an open-source .NET CMS for a candidate website, this is the kind of site that fits: plan items, precincts, events, endorsements, questionnaire answers and key dates as structured content, server-rendered pages, and members-only areas for volunteers and staff built on Raytha's own user accounts and groups. No client-side app in the layout.

Noor Halvorsen, Wrenfield County and everyone named on the site are fictional, and the race is a nonpartisan seat; no party is named or implied. Phone numbers use the 555 range. There are no donation, payment or sign-up forms; the volunteer and staff accounts exist only for the demo.

A campaign site built around the yard sign and the sample ballot

Most voters arrive at a local candidate's site with three questions: what will you actually do, when is the election, and where do I vote? The home page answers them in that order.

  • The yard sign and the countdown. The hero is the candidate's yard sign, with a card next to it counting the days to Election Day. A strip across the top of every page says how many days are left and when early voting opens. Both are worked out on the server from the dates stored as content.
  • The road to Election Day. Seven milestones (launch, filing deadline, the newspaper forum, the registration deadline, early voting, Election Day) sit on a rail, with a "today" marker placed between the last date passed and the next one, and "in 17 days" or "71 days ago" under each.
  • The plan as a sample ballot. Seven plan items are laid out like the ballot voters will get in the mail, with ovals and item numbers. Each item page has three boxes: what the candidate will do, what it costs and where the money comes from, and how voters will know it worked.
  • The district map. An SVG map of eight precincts along a river. Each precinct's outline, number, label and polling-place marker come from precinct content, so the campaign fixes a polling place by editing an item, not the artwork.
  • How to vote. Pick a precinct from a plain GET form and the server highlights it on the map and names the polling place, next to the deadlines that still matter.
  • On the trail. Town halls, forums and porch coffees, split on the server into today, coming up and already happened. Volunteer-only events are listed with a lock.
  • Asked and answered. Every questionnaire from the newspaper, unions, neighborhood groups and voters, with a one-line answer and the full one, filterable by topic.
  • A volunteer desk and a staff desk behind sign-in: open shifts with fill counts and a turf map shaded by doors knocked for volunteers; precinct numbers, deadlines and memos for staff.

Design: yard sign and sample ballot

The look borrows from local campaign print: a deep green and marigold yard sign on wire stakes, a ballot with ovals and a dashed rule between items, cream paper and dark ink. Headings are set in Source Serif 4, body text in Public Sans, and dates, labels and counts in IBM Plex Mono. There are no wide display fonts. The green and gold were chosen to stay clear of party colors.

Why a campaign, or the firm building for one, looks at a self-hosted CMS

  • The campaign keeps its site and its volunteer accounts. Campaigns are short and the data is sensitive. With Raytha the content model, templates and user accounts live in a database the campaign or its consultant controls. After Election Day the site can be archived, handed to the officeholder's team, or reused next cycle, without a vendor deciding what happens to it.
  • Volunteers without per-seat pricing. A local race can have a few hundred volunteers and a handful of staff. Every one of them can have an account, and Raytha has no seat licensing.
  • Members-only areas checked on the server. Shift details, turf counts and staff memos carry an audience. Templates check CurrentUser.UserGroups before rendering, so a memo or a precinct's door count is never sent to a browser that should not see it.
  • It can run where the client needs it. Raytha is ASP.NET Core with PostgreSQL. A party caucus, a union political program or a consultancy that already runs .NET and Windows servers can host it alongside its other systems, with role-based admin permissions and audit logs. It can also deploy on Railway in a few minutes.
  • A kit a consultant can reuse every cycle. The content types, templates and rebuild script are ordinary files. A firm that builds a dozen candidate sites a year can start each one from the kit, change the names, dates and precincts, and hand over a running site plus the repository.
  • It works next to the tools campaigns already use. Contributions, the voter file and the volunteer CRM usually live in dedicated, compliance-focused products. Raytha runs the public site and the volunteer areas alongside them, and its REST API and webhooks can move content or counts between systems.

Raytha fits campaigns, and the consultants and agencies that build for them, that want to own their stack: the code is open source, the content model is yours, and the site can run on infrastructure you control, with volunteer accounts kept in-house. If you would rather not run it, Raytha can be fully hosted and managed for you under contract. Where another platform may suit you better is if you need a large plugin marketplace, or an all-in-one suite with donation processing, a voter CRM and marketing automation built in. For fair comparisons with platforms .NET teams often evaluate, see Raytha vs WordPress, Raytha vs Umbraco, Raytha vs DNN and Raytha vs Kentico.

How the dates and the map work

  • The clock. Templates start from "now" | date in the site's time zone and convert stored YYYY-MM-DD dates to day counts, so the countdown, the road rail and the "today / coming up / already happened" split on the events page stay correct without anyone editing them.
  • The road rail. Milestones are spaced evenly; the "today" marker is placed between the last date passed and the next one in proportion to the days in between.
  • The map. An inline SVG. Each precinct stores its outline as path data, a label position and a polling-place position. The public map colors precincts and marks polling places; the volunteer desk draws the same outlines shaded by doors knocked against the door goal.
  • Search runs get_content_items with an OData contains(...) filter across the plan, answers, events, precincts, endorsements, notes and dates, and shows only the titles of members-only notes to visitors who are not signed in.

How the members-only desks work

  • Two user groups: volunteers and staff. Staff see everything volunteers see; admins see everything.
  • Notes and events have an audience field (everyone, volunteers, staff). Detail templates render either the content or a lock panel with a sign-in link. Lists show members-only titles with a lock and leave their contents out. The page description in the HTML head falls back to a generic line for members-only items, so no summary leaks there either.
  • Precinct pages show canvass progress (doors knocked against the goal, and the precinct captain) only to signed-in volunteers and staff.
  • The volunteer desk at /volunteers shows a volunteer badge, the next shifts with how many spots are open, the shaded turf map, this week's briefs and the door script. The staff desk at /staff shows days to Election Day and to the registration deadline, district door totals, a precinct table that flags precincts behind 40 percent, and staff memos.
  • Sign-in uses Raytha's built-in login page, restyled to match. There is no registration form: in the story, the field organizer opens a volunteer account after a first shift. For more on the pattern, see creating a members-only website.

What is in the kit

Eight content types (plan items, precincts, events, endorsements, questionnaire answers, milestones, notes, volunteer shifts), two user groups, site pages for the district map, how to vote, Meet Noor, Help out, Search, the volunteer desk and the staff desk, and menus, all rebuildable with one command from the kit in the examples repository. Route check: 91 routes checked, 0 failed.

Run it yourself

Run this on your own Raytha

Raytha is free and open source (MIT). Deploy your own copy on Railway, with PostgreSQL included, then load this site into it from the rebuild kit.

  1. Deploy RaythaThe Railway template sets up Raytha, PostgreSQL and a volume for uploads. Open the new site and create your administrator.
  2. Create an API keyIn the admin: People, Admins, open your account, then Create API key.
  3. Import the kitInstall the Raytha CLI, set RAYTHA_URL and RAYTHA_API_KEY, and run the kit's build.sh on the fresh site.

Prefer your own server? Raytha also runs with Docker.

Share Post LinkedIn

Build yours on Raytha

Free, open source and ready to deploy in minutes. Bring a brief and an AI agent.