Platform Architecture

This document explains the core architecture concepts behind the HiStruct platform. The most important idea is that every component is defined by two parallel data systems: FCS and PVC.

FCS vs PVC Duality

HiStruct components always combine a definition layer and an instance layer.

Aspect FCS (FemCAD Script) PVC (Parameter Value Collection)
What Code, definitions, geometry, formulas Instance state, parameter values
Where Git commits (or local file timestamps) Server-side per-component
Analogy Class definition Object instance fields
Versioned by Git SHA / local file timestamp Edit transactions
Edited via VS Code / text editor UI forms / ComponentEditTransaction API

Mental model

A good analogy is:

The template can be reused thousands of times, but each component instance has its own PVC.

How Rendering Works

When a component is evaluated, the platform combines FCS and PVC in a fixed order:

  1. The server loads the FCS definition from the prototype source.
    • This is resolved from a local prototype timestamp or a Git SHA.
  2. The server loads the PVC for the specific component instance.
  3. The FCS evaluator merges them.
    • PVC values override FCS defaults.
  4. The evaluator produces outputs.
    • Computed expressions
    • 3D geometry
    • Parameter state
    • Reports
    • View data
FCS template + PVC instance state -> evaluated component output

Override behavior

The important rule is:

FCS provides the default structure and logic, while PVC provides the current user state.

For example, if Inputs.fcs defines a default roof width of 4.0, but the user changes it to 4.5 in the UI, the evaluator uses 4.5 from PVC.

PVC in the API

Several API fields expose PVC snapshots during editing workflows.

OriginalPvcB64

Base64-encoded PVC snapshot before edits are applied.

Use cases:

StagingEditedPvcB64

Base64-encoded PVC that includes pending, not-yet-committed edits.

Use cases:

ComponentEditTransaction

Endpoint used to commit PVC changes.

This is the server-side write step that turns staged parameter changes into the current persisted component instance state.

Spaces

HiStruct organizes content into spaces.

Examples:

A space is a logical container for:

Space route key

The space key is part of normal application routing:

/{spaceKey}/{lang}/...

Examples:

deve-rv-local/en/...
sky/en/...

What belongs to a space

Each space typically has its own:

This means the same .fcc template can be published differently in different spaces.

Component Lifecycle

A component moves through several stages from authoring to evaluation.

1. Author FCS code

Developers create or modify component files locally or in GitHub.

Typical files include:

2. Register the component template in a space palette

The template is added to the palette for a target space so users can create instances from it.

3. Users create component instances

A user selects a palette item and creates a new component. At that point, the system creates:

4. Booster evaluates FCS + PVC

A Booster node performs the compute-heavy work. This can run locally or in cloud infrastructure.

Responsibilities include:

5. Results are returned to the app

The final outputs can include:

Authorization Model

HiStruct exposes different capabilities depending on role.

Admin

SpaceDeveloper

Developer

Regular user

Permission diagnostic endpoint

The first endpoint to check when permissions look wrong is:

/{space}/{lang}/Model/UserSession

This endpoint is the primary diagnostic surface for:

Technology Stack

HiStruct spans a browser UI, an ASP.NET backend, and distributed compute workers.

Layer Technology
Backend ASP.NET Core (C#)
Frontend Aurelia (TypeScript)
Compute Azure WebJobs via Booster nodes
Storage Azure Blob + SQL
Communication SignalR for Booster ↔ Server

Backend

The server handles:

Frontend

The Aurelia frontend handles:

Compute layer

Booster nodes run evaluation jobs and allow expensive geometry/report generation to scale independently from the web tier.

Storage layer

Realtime communication

SignalR is used for Booster-to-server communication, which helps coordinate job execution and status updates.

End-to-End Summary

A HiStruct component is never just code and never just data.

It is always the combination of:

That duality explains most of the platform architecture:

Once this model is clear, the rest of the platform becomes much easier to reason about.