Delivery Backlog · US01–US14

Norvia Backoffice User Stories

An implementation sequence covering cloud foundations, Codex-assisted development, product features, and local testing.

Product Norvia BackofficeClient University of NorviaStack .NET 10 + Azure SQLRoles Super Admin · Admin · User

Phase A — Platform and developer foundations

US01

Set up Azure Portal, Azure SQL Server, and Azure SQL Database

As a cloud administrator, I want the required Azure data services provisioned so that Norvia Backoffice has a secure and managed development database platform.

Implementation notes

  1. Create or select an Azure subscription and resource group using the agreed region and naming convention.
  2. Create an Azure SQL logical server with Microsoft Entra administration where available.
  3. Create the development database used by both the local project and the shared development environment.
  4. Configure firewall/private access, TLS, auditing, backups, and least-privilege application credentials.
  5. Run the approved schema script and retain execution evidence.

Acceptance criteria

  • Authorized developers can connect to the development database with approved credentials.
  • Required tables, keys, constraints, and indexes exist.
  • Backup retention and SQL auditing are enabled and documented.
PDFBackoffice Setup InstructionsDownload documentPDFAzure Portal Setup GuideDownload documentPDFAzure SQL Server & Database GuideDownload documentSQLSQL Table Creation QueryDownload script
US02

Set up the local development environment

As a developer, I want a repeatable VS Code environment so that I can build Norvia Backoffice with Codex and .NET 10.

Setup steps

  1. Install the .NET 10 SDK and confirm with dotnet --info.
  2. Install Visual Studio Code and the C# Dev Kit, Git, GitLens (optional), Azure Repos/Azure extensions, SQL Server (mssql), and the approved Codex extension/plugin.
  3. Configure Git identity, credential manager, line endings, and the organization’s signing policy.
  4. Clone the repository and open the workspace in VS Code.
  5. Create local user-secrets using the development environment’s Azure SQL connection string and sandbox/product API settings; never commit secrets.
  6. Restore, build, run tests, start the application, and validate a local health endpoint.
  7. Configure formatter, analyzers, debugging profile, and recommended extensions in workspace settings.

Acceptance criteria

  • dotnet build and dotnet test succeed on a clean workstation.
  • The application runs locally over HTTPS and connects only to the development environment’s database.
  • Codex can inspect, edit, and run the repository within approved workspace permissions.
PDFLocal Environment Setup — WindowsDownload documentPDFLocal Environment Setup — MacBookDownload document
US03

Create the project using Codex

As a developer, I want to scaffold the solution with Codex so that the initial architecture follows the approved standards.

Implementation notes

  • Create a .NET 10 solution with Web, Application, Domain, Infrastructure, and test projects.
  • Add ASP.NET Core MVC, dependency injection, configuration, logging, database migrations, authentication, and authorization policies.
  • Ask Codex to implement small reviewed increments, run validation, and explain material design choices.
  • Add README setup instructions, environment configuration examples, and architectural decision records.

Acceptance criteria

  • The solution builds without warnings designated as errors.
  • Dependencies flow inward and UI code does not contain direct SQL or external API credentials.
  • A health endpoint and baseline automated test execute successfully.
PDFNorvia Backoffice Codex PromptDownload project creation instructions

Phase B — Product features

US04

Create Product Management

As a Super Admin, I want to create, update, and list Norvia products so that the backoffice maintains a central product catalogue.

Acceptance criteria

  • The list shows ID, Name, and Description.
  • Name is required and unique; Description is optional.
  • Intelli Campus can be maintained as the initial OutSystems-based product.
  • Admin and User roles cannot access this feature.
US05

Create Product Role Management

As a Super Admin, I want to map Norvia role names to product-platform role IDs so that provisioning uses the correct native role.

Acceptance criteria

  • The list shows Role Name, Product, Product Role ID, and Order.
  • Create and update require all fields and an integer platform role ID.
  • The same Product Role ID cannot be duplicated within one product.
  • A contextual tooltip explains that the ID comes from the product’s technology platform.
US06

Create Tenant Management

As a Super Admin or Admin, I want to create, update, and list customer tenants so that Norvia can onboard organizations using its products.

Acceptance criteria

  • The list shows tenant name and active status with search/filter support.
  • Tenant name is required and unique.
  • Records can be activated or deactivated without physical deletion.
  • Inactive tenants cannot receive new tenant administrators.
US07

Create Tenant Administrator Management

As a Super Admin or Admin, I want to maintain tenant administrators so that each customer has authorized product administrators.

Acceptance criteria

  • The list contains Name, Email, Tenant, View, Provision Status, and Provision.
  • Clicking Name opens edit mode; View opens read-only details.
  • Create and update persist the complete supported UserExtended profile.
  • Each user references exactly one valid active tenant.
  • Provision Status is Provisioned only when OutSystemsUserId has a value.
US08

Tenant Administrator Provisioning

As a backoffice operator, I want to provision an existing tenant administrator separately so that the configured product—or a standalone course sandbox—receives the user only after local data is ready.

Integration options

  1. Product platform-specific API: obtain the API Signature Document from the API provider and implement the integration according to that product’s documented contract.
  2. Sandbox API: call the supplied ProvisionTenantAdmin endpoint when no product platform is involved.

Sandbox API signature

Method and URL
POST https://labs.lowcademy.com/intelli-backoffice/ProvisionTenantAdmin.php

Headers
Content-Type: application/json
key: 1b43f437-71db-4a41-99fe-3b731257b547
secret: 61a6ff82-a697-48dd-a760-13e6e69a6586

Request body
{ "TenantID": 101, "UserName": "Ada Lovelace", "Email": "ada@example.com", "RoleID": 2 }

Field types
TenantID: integer · UserName: string · Email: string · RoleID: integer

Success response
{ "IsError": false, "Message": "Tenant administrator provisioned successfully.", "UserID": "<new GUID>" }

Implementation notes

  • Use a typed HTTP client, server-held credentials, correlation ID, and explicit timeout.
  • After a successful call, store the returned UserID in UserExtended.OutSystemsUserId.
  • The sandbox endpoint always returns success with a newly generated unique GUID when the required headers and request fields are supplied.

Acceptance criteria

  • Provision calls the selected API and never creates another local UserExtended row.
  • A successful response stores the returned UserID in OutSystemsUserId and changes status to Provisioned.
  • A failed product-specific response leaves the ID unset, displays a useful error, records an audit event, and permits safe retry.
  • An already provisioned user cannot be accidentally provisioned twice.
PDFProvisionTenantAdmin API SignatureDownload the complete sandbox API contract
US09

Create Backoffice Administrator Management

As a Super Admin, I want to manage internal Norvia Backoffice accounts so that multiple authorized operators can administer the platform.

Acceptance criteria

  • List and forms support Name, Email, Role, Status, and Password input.
  • Email is a unique username.
  • Roles are Super Admin, Admin, and User, with the documented permissions.
  • Passwords are hashed and never shown after submission.
  • Only Super Admin can access this feature.

Phase C — Local quality validation

US10

Perform end-to-end local testing

As a delivery team, we want to validate the complete solution locally so that feature and integration defects are found early.

Acceptance criteria

  • Happy paths and validation failures are tested for every management feature.
  • All three roles are tested against both navigation and direct URLs.
  • Provisioning is tested for sandbox success and the selected product API’s documented error cases.
  • The local project is confirmed to use the development environment’s database.
  • Automated tests pass and no secrets or sensitive values appear in logs.

Phase D — Deployment

US11

Deploy the Application to Azure App Service

As a delivery team, we want to deploy Norvia Backoffice to Azure App Service so that the application is accessible in a production-like cloud environment beyond local development.

Setup App Service

  1. Create an Azure App Service plan (Linux, an appropriate compute tier for the workload) and an Azure Web App targeting the .NET 10 runtime.
  2. Configure App Settings in the Azure Portal for all required values: the Azure SQL connection string, API credentials, and environment discriminator (ASPNETCORE_ENVIRONMENT). Never commit secrets to source control.
  3. Choose and configure a deployment method — GitHub Actions, Azure DevOps pipeline, or SSH/FTP — and document it in the repository’s README.
  4. Restrict inbound access where appropriate (IP allowlists, authentication middleware, or Azure Front Door) and confirm TLS is enforced.
  5. Enable Azure App Service diagnostic logging and wire in Application Insights for runtime telemetry.
  6. Perform a smoke-test deployment: confirm the application starts, the health endpoint responds, and the app connects to the correct database.
  7. Document the App Service URL, the deployment trigger, and rollback steps in the project wiki or README.

Acceptance criteria

  • The application is accessible at the App Service URL over HTTPS only.
  • All management features load and function correctly against the Azure SQL database.
  • No secrets or connection strings appear in source control, logs, or HTTP responses.
  • Application Insights captures requests, exceptions, and dependencies.
  • A subsequent code push re-deploys the application without manual intervention and with no downtime longer than the platform default.
  • Rollback instructions are documented and have been verified at least once.

Phase E — Change Requests

US14

Product-User Role Mapping for Tenant Administrator

As a Super Admin or Admin, I want to assign explicit product-role mappings to a Tenant Administrator so that each admin's platform access is correctly linked to one or more products and their associated roles, rather than a raw unvalidated role ID.

Context — Feature Flaw

The current Create Tenant Administrator form exposes a free-text Product Role ID field that is not tied to any specific product. When multiple products exist, a single unvalidated ID cannot capture the full scope of a user's access. There is also no database relationship linking a UserExtended record to a product and its roles. This story removes the raw ID field and replaces it with a structured, multi-product mapping section backed by a dedicated table.

Database change

Run the following script once against the target database to create the mapping table:

IF NOT EXISTS (
    SELECT 1 FROM sys.tables
    WHERE name = 'UserExtendedRoleMapping'
      AND SCHEMA_NAME(schema_id) = 'dbo'
)
BEGIN
    CREATE TABLE dbo.UserExtendedRoleMapping (
        ID                BIGINT IDENTITY(1,1) NOT NULL,
        TenantID          BIGINT NOT NULL,
        UserExtendedID    BIGINT NOT NULL,
        ProductID         INT    NOT NULL,
        ProductUserRoleID INT    NOT NULL,
        CONSTRAINT PK_UserExtendedRoleMapping PRIMARY KEY (ID),
        CONSTRAINT FK_UERM_UserExtended  FOREIGN KEY (UserExtendedID) REFERENCES dbo.UserExtended (Id),
        CONSTRAINT FK_UERM_Product       FOREIGN KEY (ProductID)      REFERENCES dbo.NorviaProducts (ID),
        CONSTRAINT FK_UERM_ProductRole   FOREIGN KEY (ProductUserRoleID) REFERENCES dbo.ProductUserRole (ID)
    );

    CREATE INDEX IX_UserExtendedRoleMapping_UserExtendedID
        ON dbo.UserExtendedRoleMapping (UserExtendedID);
END

API / back-end requirements

  • Remove the UserRoleId field from both Create and Edit Tenant Administrator forms and view models.
  • Accept a list of ProductMappingInputViewModel { ProductId, ProductUserRoleId } in both Create and Edit actions.
  • On Create: after persisting the UserExtended record, insert one UserExtendedRoleMapping row per submitted mapping (using the new entity's TenantId, UserExtendedId, ProductId, and ProductUserRoleId).
  • On Edit / Update: delete all existing UserExtendedRoleMapping rows for that UserExtendedId, then insert the new set. This is a replace-on-update strategy.
  • An empty mapping list is valid — not every admin needs a product assignment at creation time.
  • Load all active products together with their roles and pass them to the Index view so the client can populate dropdowns without a round trip.

UI requirements

  • Remove the Product Role ID input from both the Create and Edit Tenant Administrator modals.
  • Add a Product Mappings section at the bottom of both modals, above the Password fields (Create) or above the footer buttons (Edit).
  • Display an Add Mapping button. Clicking it inserts a new row containing:
    • A Product single-select dropdown listing all active products.
    • A Role single-select dropdown that is filtered to show only roles belonging to the selected product (populated client-side from embedded JSON).
    • A Remove button to delete that row.
  • Role selection is single-select per row. Multiple rows for the same product are allowed.
  • When the Edit modal opens, pre-populate the mapping rows from the existing UserExtendedRoleMapping records for that admin (passed as a JSON array in a data-mappings attribute).
  • Submitted mapping rows use indexed form field names (Mappings[0].ProductId, Mappings[0].ProductUserRoleId, …) so the ASP.NET model binder can read them as a list.
  • The View modal should replace the Product Role ID detail row with a Product Mappings list showing each product name and its associated role name.

Acceptance criteria

  • The CREATE TABLE script is idempotent and runs without error on the development and target databases.
  • The Product Role ID field is removed from the Create and Edit modals.
  • Clicking Add Mapping adds a row with a Product dropdown and a role dropdown filtered by the selected product.
  • Selecting a different product in a row refreshes its role dropdown to show only that product's roles.
  • The Remove button on a row deletes it without a page reload.
  • On Create, submitted mappings are saved to UserExtendedRoleMapping after the UserExtended row is created.
  • On Edit, all prior mappings for the user are deleted and replaced with the submitted set.
  • Opening the Edit modal for a user with existing mappings pre-populates the mapping rows correctly.
  • The View modal shows product name and role name for each mapping instead of a raw role ID.
  • An empty mapping list is accepted without validation error.
US12

Implement Password Setup in UserExtended

As a Super Admin, I want UserExtended to store its own hashed password so that UserManagement is fully loosely coupled and any product that uses internal authentication can rely on UserExtended as a fallback login mechanism.

Context

UserExtended currently follows the product-platform-specific password creation flow (e.g. OutSystems provisioning). To support products that implement internal authentication — and to remove the tight coupling to any single platform — UserExtended must store its own PasswordHash. When a product’s authentication flow is unavailable or inapplicable, the system can fall back to this internal credential. Email must also be unique within UserExtended to serve as a reliable login identifier.

Database change

Run the following script against the target database to extend the table and enforce the email uniqueness constraint:

-- Add password hash column to UserExtended
ALTER TABLE UserExtended
    ADD PasswordHash NVARCHAR(256) NULL;

-- Enforce unique email as login identifier
ALTER TABLE UserExtended
    ADD CONSTRAINT UQ_UserExtended_Email UNIQUE (Email);

The column is nullable so that existing rows are unaffected. A null PasswordHash means the fallback login is unavailable for that user until a password is set or reset.

API / back-end requirements

  • On create, hash the supplied password with a strong algorithm (BCrypt or Argon2id) and store the result in PasswordHash. Never store the plain-text password.
  • Expose a Reset Password endpoint/action (Super Admin only) that accepts NewPassword + ConfirmPassword, validates they match, then replaces PasswordHash.
  • Enforce the unique-email constraint at the application layer (return a clear validation error) in addition to the database constraint.
  • The PasswordHash value must never appear in any API response, log line, or audit record.

UI requirements

  • Create form only: always display a "Password" field and a "Retype Password" field. Both are required. The form must not submit if the two values do not match.
  • Edit / Update form: do not show the password fields inline. Instead, display a Reset Password button. Clicking it reveals a "New Password" and "Confirm New Password" field pair within the form (or a modal). Submission replaces the stored hash; cancellation leaves it unchanged.
  • Password fields must use type="password" and must never be pre-populated.
  • Display a clear inline validation message when the two password values do not match.

Acceptance criteria

  • The ALTER TABLE script runs without error on the development and target databases.
  • Creating a user always requires and stores a hashed password; plain text is never persisted or logged.
  • Retype Password must equal Password on the create form; submission is blocked and an error shown if they differ.
  • The edit form shows Reset Password instead of an editable password field; the Reset Password flow validates and replaces the hash.
  • Email uniqueness is enforced at both the database and application layers with a user-friendly error message.
  • A user whose PasswordHash is null cannot use the fallback login path; the application handles this gracefully.
  • Password fields are never visible or pre-filled after a record is saved or updated.

Phase F — Future Integrations

US13

Create Broadcast Message Management

As a Super Admin or Admin, I want to create and manage broadcast messages targeted at all or selected tenants so that important announcements are stored centrally and consumed by the Intelli Broadcast application when it is ready.

Context

A separate team is building the Intelli Broadcast application, which will surface broadcast messages to tenant universities and their users. The Norvia Backoffice is responsible for authoring and managing these messages; the Intelli Broadcast application will read from the shared NorviaBroadcast table. The Backoffice side is being implemented now so that the schema and data are ready before the broadcast application is complete.

Workflow

  1. A Super Admin or Admin opens Broadcast Management in the Backoffice.
  2. They create a new broadcast by supplying a Message, an optional Description, and a Tenant target — either a specific tenant from the dropdown or All Tenants.
  3. When All Tenants is selected the record is saved with TenantID = 0; when a specific tenant is chosen the actual TenantID is stored.
  4. The record is saved with IsActive = 1 and CreatedDate set to the current UTC timestamp.
  5. The Intelli Broadcast application (when ready) queries NorviaBroadcast for active records where TenantID = 0 (all tenants) or matches the consuming tenant's ID.
  6. The operator can filter the list by Tenant and by a Created Date range to locate records quickly.
  7. The operator can delete a message (hard delete or deactivate via IsActive = 0) from the Backoffice; the broadcast application will no longer serve it once it is inactive or removed.

Database — Create Table

Run the following script once against the target database. The guard ensures the table is only created if it does not already exist:

IF NOT EXISTS (
    SELECT 1 FROM sys.tables
    WHERE name = 'NorviaBroadcast'
      AND SCHEMA_NAME(schema_id) = 'dbo'
)
BEGIN
    CREATE TABLE dbo.NorviaBroadcast (
        ID          INT           IDENTITY(1,1) NOT NULL PRIMARY KEY,
        TenantID    INT           NULL,           -- 0 = all tenants; specific ID = targeted tenant
        Message     NVARCHAR(500) NOT NULL,
        Description NVARCHAR(MAX) NULL,
        CreatedDate DATETIME2     NOT NULL DEFAULT SYSUTCDATETIME(),
        IsActive    BIT           NOT NULL DEFAULT 1
    );

    CREATE INDEX IX_NorviaBroadcast_TenantID
        ON dbo.NorviaBroadcast (TenantID)
        INCLUDE (IsActive, CreatedDate);
END

TenantID is nullable for schema flexibility. By convention, TenantID = 0 means the message targets all tenants. A future migration can tighten this with a foreign-key constraint once the broadcast application's read contract is confirmed.

API / back-end requirements

  • Create and delete are restricted to Super Admin and Admin roles; Users cannot access this feature.
  • On create, validate that Message is non-empty and that TenantID is either 0 (all) or a valid active tenant ID.
  • Provide a list endpoint that supports filtering by TenantID and a CreatedDate range (from/to).
  • Delete may be a soft delete (set IsActive = 0) or hard delete, per team decision; document the chosen behaviour in the API contract.
  • The table must not be modified by the Backoffice beyond the fields it owns — the Intelli Broadcast application is a read-only consumer of this table.

UI requirements

  • List view shows Message (truncated), Tenant (name or "All Tenants"), Created Date, and Active status.
  • Filter bar provides a Tenant dropdown (including an "All Tenants" option) and a Created Date range picker.
  • Create form collects Message (required), Description (optional), and Tenant target (required — dropdown with "All Tenants" as the first option).
  • Each row has a Delete action; a confirmation prompt is shown before deletion.
  • No edit/update form is required for this story — messages are write-once; amendment is handled by delete and recreate.

Acceptance criteria

  • The CREATE TABLE script runs without error on the development database and is idempotent (safe to re-run).
  • A broadcast with TenantID = 0 is saved when "All Tenants" is selected.
  • A broadcast with a specific TenantID is saved when a named tenant is selected; only valid active tenants appear in the dropdown.
  • The list can be filtered by Tenant (including "All Tenants") and by Created Date range, independently or combined.
  • Deleting a message removes or deactivates it; the confirmation prompt is shown before the action is committed.
  • Admin and User roles cannot create or delete messages; the feature is not visible in navigation for the User role.
  • The Intelli Broadcast application team is provided the table schema and the TenantID = 0 convention as part of handoff documentation.