Skip to content

Tech stack · rendering

Plain .NET Blazor.

Veva is an ASP.NET Core app with one Blazor router. Every page renders on the server in one of three ways: prerendered and then interactive, interactive from the start, or as static HTML. The components are standard Blazor components with a few attributes added.

dotnet add package Veva.Web.Essentials

The stack

What Veva runs on.

The same .NET, ASP.NET Core and Blazor you already use, with Veva's modules on top.

.NET 10

Veva and its modules target net10.0. One web app, on Windows, Linux or Docker.

ASP.NET Core

BuildVeva() sets up the host in one call: routing, sign-in, antiforgery and static assets.

Blazor

One App.razor and one router. Every page address goes to a single wildcard page, which renders the page's components.

SQL Server or PostgreSQL

Entity Framework Core on SQL Server, or on PostgreSQL 18 and later with Veva.Web.PostgreSql.

Background work

The task daemon runs scheduled tasks on Hangfire, with Hangfire's dashboard for administrators.

The admin

A Vue 3 app over Veva's API. The designer edits the real page, rendered by Blazor in Server mode.

Render modes

Three ways to render a page.

Set the default in the website settings and override it per page, under the page's Advanced settings. All three render on the server, so visitors never download a .NET runtime.

Prerender

Default

The response holds the finished HTML, so the page shows at once and search engines read it. Then a Blazor Server circuit connects and the page turns interactive.

  • First paint: HTML in the response
  • Interactive: yes, once the circuit connects
  • Blazor script: loaded

Server

Interactive

The components render over the circuit instead of in the first response. Clicks and input go to the server, and only the changes come back. The designer always works this way.

  • First paint: when the circuit connects
  • Interactive: yes
  • Blazor script: loaded

Static

No circuit

Static server-side rendering: finished HTML and nothing else. The server keeps no circuit open for the visitor. Search engines and other bots always get this mode.

  • First paint: HTML in the response
  • Interactive: theme scripts only
  • Blazor script: not loaded
Navigation

In Prerender and Server mode, links move between pages inside the circuit, without a full page load. A menu link to a Static page loads it in full.

Which mode a request gets

Decided per request.

  1. 01

    Website

    The website's Page render mode is the default. It is Prerender unless you change it.

  2. 02

    Page

    A page set to anything but Default uses its own mode.

  3. 03

    Designer

    In the designer every page renders in Server mode, so editing stays interactive.

  4. 04

    Bots

    Search engines and other bots get Static, whatever the page is set to.

  5. 05

    Query string

    ?rendermode=static, server or prerender picks the mode for one request. Handy for testing.

    ?rendermode=

Standard Blazor

Components are Razor components.

A Veva component is a Blazor component you could write in any Blazor app. A few attributes put it in the editor's component picker and turn its parameters into settings.

What you already know

Blazor

Inside a component, everything is plain Blazor:

  • Parameters: [Parameter] properties, RenderFragment and child components
  • Cascades: [CascadingParameter] and <CascadingValue>
  • Lifecycle: OnInitializedAsync, OnParametersSet and StateHasChanged
  • Services: @inject anything registered in the container
  • Forms: the Document Form and the Generic Form run on Blazor's EditContext
  • Styles: CSS isolation, in a .razor.css file next to the component

What Veva adds

Veva

On top of that, a few attributes, a cascade and a slot:

  • Registration: [VevaComponent] and an id put it in the component picker, named and filed by [DisplayName], [Category] and [Icon]
  • Settings: [EditorBrowsable] on a parameter makes it a setting in the editor
  • Areas: <AreaContent> is a slot that editors fill with other components
  • Data binding: the RenderContext cascade binds tokens such as {title}, and knows the page and its render mode
  • Agents: [AgentHint] tells the AI assistant and coding agents what the component is for
This site

This site is built the same way. Its theme is a Razor class library of ordinary Razor components with CSS isolation, and the page you are reading is made of them.

For developers

A Blazor component, made editable.

Start from a component you would write anyway. The highlighted lines are what Veva needs to put it in the editor.

Rendering rules

Static

A Static page has no circuit, so OnAfterRenderAsync, event handlers and JS interop never run there.

  • Render the real content in markup, not from OnAfterRenderAsync
  • Branch on the request's RenderMode, in RenderContext.PageRequest, when the markup must differ. The built-in Tabs render every pane in static mode
  • Wire behaviour with a theme script, such as a custom element, which runs in every mode
  • Check any page with ?rendermode=static
Notice.razor
@attribute [VevaComponent("6f1c2b3a-8d4e-4f5a-9b6c-7d8e9f0a1b2c")]
@attribute [DisplayName("Notice")]
@attribute [Category("Content")]
@attribute [Icon("fas fa-circle-info")]
@attribute [AgentHint("A short notice: a title and a line of text.")]

<aside class="notice">
    <strong>@Title</strong>
    <p>@Text</p>
</aside>

@code {
    [EditorBrowsable]
    [Parameter]
    public string Title { get; set; } = "Heads up";

    [EditorBrowsable]
    [Parameter]
    public string Text { get; set; }
}

Beyond HTML

The same content, in other shapes.

Pages are one output. Documents and form answers go out in other formats too.

Feeds

A document model serves its documents as JSON, XML, RSS or an iCalendar feed, through endpoints set up on the model.

Headless

Keep the editor and the documents, and build the front end in Vue, React or anything else over Veva's API.

PDF

The PDF generator lays out form answers with components, and Puppeteer prints them as an A4 PDF in headless Chromium.

Keep reading

Guides for this module.

All articles

Modules

What it is made of.

The ones marked Built in come with Veva.Web.Essentials. Add the others as packages, restart, and set them up in the site's settings.

Module library

Web

Veva.Web

The host: BuildVeva(), the module loader, components, themes and data binding.

Layer
dotnet add package Veva.Web

Pages

Veva.Modules.Pages

Renders the pages: finds the website, page, template and theme, serves the 404 page and security headers, and holds the page settings.

Built in
dotnet add package Veva.Modules.Pages

Standard components

Veva.Modules.StandardViewComponents

48 components, from Heading, Paragraph and Link to Tabs, Data Table, Navigation menu and Bread crumbs, and styling options such as margin and padding.

Built in
dotnet add package Veva.Modules.StandardViewComponents

Document feeds

Veva.Modules.Documents.ViewEndpoints.Standard

Serves a model's documents as RSS, XML or JSON, through endpoints set up on the model.

Built in
dotnet add package Veva.Modules.Documents.ViewEndpoints.Standard

Calendar feeds

Veva.Modules.Documents.ViewEndpoints.ICAL

Serves a model's documents as an iCalendar feed, so events go straight into a calendar.

Built in
dotnet add package Veva.Modules.Documents.ViewEndpoints.ICAL

Puppeteer

Veva.Modules.Puppeteer

Renders the PDF generator's layout as an A4 PDF in headless Chromium, with each website's margins, header and footer.

Add-on
dotnet add package Veva.Modules.Puppeteer

More of Veva

Explore the other features.

Each one is made of modules. Reference a package, restart, and its components are in the editor.

All features

Page builder

Compose pages from components, then preview and publish

Open

Components and data

Components that show, components that fetch, and the binding between them

Open

Documents

Structured content you list, filter and serve anywhere

Open

Forms

Document forms that save, generic forms that filter or post

Open

PDFs and signing

Form answers made into a PDF, downloaded or sent to be signed

Open

Assets

One media library, with images sized on request

Open

Search

Crawl, index and search the whole site

Open

AI and agents

The admin's AI assistant, and the MCP server coding agents connect to

Open

Veva core

BuildVeva(), modules, components, themes and hooks

Open

Integrations

Data sources, sign-in, mail, analytics and media

Open

Module library

Every module: what comes with Essentials, and the add-ons

Open

Type to search the docs, components and API.

↑↓ to move ↵ to open Esc to close Search by Veva