Template documentation / Version 2.0.1

A familiar city.
A React foundation.

The Alderford public website and admin workspace, built with the Next.js App Router, React and TypeScript.

3Public homepage layouts
14Admin demonstration screens
38Named application routes
Frontend demonstration only. No secure login, database, API or email delivery is included. Use fictional records. Read the validation status before publishing.
01 / Start here

Run the Next.js project

Install Node.js 20.9 or later. A maintained LTS version is recommended. Open a terminal in the folder containing package.json and run:

npm install
npm run dev

Open http://localhost:3000/ for the website and http://localhost:3000/admin/ for the workspace. The optional demo-entry page is /admin/login/; no password is required. Do not run the old HTML Python-server workflow against these source files.

Application dependencies are configured as Next.js 16.4.0 and React/React DOM 19.3.0. Dependencies are installed with npm; fonts load from Google Fonts. Internet access is needed for installation; retain the lockfile created by a successful install.

Open city portalOpen workspace

Application links work when served by Next.js or the static preview server.

02 / Editable source

Components, not embedded HTML

The application uses real TSX components, React state and Next navigation. There are no HTML-page iframes or legacy DOM-injection scripts. Styling is plain, editable CSS with design tokens, so there is no UI kit to learn.

src/
  app/                    App Router pages, layouts and metadata
  components/
    public/screens/       Individual public page layouts
    public/               Header, footer, heroes, cards and forms
    admin/                Workspace, editors, tables and settings
    ui/                   Shared SVG icons and UI elements
  context/                Browser-local shared demo store
  data/                   Typed seed content, images and schemas
  lib/                    Types, validation and export utilities
  styles/                 Retained CSS and React integration styles
public/                   Static images, documents and this guide
tests/                    Real-application Playwright tests
tools/                    Export, preview and image-download scripts
03 / Keep your identity

Change content without changing the design

Edit src/data/seed.json for initial content and branding. Use Admin > Portal settings for temporary changes in the current browser. Existing saved demo data takes precedence over an edited seed; export your work and reset the demo to reload the seed.

Raleway headings and Josefin Sans text are declared through the Google Fonts link in src/app/layout.tsx. No font files are included; system fallbacks apply when the font service is unreachable. Colors and spacing remain in src/styles/portal.css and src/styles/admin.css. React-specific additions are in react.css.

Public screen layouts have separate modules in src/components/public/screens/. Admin editor fields and table columns are in src/data/admin-schema.json. Page titles and descriptions live in route metadata, not in the browser-local settings form. Update those when changing the permanent brand.

04 / Explore the workflows

Public forms and admin edits share local data

Submit a fictional resident request, copy its reference, open the admin Requests screen and change its status or public note. Track that reference on the public site to see the change. Create and publish a city story to show it in the newsroom; Draft hides it from the public list.

The collection screens support search, status filters, sorting, pagination, create/edit/delete and filtered CSV export. Contact messages and newsletter subscriptions save to their admin lists. Event details generate calendar files. The media library accepts JPEG, PNG and WebP uploads up to 1 MiB each; files are stored locally and can exhaust browser storage.

Settings includes JSON export, validated import and reset confirmation. Backups from the version-1 HTML edition use the same alderford.portal.v1 storage key. Data is separate for each browser origin, port, private window and device; use a backup to move it. Other tabs on the same origin can receive storage updates.

Browser-local data is not secure staff storage. The client can inspect its seed and saved data even when a public list hides a draft. Never enter real resident information into this demonstration.
05 / Photo handling

Sources, dimensions and local fallbacks

The eight demo photographs are free Pexels images, included in public/assets/images/ and cropped to the sizes below. To re-download the original crops, run the command below with -- --force. Replace all photos with your own city imagery before launch.

npm run images:download

Run this on a machine with network access, then rebuild. The script verifies JPEG dimensions, saves successful crops under public/assets/images/ and updates src/data/photos.json. Failed images remain remote references with local fallbacks. Use -- --force to refresh downloaded files.

Target crops: hero 1920 × 723, inner banner 1920 × 426, introduction 1280 × 960, and cards 1000 × 680. These are layout dimensions, not marketplace promotional-banner dimensions.

Image / sizePhotographer / sourceFile
riverfront
1920 × 723
Melike B
Pexels source page
public/assets/images/riverfront.jpg
city-hall
1280 × 960
Niklas Jeromin
Pexels source page
public/assets/images/city-hall.jpg
park
1000 × 680
Adrien Olichon
Pexels source page
public/assets/images/park.jpg
riverside
1920 × 723
Faheem Ahamad
Pexels source page
public/assets/images/riverside.jpg
greenway
1000 × 680
Nik Cvetkovic
Pexels source page
public/assets/images/greenway.jpg
waterfront
1000 × 680
Jerome Kalan
Pexels source page
public/assets/images/waterfront.jpg
heritage
1000 × 680
Mehmet Turgut Kirkgoz
Pexels source page
public/assets/images/heritage.jpg
city-banner
1920 × 426
Sophie Otto
Pexels source page
public/assets/images/city-banner.jpg

Photographs illustrate a fictional city. No endorsement is implied. Verify your template and image permissions before distribution; source credits do not establish a resale entitlement.

06 / Build options

Node hosting or a static frontend export

npm run typecheck
npm run build
npm start

For Node hosting, use the production Next build, not the development server. A managed Next-compatible host can run the build and production service for you. No environment secrets are required by this demo.

npm run export
npm run preview

The optional export writes out/. Preview at http://127.0.0.1:4173/, then upload the contents of out/ to a static host that serves directory index.html files and supports a 404.html fallback. The project assumes a domain-root deployment. Subdirectory deployment needs coordinated asset and URL changes.

Static hosting does not add server persistence. Detail views use query-string IDs so newly created local records work without generating new build-time paths. When you add a real backend, review the export constraints again.

07 / Find a page

Page directory and legacy mapping

Use the new Next.js paths below. Old application .html URLs are not automatically rewritten. A native Next not-found page handles unknown routes in addition to the named error example.

Next.js routePagePrevious file
/about/About Alderfordabout.html
/accessibility/Accessibilityaccessibility.html
/news/details/The city journalblog-post.html
/news/Around Alderford.blog.html
/contact/Contact the citycontact.html
/departments/The people behind the everyday.departments.html
/documents/Your city, on the record.documents.html
/error-page/Page not founderror-page.html
/events/details/Community calendarevent-details.html
/events/See you around the city.events.html
/faq/Help & frequently asked questionsfaq-page.html
/home-three/Welcome to your cityhome-three.html
/home-two/Welcome to your cityhome-two.html
/Welcome to your cityindex.html
/privacy/Privacy & demo dataprivacy.html
/projects/details/City projectsprojects-details.html
/projects/A city in the making.projects-grid.html
/report-issue/Make a resident requestreport-issue.html
/search/Search the portalsearch.html
/services/details/City servicesservice-detail.html
/services/Services for everyday life.service.html
/team/details/City team profileteam-details.html
/team/Meet the city teamteam.html
/track-request/Track a requesttrack-request.html
/admin/Overviewadmin/index.html
/admin/media/Mediaadmin/media.html
/admin/settings/Settingsadmin/settings.html
/admin/help/Helpadmin/help.html
/admin/requests/Requestsadmin/requests.html
/admin/services/Servicesadmin/services.html
/admin/news/Newsadmin/news.html
/admin/events/Eventsadmin/events.html
/admin/projects/Projectsadmin/projects.html
/admin/departments/Departmentsadmin/departments.html
/admin/documents/Documentsadmin/documents.html
/admin/messages/Messagesadmin/messages.html
/admin/subscribers/Subscribersadmin/subscribers.html
/admin/login/Demo workspace entryadmin/login.html
08 / Beyond the demonstration

Add a backend before collecting real data

Replace the browser store with authenticated server reads and mutations. Use separate public and staff data models, enforce server-side authorization, validate uploads and form submissions, implement safe request verification, add secure email delivery and subscription handling, and build an audit trail. A reference number alone is not a secure credential for private request access.

The chart history, contact details and all records are fictional. Real analytics, account security, database backups, email, spam controls, consent and retention workflows are not implemented. Read documentation/INTEGRATION.md in the source package for the integration checklist.

09 / Testing

Quality checks

This edition passes npm run typecheck, npm run build and npm run export, and the included Playwright suite (43 tests) covering every route, the resident request flow from public form to admin to public tracker, publishing and deleting stories, branding persistence, mobile menus and the not-found page.

npx playwright install chromium
npm test

The tests start a local development server automatically. Set PLAYWRIGHT_BASE_URL to test an already-running build instead. Re-run the suite after customizing.