vr-core
Foundational domain types for the Vigilant Research (VR) platform. This crate provides the type-safe identifiers, tenant isolation primitives, and monetary types used across the entire platform ecosystem.
Intent
To establish a "Single Source of Truth" for platform-wide data structures. It enforces tenant isolation at the type level (TenantScoped<T>) and provides a unified financial model for all billing and marketplace operations.
T1 Grounding (Lex Primitiva)
Dominant Primitives:
- λ (Address): The core primitive for type-safe identifiers (
TenantId,UserId). - ∂ (Boundary): Enforces strict isolation via
TenantContextandTenantScoped. - N (Quantity): Represents financial values through the
Moneytype (integer cents). - κ (Comparison): Used for permission checks and role evaluations.
Core Types
- TenantContext: Essential metadata extracted from authenticated requests to ensure isolation.
- TenantScoped: A container that binds a value to a specific
TenantId. - Money: Type-safe financial calculations in integer cents to avoid floating-point errors.
- User Roles: The permission model (Reader, Contributor, Admin, Owner).
SOPs for Use
Using Tenant Isolation
use ;
Financial Calculations
use ;
let price = cents; // $49.00
let discount = cents;
let total = price - discount;
License
Proprietary. Copyright (c) 2026 NexVigilant LLC. All Rights Reserved.