Skip to content

Public website

The public website is Kalmar Energi’s customer-facing Nuxt application. Page content is managed in Strife and read from RavenDB by the server. The site also provides customer-facing disruption information through server-side integrations.

  • Presents CMS-managed pages and navigation to public visitors
  • Renders content from reusable Strife chapter templates
  • Provides customer-facing disruption information
  • Supports live preview for editors working in Strife
  • Strife content management and administration
  • Operation of external data providers

This page gives a high-level delivery overview. For local setup, see the public website repository README; exact pipeline triggers and checks are defined in its pipeline files.

The application consists of:

  • Nuxt frontend and server-side API handlers
  • Strife schemas and published content stored through RavenDB
  • Chapter components that render CMS content
  • Integrations for disruption information and shared site content
  • Azure-hosted deployment

During a build, wlsn/generateRoutes.ts reads published URLs from the RavenDB Content/ByUrl index and supplies them to Nuxt. The catch-all page at app/pages/[...uid].vue fetches the published page for the requested URL. chapter-zone.vue maps each Strife chapter template to its corresponding Vue component.

Most pages are prerendered from the published CMS content. Pages containing a Disruptions chapter use request-time rendering with a short stale-while-revalidate period so disruption information can remain current.

flowchart LR
  Strife["Strife content"] --> RavenDB["RavenDB"]
  RavenDB --> Routes["Build route discovery"]
  RavenDB --> Page["Nuxt page API"]
  Routes --> Nuxt["Nuxt rendering"]
  Page --> Nuxt
  Nuxt --> Chapters["Chapter components"]
  Disruptions["Disruption service"] --> Nuxt
  Nuxt --> Visitors["Website visitors"]

Azure DevOps builds and deploys the public website through four flows:

  • Pull request: a branch policy runs automated checks and deploys a preview environment for review. New commits update the preview.
  • Merge to main: the change is built and deployed to the development environment.
  • Production code release: use an annotated vMAJOR.MINOR.PATCH tag, for example v1.2.3. Leading zeroes and suffixes such as -rc.1 are not accepted. Add a short descriptive tag message; the pipeline checks the tag format and successful main build, not the message.
  • Production content update: publishing or unpublishing content in Strife can trigger a rebuild and deployment using the code version already active in production, when content deployment is enabled.

Production deployments run smoke checks. See Operations: Public website for monitoring and deployment follow-up.

Resources:

When a page is opened from the Strife editor with a token query parameter, the live-preview component boots the Strife SDK and subscribes to content updates. Updates are stored in shared Nuxt state and take precedence over the published page while the editor is open.

The application requires access to the content service for content-dependent builds. Generated Strife types must be regenerated when CMS schemas change; the generated file is not edited by hand.

For public website incidents or support requests, users will need to submit a ticket in Service Desk and select Mjukvaruutveckling (Intern mjukvaruutveckling).

  • Published CMS content is normally fixed at build time, so content-dependent builds require content-service access.
  • Disruption pages follow a different rendering path to provide fresher data.
  • Disruption information depends on the availability and behavior of its external service.
  • Changes to Strife schemas require synchronized generated types and corresponding component changes.