Deliverable 08 · Develop
WordPress Build & QA
Block theme structure, content model, hosting, accessibility, testing and launch readiness.
Stack
Standard WordPress, used the modern way. No page builder, no plugins required for the design, nothing the City’s team couldn’t host and maintain on ordinary WordPress hosting.
WordPress block theme
WordPress 7.1 · springfield 0.5.0
City staff already know WordPress. A block theme means every page, header and footer is editable block markup instead of PHP templates only a developer can touch.
theme.json
schema version 3
One file holds the palette, three font families, six font sizes, five spacing steps, two layout widths and the card shadow. WordPress turns it into Global Styles and editor controls.
PHP block patterns
6 patterns · Inserter: no
Header, footer, hero, quick services, community card and resources strip are generated in PHP (so URLs and icons stay correct) but output standard block markup.
Custom post types
event · showcase · sf_request + industry
Events carry start, end and location meta; businesses are grouped by a hierarchical Industry taxonomy; sample requests feed City Insights. All registered in functions.php and inc/insights.php.
Vanilla JavaScript
forms.js 3.1 KB · insights.js 3.8 KB
The service previews and City Insights need a few hundred lines of plain JS, loaded only on /demo/. No framework, no build step, no dependencies to patch.
WP-CLI setup scripts
setup.sh · seed*.php · serve.sh
One idempotent command installs WordPress, activates the theme and seeds every page, news post, event, business and photo. Safe to re-run.
GoDaddy cPanel + Apache
PHP 8.2
Standard shared WordPress hosting the City can manage itself, on the springfield.davinci-x.com subdomain.
GitHub repository
jloliv/springfield-wordpress · private
Theme, scripts, README and TEST-REPORT under version control. WordPress core, the database, uploads and credentials are deliberately left out.
- CMS
- WordPress 7.1 (block theme)
- Server
- PHP 8.2 · Apache on GoDaddy cPanel hosting
- Domain
- springfield.davinci-x.com (subdomain of the DaVinci-X site)
- Local dev
- PHP built-in server on port 8095 via scripts/serve.sh and router.php; WP-CLI setup in scripts/setup.sh
System architecture
A classic WordPress request: content in the database, presentation in the theme, HTML rendered by PHP on each visit. The interesting part is the browser at the bottom, where the service previews deliberately stop.
Scroll sideways to see the full diagram.
1Everything editors change (pages, news, events, businesses, sample requests and Global Styles) is saved through wp-admin into the database.
2The theme decides how it looks. Templates call patterns, patterns call springfield_icon() and shortcodes like [sf_events] and [sf_service_forms].
3The sessionStorage boundary is the privacy line: what a visitor types into a preview never leaves their tab.
Theme & repository structure
The real folder tree. The theme folder is the deliverable: copy it into wp-content/themes and activate it.
- springfield-wordpress/
- ├─ README.md · TEST-REPORT.md# Setup notes and the local verification pass
- ├─ scripts/
- │ ├─ setup.sh# Install WordPress, wp-config, activate theme, seed
- │ ├─ serve.sh · router.php# PHP built-in server on :8095
- │ ├─ seed.php# Pages, news posts, events
- │ ├─ seed-businesses.php# City Directory businesses + industries
- │ ├─ seed-images.php# Imports theme photos into Media
- │ └─ complete-pages.php · page-content.json# Fuller copy for information pages
- ├─ site-dev/# This case study (Next.js static export)
- └─ theme/springfield/# The installable theme
- ├─ style.css# Theme header (name, version, requirements)
- ├─ theme.json# Design tokens and Global Styles
- ├─ functions.php# Post types, meta, [sf_events], event block, noindex
- ├─ inc/
- │ ├─ icons.php# 13 inline SVG icons: springfield_icon()
- │ ├─ service-forms.php# [sf_service_forms]: 8 service previews
- │ └─ insights.php# sf_request type, meta box, City Insights
- ├─ templates/# front-page, home, index, page, page-contact,
- │# page-demo, single, single-event, archive-event,
- │# search, 404 (11 templates)
- ├─ parts/# header.html, footer.html
- ├─ patterns/# header, footer, home-hero, home-services,
- │# home-community, home-resources
- └─ assets/
- ├─ css/# site.css (14 KB), forms.css (4 KB)
- ├─ js/# forms.js, insights.js
- ├─ img/# seal.svg, 5 photos, CREDITS.md
- └─ site-dev/# Built case study, linked from the footer
Conventions
1Templates stay thin: header part, one main group, footer part. Page-specific layouts live in patterns so they can be reused.
2Everything is prefixed: springfield_ for PHP functions, sf- for CSS classes, sf_ for post meta and shortcodes. No collisions with plugins.
3Seed scripts are idempotent: records are matched by slug and updated in place, so running setup twice never duplicates content.
4Service previews come from one data array in service-forms.php. Adding a ninth service is one array entry, not a new template.
Service preview routes
- Pay Utility Bill
/demo/?action=pay-bill
Account lookup, amount, review, simulated payment confirmation
- Report a Problem
/demo/?action=report-problem
Category + details, review, reference number; optional browser-only tracking
- Apply for a Permit
/demo/?action=permit
Permit type, project details, estimated cost, review/edit, preview confirmation
- Trash & Recycling
/demo/?action=trash
Collection schedules and guidelines
- Parks & Recreation
/demo/?action=parks
Programs, facilities and events
- Careers
/demo/?action=employment
City jobs preview
- Public Records
/demo/?action=public-records
Records request preview
- Contact
/demo/?action=contact
Contact preview (also /contact/)
- City Insights
/demo/?action=insights
Request totals, status counts, category chart, filters, register, CSV export
Content model
Six WordPress content types plus Media, and one record type that lives only in the visitor’s browser. Built-in posts and pages are reused wherever they fit; custom types exist only where the fields are genuinely different.
Scroll sideways to see the full diagram.
| From | To | Cardinality | Via |
|---|---|---|---|
| Showcase (Business) | Industry | N : M | wp_term_relationships · /industry/{slug}/ archives |
| Industry | Industry | N : 0..1 | term parent (hierarchical taxonomy) |
| Post (News) | Media | N : 0..1 | _thumbnail_id featured image |
| Event | Media | N : 0..1 | _thumbnail_id featured image |
| Showcase (Business) | Media | N : 0..1 | _thumbnail_id featured image |
| Page | Page | N : 0..1 | post_parent (page hierarchy) |
| Page (Service Center /demo/) | Sample request | 1 : N | get_posts(sf_request) when action=insights; not a stored key |
| Visitor sample | Sample request | merged | insights.js joins both lists in the browser; never written to the database |
| Pagespage | Residents, Services, Government, Our Community, Contact, Service Center (/demo/) |
|---|---|
| Newspost | City news with featured images; /news/ archive |
| Eventsevent | Custom post type with date, time and location; /calendar/ |
| Businessesshowcase | Custom post type for the city business directory; /business/{slug}/ |
| Industriesindustry | Taxonomy grouping businesses; /industry/{slug}/ |
| Sample requestssf_request | Custom post type behind City Insights: category, neighborhood, status |
Local development & deployment
From an empty folder to the live subdomain. Every step is a script or a standard WordPress screen, so the City’s next developer can repeat it.
01Local secrets
Copy .env.example to .env.local with the local database and admin credentials. The file is git-ignored.
$ cp .env.example .env.local02Install & seed
Downloads WordPress into ./public, writes wp-config (local environment, debug log, theme development mode), installs, symlinks and activates the theme, sets tagline, timezone, permalinks and noindex, then runs the seed scripts.
$ bash scripts/setup.sh03Run locally
PHP’s built-in server with router.php, which serves real files directly and hands every other URL to WordPress. Admin at /wp-admin.
$ bash scripts/serve.sh # http://localhost:809504Commit to GitHub
Theme, scripts and docs are pushed to the private repository. Core, uploads, database dumps, .env files and zips are ignored.
05Package the theme
The Site Dev case study is built into theme/springfield/assets/site-dev, then the theme folder is zipped for upload.
$ npm run build # site-dev → theme assets06Deploy to GoDaddy
Upload and activate the theme (Appearance → Themes or cPanel File Manager into wp-content/themes). Move content with a WordPress WXR export/import, or by running the seed scripts with WP-CLI. Back up the existing site first.
Run seeds only against a demo install. They create and update content by slug. The README is explicit that the repository does not deploy hosting or transfer a database by itself; deployment is the deliberate, backed-up step above.
Security & privacy
A city website handles people’s addresses, payments and complaints. Even as a demo, it is built so that nothing personal is kept and nothing fictional can be mistaken for real.
No personal data retained
Service previews never submit to the server. A sample problem report keeps only reference, category, status and “Demo neighborhood” in sessionStorage for that tab (max 30); names, emails and free-text answers are never stored.
Demo labelling everywhere
A demo banner on every page, a /demo/ explainer page, a fictional-city line in the footer and confirmations that say “This confirmation is a demonstration.” Nothing pretends to pay, file or submit.
Not indexed
A wp_robots filter adds noindex, nofollow to every page, and setup.sh sets blog_public to 0, so a fictional city on a real place name never shows up in search.
Admin-only editing
Event and business meta can be edited only by users who can edit_posts. The sample-request meta box checks a nonce, the user’s capability and an allowlist of values. Sample data seeds only for administrators.
Escaped output
PHP output goes through esc_html, esc_attr and esc_url; City Insights builds every table cell with textContent, never innerHTML, so stored values can’t inject markup.
Secrets & backups
Credentials live in .env.local and wp-config on the server, never in Git. GoDaddy backups and a tested restore are on the launch checklist below, not assumed.
Accessibility
What is built and verified today, and what is not yet. We report it honestly: a local functional pass is not a WCAG audit.
| Requirement | WCAG | How it’s met | Status |
|---|---|---|---|
| Visible focus | 2.4.7 Focus Visible | 3px river-blue outline offset 4px on links, buttons and fields; gold-light on the navy footer and hero. Added in the QA pass. | Done |
| Reduced motion | 2.3.3 · best practice | prefers-reduced-motion removes the service-card lift transition. | Done |
| Button contrast | 1.4.3 Contrast (Minimum) | Gold darkened to #8a6a26 so white button text passes AA; gold-light kept for decoration only. | Done |
| Keyboard menu | 2.1.1 · 2.4.3 | Mobile navigation opens from the menu button; Escape closes it and returns focus to the button (verified). | Done |
| Reflow at 375px | 1.4.10 Reflow | No horizontal overflow on the homepage at 375, 768, 1024 and 1440px, and on eight key pages at 375px. | Done |
| Form labels | 1.3.1 · 3.3.2 | Every service-form field has a visible <label for>; the step list marks the current step with aria-current. | Done |
| Status messages | 4.1.3 Status Messages | Form confirmation has role=“status” and receives focus; City Insights totals update in an aria-live region. | Done |
| Decorative icons | 1.1.1 Non-text Content | springfield_icon() outputs aria-hidden, focusable=“false” SVG; icon-only search links carry aria-label. | Done |
| Inline error messages | 3.3.1 Error Identification | Today the forms rely on the browser’s built-in required-field messages. Inline, linked error text is designed but not built. | Partial |
| Full WCAG 2.2 AA audit | All AA criteria | Automated scan of every template plus screen-reader passes (VoiceOver, NVDA) on the deployed site. | Planned |
8 of 10 done. Color decisions and calculated ratios are on the Design System page.
QA results
From TEST-REPORT.md: a functional pass against the local install at localhost:8095, after the fixes listed below.
Crawl
Passed35 URLs
35 internal URLs returned HTTP 200 with no broken links
Widths
Passed4 widths
Homepage has no horizontal overflow at 375, 768, 1024 and 1440px; eight key pages checked at 375px
Keyboard
PassedMenu
Mobile navigation opens, Escape closes it and returns focus to the menu button
Search
Passed“cleanup”
Search for “cleanup” returns news, events and pages; nonsense queries show a helpful empty state
Calendar
Passed5 events
Calendar shows five events in date order with their own dates, times and locations
Editor API
PassedDrafts
Draft create, update, persistence and block parsing passed through WordPress APIs
Widths checked for horizontal overflow
| Viewport | Pages | Result |
|---|---|---|
| Phone375px | Homepage + Residents, Services, Government, Our Community, Contact, Calendar, News, Business Directory | No overflow |
| Tablet768px | Homepage | No overflow |
| Laptop1024px | Homepage | No overflow |
| Desktop1440px | Homepage | No overflow |
Fixed during QA
- Service-card sizing, mobile header overflow and hero text overlap repaired
- Visible keyboard focus and reduced-motion support added
- Gold darkened to #8a6a26 for white button text (AA)
- All seven homepage images load; PHP and setup-script syntax checks pass
Stated limits
- Local functional pass, not a full WCAG audit
- Bundled JPEGs range ~120 KB to 868 KB
- Admin editor workflow not tested in the browser
- GoDaddy capacity, DNS, HTTPS, backups and performance to verify before launch
- Payments, permits, reports, public records and the map remain labelled demo destinations
Performance
What we know from the files, and the targets we will measure on the deployed site. Targets are targets: no performance audit has been run on GoDaddy yet.
Bundled image weight
Actual file sizes in theme/springfield/assets/img.
- hero.jpg868 KB
Homepage hero (cover block)
- community.jpg492 KB
Our Community card
- news-roadwork.jpg263 KB
News: Jefferson Avenue
- news-cleanup.jpg168 KB
News: Cleanup Day
- news-council.jpg118 KB
News: Capital Plan
Everything else is light: site.css 14 KB, forms.css 4 KB, theme.json 5 KB, seal.svg under 1 KB, and 7 KB of JavaScript that loads only on /demo/.
| Metric | Target | How |
|---|---|---|
| Largest Contentful Paint | Target < 2.5 s | Compress and resize the hero (largest image today); serve WordPress-generated sizes via srcset. |
| Cumulative Layout Shift | Target < 0.1 | Seal and thumbnails carry width and height; fonts load with display=swap. |
| Interaction to Next Paint | Target < 200 ms | Only two small scripts, both limited to /demo/. |
| Hero image | Target ≤ 250 KB | Export at display width in a modern format. |
| Page caching | Target On | Enable host or plugin page caching on GoDaddy; WordPress renders on every request otherwise. |
Launch checklist & roadmap
What is done, what must be verified on the live host, and where the site goes once real City systems are connected.
Launch checklist
- Done
Theme live on GoDaddy
springfield theme active at springfield.davinci-x.com (WordPress 7.1, PHP 8.2, Apache).
- Done
Demo labelling & noindex
Banner on every page, /demo/ explainer, footer disclaimer, wp_robots noindex.
- Done
Local QA pass
35-URL crawl, widths, keyboard menu, search, calendar and editor API (TEST-REPORT.md).
- Done
Contrast, focus & motion fixes
Gold #8a6a26, visible focus, reduced-motion rule.
- To verify
HTTPS, DNS & capacity
Confirm certificate, subdomain DNS and hosting plan limits on GoDaddy.
- To verify
Backups & recovery
Schedule backups and run one test restore before relying on them.
- To verify
Production URL replacement
Check no localhost:8095 URLs remain in content or options after migration.
- To verify
Editor workflow in a browser
Publish a page, edit an event, replace a photo through wp-admin (only the API path was tested).
- To verify
Clean-browser console check
Re-check the console without browser extensions, which caused noise in the local logs.
- To verify
Image compression
Bring the five bundled JPEGs (about 120–868 KB) down to web sizes.
- To verify
Theme header refresh
style.css still describes the earlier small-town concept (Fraunces/Nunito Sans, example.com URIs); update to match theme.json.
See it live: springfield.davinci-x.com
Post-launch roadmap
Each item replaces a demo preview with a real City service. Order depends on which City systems are ready to connect.
Real utility payments Integration
Replace the simulated payment with the City’s payment processor using hosted, PCI-compliant fields, so card data never touches WordPress.
Online permits Integration
Hand permit applications to the City’s permitting system, with document upload and fee estimates from real schedules.
311 case routing Service
Turn “Report a Problem” into a tracked case routed to the right department, with real statuses feeding City Insights.
Notifications Service
Email or text updates when a case changes status, plus opt-in alerts for closures, trash schedule changes and emergencies.
Spanish-language site Content
Professionally translated pages and service forms, with a language switcher in the utility bar.
Resident accounts Platform
Optional sign-in to see past requests, saved addresses and payment history, with privacy controls and account deletion.